Bug 435999

Summary: Crash due to incorrect dbus call
Product: [Applications] plasma-systemmonitor Reporter: dontarius
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: NEEDSINFO WAITINGFORINFO    
Severity: crash CC: ahiemstra, alexmateescu, bugseforuns, kde, nate, nicolas.fella, plasma-bugs, torokati44
Priority: NOR Keywords: drkonqi
Version: 5.21.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: stack trace of a plasmashell crash
New crash information added by DrKonqi

Description dontarius 2021-04-21 13:26:47 UTC
Application: plasma-systemmonitor (5.21.4)

Qt Version: 5.15.2
Frameworks Version: 5.81.0
Operating System: Linux 5.11.12-1-default x86_64
Windowing System: X11
Drkonqi Version: 5.21.4
Distribution: "openSUSE Tumbleweed"

-- Information about the crash:
- What I was doing when the application crashed:

Just looking through the new system monitor.

- Unusual behavior I noticed:

My system was very low on memory at the time (swapping heavily and essentially seized up) and this crash may well have had something to do with that.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: System Monitor (plasma-systemmonitor), signal: Aborted
Content of s_kcrashErrorMessage: [Current thread is 1 (Thread 0x7fd03d6fd400 (LWP 30423))]
[KCrash Handler]
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#7  0x00007fd03f0c5864 in __GI_abort () at abort.c:79
#8  0x00007fd03e96ed66 in _dbus_abort () at dbus-sysdeps.c:93
#9  0x00007fd03e9942d0 in _dbus_warn_check_failed (format=0x7fd03e9a1c50 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus library.\n") at dbus-internals.c:281
#10 0x00007fd03fa81f69 in q_dbus_pending_call_block (pending=<optimized out>) at qdbus_symbols_p.h:450
#11 QDBusConnectionPrivate::getNameOwnerNoCache (this=this@entry=0x7fd02c003a00, serviceName=...) at qdbusintegrator.cpp:2563
#12 0x00007fd03fa83413 in QDBusConnectionPrivate::addSignalHook (this=0x7fd02c003a00, key=..., hook=...) at qdbusintegrator.cpp:2298
#13 0x00007fd03fa84f31 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<QString const&, QDBusConnectionPrivate::SignalHook const&>, bool, bool (QDBusConnectionPrivate::*)(QString const&, QDBusConnectionPrivate::SignalHook const&)>::call (arg=0x7ffdd047d580, o=<optimized out>, f=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:152
#14 QtPrivate::FunctionPointer<bool (QDBusConnectionPrivate::*)(QString const&, QDBusConnectionPrivate::SignalHook const&)>::call<QtPrivate::List<QString const&, QDBusConnectionPrivate::SignalHook const&>, bool> (arg=0x7ffdd047d580, o=<optimized out>, f=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:185
#15 QtPrivate::QSlotObject<bool (QDBusConnectionPrivate::*)(QString const&, QDBusConnectionPrivate::SignalHook const&), QtPrivate::List<QString const&, QDBusConnectionPrivate::SignalHook const&>, bool>::impl (which=<optimized out>, this_=<optimized out>, r=<optimized out>, a=0x7ffdd047d580, ret=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:418
#16 0x00007fd03f78ca2c in QObject::event (this=0x7fd02c003a00, e=0x7fd02c025300) at kernel/qobject.cpp:1314
#17 0x00007fd03f76010f in doNotify (event=0x7fd02c025300, receiver=0x7fd02c003a00) at kernel/qcoreapplication.cpp:1153
#18 QCoreApplication::notify (event=<optimized out>, receiver=<optimized out>, this=<optimized out>) at kernel/qcoreapplication.cpp:1139
#19 QCoreApplication::notifyInternal2 (receiver=0x7fd02c003a00, event=0x7fd02c025300) at kernel/qcoreapplication.cpp:1063
#20 0x00007fd03f7630b1 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x562f2db4f530) at kernel/qcoreapplication.cpp:1817
#21 0x00007fd03f7b86b3 in postEventSourceDispatch (s=s@entry=0x7fd02c004bb0) at kernel/qeventdispatcher_glib.cpp:277
#22 0x00007fd03e1267e7 in g_main_dispatch (context=0x7fd02c000c20) at ../glib/gmain.c:3337
#23 g_main_context_dispatch (context=0x7fd02c000c20) at ../glib/gmain.c:4055
#24 0x00007fd03e126b68 in g_main_context_iterate (context=context@entry=0x7fd02c000c20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4131
#25 0x00007fd03e126c1f in g_main_context_iteration (context=0x7fd02c000c20, may_block=may_block@entry=1) at ../glib/gmain.c:4196
#26 0x00007fd03f7b7d30 in QEventDispatcherGlib::processEvents (this=0x7fd02c000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#27 0x00007fd03f75eb7b in QEventLoop::exec (this=this@entry=0x7fd039b3fc90, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#28 0x00007fd03f57c3fe in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#29 0x00007fd03fa6f3f7 in QDBusConnectionManager::run (this=0x7fd03fae8440 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:179
#30 0x00007fd03f57d541 in QThreadPrivate::start (arg=0x7fd03fae8440 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:329
#31 0x00007fd03eeca299 in start_thread (arg=0x7fd039b40640) at pthread_create.c:473
#32 0x00007fd03f19f4a3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fd03b84e640 (LWP 30425) "QXcbEventQueue"):
#1  0x00007fd03db9b862 in poll (__timeout=-1, __nfds=1, __fds=0x7fd03b84dbc8) at /usr/include/bits/poll2.h:47
#2  _xcb_conn_wait (c=0x562f2da78630, vector=0x0, count=0x0, cond=<optimized out>) at xcb_conn.c:480
#3  0x00007fd03db9d26c in _xcb_conn_wait (count=0x0, vector=0x0, cond=0x562f2da78670, c=0x562f2da78630) at xcb_conn.c:446
#4  xcb_wait_for_event (c=c@entry=0x562f2da78630) at xcb_in.c:697
#5  0x00007fd03ba64c50 in QXcbEventQueue::run (this=0x562f2da69860) at qxcbeventqueue.cpp:228
#6  0x00007fd03f57d541 in QThreadPrivate::start (arg=0x562f2da69860) at thread/qthread_unix.cpp:329
#7  0x00007fd03eeca299 in start_thread (arg=0x7fd03b84e640) at pthread_create.c:473
#8  0x00007fd03f19f4a3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fd03d6fd400 (LWP 30423) "plasma-systemmo"):
#1  0x00007fd03f57f781 in QtLinuxFutex::_q_futex (val3=0, addr2=0x0, val2=0, val=<optimized out>, op=0, addr=<optimized out>) at thread/qfutex_p.h:116
#2  QtLinuxFutex::futexWait<QBasicAtomicInteger<unsigned int> > (expectedValue=<optimized out>, futex=...) at thread/qfutex_p.h:135
#3  futexSemaphoreTryAcquire_loop<false> (timeout=-1, nn=8589934593, curValue=<optimized out>, u=...) at thread/qsemaphore.cpp:219
#4  futexSemaphoreTryAcquire<false> (timeout=-1, n=n@entry=1, u=..., u@entry=<error reading variable: Cannot access memory at address 0x1ffffff49>) at thread/qsemaphore.cpp:262
#5  QSemaphore::acquire (this=this@entry=0x7ffdd047d500, n=n@entry=1) at thread/qsemaphore.cpp:326
#6  0x00007fd03f796b72 in doActivate<false> (sender=0x7fd02c003a00, signal_index=7, argv=argv@entry=0x7ffdd047d580) at kernel/qobject.cpp:3867
#7  0x00007fd03f78ff60 in QMetaObject::activate (sender=sender@entry=0x7fd02c003a00, m=m@entry=0x7fd03fae6a80 <QDBusConnectionPrivate::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x7ffdd047d580) at kernel/qobject.cpp:3946
#8  0x00007fd03facadd3 in QDBusConnectionPrivate::signalNeedsConnecting (this=this@entry=0x7fd02c003a00, _t1=..., _t2=...) at .moc/moc_qdbusconnection_p.cpp:357
#9  0x00007fd03fa79846 in QDBusConnectionPrivate::connectRelay (this=0x7fd02c003a00, service=..., path=..., interface=..., receiver=0x562f32e0f1a0, signal=...) at qdbusintegrator.cpp:2463
#10 0x00007fd03f78dd32 in QObjectPrivate::connectImpl (sender=0x562f32e0f1a0, signal_index=5, receiver=0x7fd02b40b650 <KSysGuard::SensorDaemonInterface::instance()::instance>, slot=<optimized out>, slotObj=<optimized out>, type=<optimized out>, types=<optimized out>, senderMetaObject=<optimized out>) at kernel/qobject.cpp:5071
#11 0x00007fd03f78e0a5 in QObject::connectImpl (sender=sender@entry=0x562f32e0f1a0, signal=signal@entry=0x7ffdd047d850, receiver=receiver@entry=0x7fd02b40b650 <KSysGuard::SensorDaemonInterface::instance()::instance>, slot=slot@entry=0x7ffdd047d860, slotObj=0x562f32d0c9e0, type=Qt::AutoConnection, types=0x0, senderMetaObject=<optimized out>) at kernel/qobject.cpp:5001
#12 0x00007fd02b400a11 in QObject::connect<void (OrgKdeKSysGuardDaemonInterface::*)(QHash<QString, KSysGuard::SensorInfo> const&), void (KSysGuard::SensorDaemonInterface::*)(QHash<QString, KSysGuard::SensorInfo> const&)> (type=Qt::AutoConnection, slot=(void (KSysGuard::SensorDaemonInterface::*)(KSysGuard::SensorDaemonInterface * const, const QHash<QString, KSysGuard::SensorInfo> &)) 0x7fd02b3fd040 <KSysGuard::SensorDaemonInterface::onMetaDataChanged(QHash<QString, KSysGuard::SensorInfo> const&)>, receiver=0x7fd02b40b650 <KSysGuard::SensorDaemonInterface::instance()::instance>, signal=(void (OrgKdeKSysGuardDaemonInterface::*)(OrgKdeKSysGuardDaemonInterface * const, const QHash<QString, KSysGuard::SensorInfo> &)) 0x7fd02b3fcf00 <OrgKdeKSysGuardDaemonInterface::sensorMetaDataChanged(QHash<QString, KSysGuard::SensorInfo> const&)>, sender=0x562f32e0f1a0) at /usr/include/qt5/QtCore/qobject.h:268
#13 KSysGuard::SensorDaemonInterface::reconnect (this=0x7fd02b40b650 <KSysGuard::SensorDaemonInterface::instance()::instance>) at /usr/src/debug/libksysguard5-5.21.4-1.1.x86_64/sensors/SensorDaemonInterface.cpp:58
#14 0x00007fd03f796c17 in QtPrivate::QSlotObjectBase::call (a=0x7ffdd047d9a0, r=0x7fd02b40b650 <KSysGuard::SensorDaemonInterface::instance()::instance>, this=0x562f2e97e290) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#15 doActivate<false> (sender=0x562f2e97b2b0, signal_index=4, argv=argv@entry=0x7ffdd047d9a0) at kernel/qobject.cpp:3886
#16 0x00007fd03f78ff60 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7fd03fae66a0 <QDBusServiceWatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffdd047d9a0) at kernel/qobject.cpp:3946
#17 0x00007fd03fac8d75 in QDBusServiceWatcher::serviceUnregistered (this=<optimized out>, _t1=...) at .moc/moc_qdbusservicewatcher.cpp:235
#18 0x00007fd03fac963d in QDBusServiceWatcherPrivate::_q_serviceOwnerChanged (newOwner=..., oldOwner=..., service=..., this=<optimized out>) at qdbusservicewatcher.cpp:80
#19 0x00007fd03fac9b83 in QDBusServiceWatcher::qt_metacall (this=0x562f2e97b2b0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7ffdd047dac0) at .moc/moc_qdbusservicewatcher.cpp:197
#20 0x00007fd03fa7b8ea in QDBusConnectionPrivate::deliverCall (this=<optimized out>, object=<optimized out>, msg=..., metaTypes=..., slotIdx=<optimized out>) at qdbusintegrator.cpp:1001
#21 0x00007fd03f78ca2c in QObject::event (this=0x562f2e97b2b0, e=0x7fd02c05cbf0) at kernel/qobject.cpp:1314
#22 0x00007fd0403b8aff in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x562f2e97b2b0, e=0x7fd02c05cbf0) at kernel/qapplication.cpp:3632
#23 0x00007fd03f76013a in QCoreApplication::notifyInternal2 (receiver=0x562f2e97b2b0, event=0x7fd02c05cbf0) at kernel/qcoreapplication.cpp:1063
#24 0x00007fd03f7630b1 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x562f2da62260) at kernel/qcoreapplication.cpp:1817
#25 0x00007fd03f7b86b3 in postEventSourceDispatch (s=s@entry=0x562f2db3e1a0) at kernel/qeventdispatcher_glib.cpp:277
#26 0x00007fd03e1267e7 in g_main_dispatch (context=0x7fd034005000) at ../glib/gmain.c:3337
#27 g_main_context_dispatch (context=0x7fd034005000) at ../glib/gmain.c:4055
#28 0x00007fd03e126b68 in g_main_context_iterate (context=context@entry=0x7fd034005000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4131
#29 0x00007fd03e126c1f in g_main_context_iteration (context=0x7fd034005000, may_block=may_block@entry=1) at ../glib/gmain.c:4196
#30 0x00007fd03f7b7d30 in QEventDispatcherGlib::processEvents (this=0x562f2db41940, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#31 0x00007fd03f75eb7b in QEventLoop::exec (this=this@entry=0x7ffdd047df00, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#32 0x00007fd03f766db0 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#33 0x00007fd03fc57a9c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#34 0x00007fd0403b8a75 in QApplication::exec () at kernel/qapplication.cpp:2824
#35 0x0000562f2c6bdf75 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma5-systemmonitor-5.21.4-1.1.x86_64/src/main.cpp:133
[Inferior 1 (process 30423) detached]

