You are not logged in.
I installed GammaRay hoping to learn how about qml objects but everytime I attached it to any qml running process, I get segmentation fault.
Here is an example:
PID: 206722 (qmlplugindump)
UID: 1000 (brightchip)
GID: 1000 (brightchip)
Signal: 11 (SEGV)
Timestamp: Sat 2021-05-15 14:03:00 BST (8h ago)
Command Line: /usr/bin/qmlplugindump -nonrelocatable org.kde.quickcharts 1.0 .
Executable: /usr/bin/qmlplugindump
Control Group: /user.slice/user-1000.slice/user@1000.service/app.slice/app-org.qt\x2dproject.qtcreator-0f9565e6d64c46c78e3e2a6db66f68c9.scope
Unit: user@1000.service
User Unit: app-org.qt\x2dproject.qtcreator-0f9565e6d64c46c78e3e2a6db66f68c9.scope
Slice: user-1000.slice
Owner UID: 1000 (brightchip)
Boot ID: 7fb72a8da83341399a9ead1b02872863
Machine ID: 0fb949def1e1446aadf8ee07e15b3cc1
Hostname: taichi-z270
Storage: /var/lib/systemd/coredump/core.qmlplugindump.1000.7fb72a8da83341399a9ead1b02872863.206722.1621083780000000.zst (present)
Disk Size: 1.4M
Message: Process 206722 (qmlplugindump) of user 1000 dumped core.
Stack trace of thread 206722:
#0 0x00007f4aaa8d07aa _ZNK11QQmlContext7baseUrlEv (libQt5Qml.so.5 + 0x27a7aa)
#1 0x00007f4a9d3b54a8 n/a (libQuickCharts.so + 0x364a8)
#2 0x00007f4aa967f322 _ZN7QObject5eventEP6QEvent (libQt5Core.so.5 + 0x2e3322)
#3 0x00007f4aa965281a _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt5Core.so.5 + 0x2b681a)
#4 0x00007f4aa9655313 _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData (libQt5Core.so.5 + 0x2b9313)
#5 0x00007f4aa96abce4 n/a (libQt5Core.so.5 + 0x30fce4)
#6 0x00007f4aa82f002c g_main_context_dispatch (libglib-2.0.so.0 + 0x5402c)
#7 0x00007f4aa8343b59 n/a (libglib-2.0.so.0 + 0xa7b59)
#8 0x00007f4aa82ed781 g_main_context_iteration (libglib-2.0.so.0 + 0x51781)
#9 0x00007f4aa96ab321 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x30f321)
#10 0x00007f4aa965117c _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2b517c)
#11 0x00007f4aa9659634 _ZN16QCoreApplication4execEv (libQt5Core.so.5 + 0x2bd634)
#12 0x0000560476ad5909 n/a (qmlplugindump + 0x9909)
#13 0x00007f4aa9019b25 __libc_start_main (libc.so.6 + 0x27b25)
#14 0x0000560476ad664e n/a (qmlplugindump + 0xa64e)
Stack trace of thread 206727:
#0 0x00007f4aa90e637f __poll (libc.so.6 + 0xf437f)
#1 0x00007f4aa8343ae8 n/a (libglib-2.0.so.0 + 0xa7ae8)
#2 0x00007f4aa82ed781 g_main_context_iteration (libglib-2.0.so.0 + 0x51781)
#3 0x00007f4aa96ab321 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x30f321)
#4 0x00007f4aa965117c _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2b517c)
#5 0x00007f4aa9468ea2 _ZN7QThread4execEv (libQt5Core.so.5 + 0xccea2)
#6 0x00007f4aaa961a39 n/a (libQt5Qml.so.5 + 0x30ba39)
#7 0x00007f4aa946a08f n/a (libQt5Core.so.5 + 0xce08f)
#8 0x00007f4aa8e56299 start_thread (libpthread.so.0 + 0x9299)
#9 0x00007f4aa90f1053 __clone (libc.so.6 + 0xff053)
Stack trace of thread 207063:
#0 0x00007f4aa90e637f __poll (libc.so.6 + 0xf437f)
#1 0x00007f4aa8343ae8 n/a (libglib-2.0.so.0 + 0xa7ae8)
#2 0x00007f4aa82ed781 g_main_context_iteration (libglib-2.0.so.0 + 0x51781)
#3 0x00007f4aa96ab321 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x30f321)
#4 0x00007f4aa965117c _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2b517c)
#5 0x00007f4aa9468ea2 _ZN7QThread4execEv (libQt5Core.so.5 + 0xccea2)
#6 0x00007f4a9f927098 n/a (libQt5DBus.so.5 + 0x17098)
#7 0x00007f4aa946a08f n/a (libQt5Core.so.5 + 0xce08f)
#8 0x00007f4aa8e56299 start_thread (libpthread.so.0 + 0x9299)
#9 0x00007f4aa90f1053 __clone (libc.so.6 + 0xff053)
GNU gdb (GDB) 10.2
Copyright (C) 2021 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:
<https://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 /usr/bin/qmlplugindump...
(No debugging symbols found in /usr/bin/qmlplugindump)
warning: Can't open file /memfd:JITCode:QtQml (deleted) during file-backed mapping note processing
warning: Can't open file /memfd:unknown-usage:QtQml (deleted) during file-backed mapping note processing
warning: Can't open file /memfd:JSGCHeap:QtQml (deleted) during file-backed mapping note processing
warning: Can't open file /memfd:JSVMStack:QtQml (deleted) during file-backed mapping note processing
[New LWP 206722]
[New LWP 206727]
[New LWP 207063]
Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: generic error
warning: File "/usr/lib/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /usr/lib/libthread_db-1.0.so
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/qmlplugindump -nonrelocatable org.kde.quickcharts 1.0 .'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f4aaa8d07aa in QQmlContext::baseUrl() const () from /usr/lib/libQt5Qml.so.5
[Current thread is 1 (Thread 0x7f4aa5c7c5c0 (LWP 206722))]And the backtrace:
(gdb) bt
#0 0x00007f4aaa8d07aa in QQmlContext::baseUrl() const () from /usr/lib/libQt5Qml.so.5
#1 0x00007f4a9d3b54a8 in ?? () from /usr/lib/qt/qml/org/kde/quickcharts/libQuickCharts.so
#2 0x00007f4aa967f322 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#3 0x00007f4aa965281a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#4 0x00007f4aa9655313 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#5 0x00007f4aa96abce4 in ?? () from /usr/lib/libQt5Core.so.5
#6 0x00007f4aa82f002c in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#7 0x00007f4aa8343b59 in ?? () from /usr/lib/libglib-2.0.so.0
#8 0x00007f4aa82ed781 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#9 0x00007f4aa96ab321 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#10 0x00007f4aa965117c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#11 0x00007f4aa9659634 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#12 0x0000560476ad5909 in ?? ()
#13 0x00007f4aa9019b25 in __libc_start_main () from /usr/lib/libc.so.6
#14 0x0000560476ad664e in ?? ()Any thoughts on this problem? Also what are those memfd warnings? I searched the net but haven't found a satisfactory answer.
Last edited by d_fajardo (2021-05-16 06:45:28)
Offline
I traced the problem to two things: missing lldb debugger and permission issues with /proc/sys/kernel/yama/ptrace_scope.
I installed lldb and in /etc/sysctl.d I created 10-ptrace.conf:
kernel.yama.ptrace_scope = 0and it is now working. Taken from these leads:
https://github.com/KDAB/GammaRay/wiki/K … ng-process
https://askubuntu.com/questions/41629/a … to-process
Offline