Bug 385371 - DBus times out for StatusNotifierItem
Summary: DBus times out for StatusNotifierItem
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: virtual-keyboard (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D8163
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-04 19:30 UTC by Martin Flöser
Modified: 2017-10-17 07:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
mgraesslin: Wayland+
mgraesslin: X11-
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Flöser 2017-10-04 19:30:44 UTC
Backtrace of hanging KWin:

Thread 1 (Thread 0x7fb96704be00 (LWP 7509)):
#0  0x00007fb95f5c815f in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fb95cf536cb in QWaitConditionPrivate::wait(unsigned long) (time=18446744073709551615, this=0x5611046c9c10) at thread/qwaitcondition_unix.cpp:143
#2  0x00007fb95cf536cb in QWaitCondition::wait(QMutex*, unsigned long) (this=<optimized out>, mutex=0x5611046ca448, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:215
#3  0x00007fb9622c7c6b in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#4  0x00007fb9622832d0 in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#5  0x00007fb962283a9d in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#6  0x00007fb96228f08d in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007fb96228f205 in QDBusInterface::QDBusInterface(QString const&, QString const&, QString const&, QDBusConnection const&, QObject*) () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007fb94bf491bf in KDEPlatformSystemTrayIcon::isSystemTrayAvailable() const () at /opt/kf5/lib/x86_64-linux-gnu/plugins/platformthemes/KDEPlasmaPlatformTheme.so
#9  0x00007fb95e4147fc in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007fb962e19b2f in KStatusNotifierItemPrivate::setLegacySystemTrayEnabled(bool) (this=0x561104273080, enabled=true)
    at /home/martin/src/kf5/frameworks/knotifications/src/kstatusnotifieritem.cpp:914
#11 0x00007fb962e1906a in KStatusNotifierItemPrivate::<lambda()>::operator()(void) const (__closure=0x5611046c9e50)
    at /home/martin/src/kf5/frameworks/knotifications/src/kstatusnotifieritem.cpp:839
#12 0x00007fb962e1bbe4 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KStatusNotifierItemPrivate::registerToDaemon()::<lambda()> >::call(KStatusNotifierItemPrivate::<lambda()> &, void **) (f=..., arg=0x7ffc291d89e0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#13 0x00007fb962e1bb39 in QtPrivate::Functor<KStatusNotifierItemPrivate::registerToDaemon()::<lambda()>, 0>::call<QtPrivate::List<>, void>(KStatusNotifierItemPrivate::<lambda()> &, void *, ---Type <return> to continue, or q <return> to quit---
void **) (f=..., arg=0x7ffc291d89e0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#14 0x00007fb962e1bab3 in QtPrivate::QFunctorSlotObject<KStatusNotifierItemPrivate::registerToDaemon()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x5611046c9e40, r=0x561104273020, a=0x7ffc291d89e0, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#15 0x00007fb95d15e97f in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffc291d89e0, r=0x561104273020, this=0x5611046c9e40)
    at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#16 0x00007fb95d15e97f in QMetaObject::activate(QObject*, int, int, void**) (sender=0x5611038c1a50, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>)
    at kernel/qobject.cpp:3749
#17 0x00007fb9622c742f in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#18 0x00007fb95d15f3d2 in QObject::event(QEvent*) (this=0x5611038c1a50, e=<optimized out>) at kernel/qobject.cpp:1246
#19 0x00007fb95e0ae46c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007fb95e0b5d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007fb95d12fd68 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5611038c1a50, event=event@entry=0x7fb94400ca90) at kernel/qcoreapplication.cpp:1018
#22 0x00007fb95d1324dd in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x7fb94400ca90, receiver=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:233
#23 0x00007fb95d1324dd in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x561103402440) at kernel/qcoreapplication.cpp:1678
#24 0x00007fb95d185604 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x56110341c9d0, flags=...) at kernel/qeventdispatcher_unix.cpp:466
#25 0x00007fb94c6395fd in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /opt/kf5/lib/x86_64-linux-gnu/plugins/platforms/KWinQpaPlugin.so
#26 0x00007fb95d12ddba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffc291d8e90, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#27 0x00007fb95d136d24 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1291
#28 0x0000561102b838e4 in main(int, char**) (argc=4, argv=0x7ffc291d97b8) at /home/martin/src/kf5/kde/workspace/kwin/main_wayland.cpp:818
Comment 1 Martin Flöser 2017-10-04 19:51:38 UTC
@Marco: do you have any ideas what we can do here? I think the problem is that KWin tries to talk to status notifier watcher in blocking DBus while status notifier watcher (kded?) talks to Wayland.

My first idea was to move the KSni in KWin into a QThread. But after reading code I don't think that's possible at all...
Comment 2 David Edmundson 2017-10-17 07:08:34 UTC
Git commit 800908eaec7a0e93d7b25b51be0065332eed0427 by David Edmundson.
Committed on 17/10/2017 at 07:08.
Pushed by davidedmundson into branch 'master'.

Only check for legacy system tray icons if we're going to make one

Summary:
On Plasma is a rather pointless check as our QPT uses SNIs
so we end up checking something we've already checked,
only in a blocking way - and we're going to no-op anyway.

Test Plan:
killed kded5
created an SNI. It failed into the else branch

Reviewers: #plasma

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D8321

M  +3    -4    src/kstatusnotifieritem.cpp

https://commits.kde.org/knotifications/800908eaec7a0e93d7b25b51be0065332eed0427