Possible duplicates by query: bug 433013, bug 429344, bug 427384, bug 424911, bug 423951.

Reported using DrKonqi
Comment 1 Nate Graham 2021-04-21 19:29:35 UTC
#9  0x00007fd03e9942d0 in _dbus_warn_check_failed (format=0x7fd03e9a1c50 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus library.\n") at dbus-internals.c:281
#10 0x00007fd03fa81f69 in q_dbus_pending_call_block (pending=<optimized out>) at qdbus_symbols_p.h:450
Comment 2 torokati44 2021-05-05 15:53:17 UTC
Created attachment 138169 [details]
stack trace of a plasmashell crash

I got a few crashes with stack traces almost identical to this one.
But for me, the plasmashell program crashed, not systemmonitor.
Also, my system was nowhere near a low-memory thrashing situation.

See the attachment for the stack traces. I trimmed out a whole lot of threads that were just waiting for a futex, or in a poll syscall, and looked uninteresting.

Seeing that it affects multiple components, could this be a Qt bug?


Operating System: Fedora 34
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.17-300.fc34.x86_64
OS Type: 64-bit
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 2700X Eight-Core Processor
Memory: 31,3 GiB of RAM
Graphics Processor: Radeon RX 580 Series
Comment 3 torokati44 2021-05-05 16:05:11 UTC
Also cross-referencing:
https://bugs.kde.org/show_bug.cgi?id=425607
and:
https://bugreports.qt.io/browse/QTBUG-44836?jql=description%20~%20%22getNameOwnerNoCache*%22
In the hope that these might help...
Comment 4 David Edmundson 2021-05-06 14:56:00 UTC
*** Bug 436640 has been marked as a duplicate of this bug. ***
Comment 5 torokati44 2021-05-09 20:24:46 UTC
I'm also getting D-Bus-related plasmashell crashes when simply clicking on an application launcher icon.
This is the interesting part of plasmashell's console output while crashing when launching VLC (so it also contains some vlc output):


