marazmista / radeon-profile

Application to read current clocks of ATi Radeon cards (xf86-video-ati, xf86-video-amdgpu)
GNU General Public License v2.0
733 stars 75 forks source link

Segfault on Ryzen/Radeon mobile #229

Open matoro opened 4 years ago

matoro commented 4 years ago

Hey, I figured I would try this app out on my new laptop that has a Ryzen chip with an iGPU and a dedicated Radeon GPU. Unfortunately it crashes with a segfault when trying to change the card from card0 to card1. Here is the backtrace:

$ gdb --args radeon-profile
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from radeon-profile...
Reading symbols from /usr/lib/debug/usr/bin/radeon-profile.debug...
(gdb) r
Starting program: /usr/bin/radeon-profile 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Creating application object
[New Thread 0x7ffff2e1a640 (LWP 514270)]
Creating radeon_profile
[New Thread 0x7ffff1e90640 (LWP 514271)]
[New Thread 0x7ffff168f640 (LWP 514272)]
[New Thread 0x7ffff0e8e640 (LWP 514273)]
[New Thread 0x7fffe3fff640 (LWP 514274)]
[New Thread 0x7fffe37fe640 (LWP 514275)]
[New Thread 0x7fffe2ffd640 (LWP 514276)]
[New Thread 0x7fffe27fc640 (LWP 514277)]
[New Thread 0x7fffe1ffb640 (LWP 514280)]
[New Thread 0x7fffe17fa640 (LWP 514281)]
[New Thread 0x7fffe0ff9640 (LWP 514282)]
[New Thread 0x7fffbffff640 (LWP 514283)]
[New Thread 0x7fffbf7fe640 (LWP 514284)]
[New Thread 0x7fffbeffd640 (LWP 514285)]
[New Thread 0x7fffbe7fc640 (LWP 514286)]
[New Thread 0x7fffbdffb640 (LWP 514289)]
[New Thread 0x7fffbd7fa640 (LWP 514291)]
[New Thread 0x7fffbcff9640 (LWP 514292)]
Loading configuration
Creating ui elements
[New Thread 0x7fff9ffff640 (LWP 514293)]
[New Thread 0x7fff97a14640 (LWP 514294)]
[New Thread 0x7fff97213640 (LWP 514295)]
[New Thread 0x7fff96a12640 (LWP 514296)]
[New Thread 0x7fff96211640 (LWP 514297)]
[New Thread 0x7fff95a10640 (LWP 514298)]
[New Thread 0x7fff9520f640 (LWP 514299)]
[New Thread 0x7fff94a0e640 (LWP 514300)]
[New Thread 0x7fff77fff640 (LWP 514301)]
[New Thread 0x7fff777fe640 (LWP 514302)]
[New Thread 0x7fff76ffd640 (LWP 514303)]
[New Thread 0x7fff767fc640 (LWP 514304)]
[New Thread 0x7fff75ffb640 (LWP 514305)]
[New Thread 0x7fff757fa640 (LWP 514306)]
[New Thread 0x7fff74ff9640 (LWP 514307)]
[New Thread 0x7fff53fff640 (LWP 514308)]
[New Thread 0x7fff4b7fe640 (LWP 514309)]
[New Thread 0x7fff537fe640 (LWP 514310)]
[New Thread 0x7fff52ffd640 (LWP 514311)]
[New Thread 0x7fff527fc640 (LWP 514312)]
[New Thread 0x7fff51ffb640 (LWP 514313)]
[New Thread 0x7fff517fa640 (LWP 514314)]
[Detaching after vfork from child process 514315]
Analyzing screen  0
  Analyzing output  0
    Analyzing active mode
      Property is EDID, parsing it
Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
Searching PnP ID:  "AUO"
Found PnP ID:  "AUO" -> "DO NOT USE - AUO"
  Analyzing output  1
  Analyzing output  2
  Analyzing output  3
Output 3 has no active mode
      Property is EDID, parsing it
Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt.
Searching PnP ID:  "GSM"
Found PnP ID:  "GSM" -> "Goldstar Company Ltd"
[Detaching after vfork from child process 514316]
Connecting to daemon...
Daemon connected
Initializing device
[Detaching after vfork from child process 514317]
[Detaching after vfork from child process 514318]
Card detected:
 module:  "amdgpu" 
 sysName(path):  "card0" 
 name:  "Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] (rev c2)"
[Detaching after vfork from child process 514319]
Card detected:
 module:  "amdgpu" 
 sysName(path):  "card1" 
 name:  "Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c6)"
[Detaching after vfork from child process 514320]
hwmon path:  "/sys/class/drm/card0/device/hwmon/hwmon2/"
Opened /dev/dri/renderD128 , fd number: 31
Confguring shared memory for daemon
Configure shared mem
Shared memory is not attached, creating it
Sending daemon shared mem info:  "0#pm_info#/sys/kernel/debug/dri/0/amdgpu_pm_info#6#ViXA8URLkV#1#"
Waiting for first daemon data read...
QFSFileEngine::open: No file name specified
Detected power method based on sysfs power_method file: 3
Power method: Power Profile Modes. Creating profiles list
ioctlHandler: everything ok
ioctlHandler: everything ok
GPU max core clk:  1750 
 max mem clk:  750 
 vram size:  6094.16
[Detaching after vfork from child process 514379]
[Detaching after vfork from child process 514380]
[Detaching after vfork from child process 514406]
Handling found device features
Creating power profiles control buttons
Fan control available
[New Thread 0x7fff50ff9640 (LWP 514410)]
[New Thread 0x7fff4bfff640 (LWP 514411)]
[New Thread 0x7fff4affd640 (LWP 514412)]
[New Thread 0x7fff4a7fc640 (LWP 514413)]
[New Thread 0x7fff49ffb640 (LWP 514414)]
Closing ioctl fd, number: 31
[Detaching after vfork from child process 514580]
hwmon path:  "/sys/class/drm/card1/device/hwmon/hwmon3/"
Opened /dev/dri/renderD129 , fd number: 31
Confguring shared memory for daemon
Configure shared mem
Shared memory is not attached, creating it
Sending daemon shared mem info:  "0#pm_info#/sys/kernel/debug/dri/1/amdgpu_pm_info#6#fnaqqcZ9fD#1#"
Waiting for first daemon data read...
QFSFileEngine::open: No file name specified
Detected power method based on sysfs power_method file: 3
Power method: Power Profile Modes. Creating profiles list
ioctlHandler: everything ok
ioctlHandler: everything ok
GPU max core clk:  1600 
 max mem clk:  0 
 vram size:  474.84
[Detaching after vfork from child process 514606]
hwmon path:  "/sys/class/drm/card1/device/hwmon/hwmon3/"
Opened /dev/dri/renderD129 , fd number: 33
Confguring shared memory for daemon
Configure shared mem
Sending daemon shared mem info:  "0#pm_info#/sys/kernel/debug/dri/1/amdgpu_pm_info#6#fnaqqcZ9fD#1#"
Waiting for first daemon data read...
QFSFileEngine::open: No file name specified
Detected power method based on sysfs power_method file: 3
Power method: Power Profile Modes. Creating profiles list
ioctlHandler: everything ok
Handling found device features
QLayout: Attempting to add QLayout "" to QWidget "widget_pmControls", which already has a layout
QWidget::setLayout: Attempting to set QLayout "" on QWidget "widget_pmControls", which already has a layout
Creating power profiles control buttons
Fan control not available

Thread 1 "radeon-profile" received signal SIGSEGV, Segmentation fault.
0x00007ffff786547b in QAbstractButton::setChecked(bool) () from /usr/lib/libQt5Widgets.so.5
(gdb) bt
#0  0x00007ffff786547b in QAbstractButton::setChecked(bool) () from /usr/lib/libQt5Widgets.so.5
#1  0x0000555555575286 in radeon_profile::refreshUI (this=0x7fffffffe080) at radeon_profile.cpp:399
#2  0x000055555557631d in radeon_profile::mainTimerEvent (this=0x7fffffffe080) at radeon_profile.cpp:489
#3  0x000055555559fe10 in radeon_profile::gpuChanged (this=0x7fffffffe080) at uiEvents.cpp:56
#4  0x00005555555ee43c in radeon_profile::qt_static_metacall (_o=0x7fffffffe080, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffd180) at moc_radeon_profile.cpp:388
#5  0x00007ffff6b5ea40 in ?? () from /usr/lib/libQt5Core.so.5
#6  0x00007ffff7875546 in QComboBox::currentIndexChanged(QString const&) () from /usr/lib/libQt5Widgets.so.5
#7  0x00007ffff7877920 in ?? () from /usr/lib/libQt5Widgets.so.5
#8  0x00007ffff787916d in ?? () from /usr/lib/libQt5Widgets.so.5
#9  0x00007ffff787937a in ?? () from /usr/lib/libQt5Widgets.so.5
#10 0x00007ffff6b5ea40 in ?? () from /usr/lib/libQt5Core.so.5
#11 0x00007ffff7875843 in QComboBoxPrivateContainer::itemSelected(QModelIndex const&) () from /usr/lib/libQt5Widgets.so.5
#12 0x00007ffff7876070 in QComboBoxPrivateContainer::eventFilter(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff6b27503 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#14 0x00007ffff77726f1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#15 0x00007ffff7779977 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007ffff6b2779a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#17 0x00007ffff777885e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /usr/lib/libQt5Widgets.so.5
#18 0x00007ffff77cc92f in ?? () from /usr/lib/libQt5Widgets.so.5
#19 0x00007ffff77cf78f in ?? () from /usr/lib/libQt5Widgets.so.5
#20 0x00007ffff7772702 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#21 0x00007ffff6b2779a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#22 0x00007ffff708237c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt5Gui.so.5
#23 0x00007ffff7057b4c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
#24 0x00007ffff30ebc8c in ?? () from /usr/lib/libQt5XcbQpa.so.5
#25 0x00007ffff559143c in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#26 0x00007ffff55df1d9 in ?? () from /usr/lib/libglib-2.0.so.0
#27 0x00007ffff5590221 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#28 0x00007ffff6b80311 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#29 0x00007ffff6b2611c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#30 0x00007ffff6b2e5a4 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#31 0x000055555557144c in main (argc=1, argv=0x7fffffffe348) at main.cpp:26

Hope this helps! It works great on my desktop.

Haxk20 commented 3 years ago

Same issue here.