VLC media player 3.0.13 Vetinari (revision 3.0.12.1-158-g6977abc430)
kf.kio.gui: Failed to register new cgroup: "app-vlc-1520a4d6277f4b9e9b0e870b0add08ee.scope" "org.freedesktop.DBus.Error.Disconnected" "Not connected to D-Bus server"
[00005565cc2b19d0] main interface error: no suitable interface module
[00005565cc19bc80] main libvlc error: interface "svpcontrol,none" initialization failed
[00005565cc19bc80] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00005565cc23d310] main playlist: playlist is empty
kdeinit5: Shutting down running client.
klauncher: Exiting on signal 15
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit5: Shutting down running client.
klauncher: Exiting on signal 15
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kf.kio.core: couldn't create slave: "Cannot talk to klauncher: Not connected to D-Bus server"
dbus[106622]: arguments to dbus_pending_call_block() were incorrect, assertion "pending != NULL" failed in file ../../dbus/dbus-pending-call.c line 765.
This is normally a bug in some application using the D-Bus library.

  D-Bus not built with -rdynamic so unable to print a backtrace
KCrash: Attempting to start /usr/bin/plasmashell
KCrash: Application 'plasmashell' crashing...
kf.plasma.quick: Applet preload policy set to 1
qt.gui.icc: fromIccProfile: failed minimal tag size sanity
Comment 6 torokati44 2021-05-10 20:22:49 UTC
Now I got this crash upon receiving a message in an IM webapp, because Firefox tried to show a notification about it.
Comment 7 torokati44 2021-05-10 20:26:40 UTC
And immediately after, when I tried to restart Firefox, just by clicked on its launcher icon on the panel.
And right after that, I triggered https://bugs.kde.org/show_bug.cgi?id=436866 when I tried to unmute the sound (for some reason, when I restart plasmashell, it always mutes the system).

I really, _really_ want to use KDE on Wayland, but honestly, it's still quite hostile to me... :/
Comment 8 torokati44 2021-05-29 20:24:30 UTC
Created attachment 138870 [details]
New crash information added by DrKonqi

plasmashell (5.21.5) using Qt 5.15.2

- What I was doing when the application crashed:

I clicked on the "Konsole" launcher icon on the panel.
(And the tooltip for it was open, not sure if this matters).

-- Backtrace (Reduced):
#7  0x00007f0174da0010 in _dbus_warn_return_if_fail () at /lib64/libdbus-1.so.3
#8  0x00007f01768d2d79 in q_dbus_pending_call_block (pending=<optimized out>) at /usr/src/debug/qt5-qtbase-5.15.2-15.fc34.x86_64/src/dbus/qdbus_symbols_p.h:450
#9  QDBusConnectionPrivate::getNameOwnerNoCache(QString const&) (this=this@entry=0x7f0154003a00, serviceName=...) at qdbusintegrator.cpp:2563
#10 0x00007f01768d4d6b in QDBusConnectionPrivate::addSignalHook(QString const&, QDBusConnectionPrivate::SignalHook const&) (this=0x7f0154003a00, key=<optimized out>, hook=...) at qdbusintegrator.cpp:2298
#11 0x00007f01768d63d5 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<QString const&, QDBusConnectionPrivate::SignalHook const&>, bool, bool (QDBusConnectionPrivate::*)(QString const&, QDBusConnectionPrivate::SignalHook const&)>::call(bool (QDBusConnectionPrivate::*)(QString const&, QDBusConnectionPrivate::SignalHook const&), QDBusConnectionPrivate*, void**) (arg=<optimized out>, o=<optimized out>, f=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:152
Comment 9 David Edmundson 2021-06-14 15:05:23 UTC
This code subtly changed in 5.22, lets reopen if we see it then
Comment 10 torokati44 2021-08-10 13:15:51 UTC
I'm on Plasma 5.22.4 now.
While this issue feels like it happens somewhat less often nowadays, I still get a couple weird behaviors related to (I think) the D-Bus connection:

- Sometimes the icon of KTorrent doesn't appear in the System Tray applet when I open it
- Sometimes the icon appears, but the Minimize and Quit options are missing from its context menu
- Sometimes none of the options in the context menu of any application in the System Tray (let it be KTorrent, Discord, Discover, etc.) work, or do anything, when clicked
- Sometimes Firefox stops being able to show native desktop notifications, and switches to its own popup windows instead
- Plasma still just crashes from time to time, for no apparent reason whatsoever, during normal use (actually I don't know if this has anything to do with D-Bus, but it's possible)
Comment 11 torokati44 2021-08-10 13:20:12 UTC
I should also add, that since a couple releases ago, Fedora, the distro I use, comes with dbus-broker instead of the "original" dbus-daemon. This may or may not matter.
Comment 12 Nicolas Fella 2022-05-17 16:13:20 UTC
*** Bug 453931 has been marked as a duplicate of this bug. ***
Comment 13 TraceyC 2024-11-25 18:49:34 UTC
*** Bug 459466 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2024-11-25 19:06:35 UTC
Has anyone seen any more occurrences of this in Plasma 6 — ideally 6.2 or later? I can't reproduce it and haven't seen any reports of it within the past two years,