Bug 385867

Summary: Deadlock in SNI
Product: [Plasma] kwin Reporter: Martin Flöser <mgraesslin>
Component: virtual-keyboardAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde, simonandric5
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Martin Flöser 2017-10-17 15:51:26 UTC
Thread 1 (Thread 0x7f986f2b9e00 (LWP 21709)):
#0  0x00007f986781c15f in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f98651a66cb in QWaitConditionPrivate::wait(unsigned long) (time=18446744073709551615, this=0x55cabc6322d0) at thread/qwaitcondition_unix.cpp:143
#2  0x00007f98651a66cb in QWaitCondition::wait(QMutex*, unsigned long) (this=<optimized out>, mutex=0x55cabc632228, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:215
#3  0x00007f986a537c6b in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#4  0x00007f986a4f32d0 in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#5  0x00007f986a4e095b in QDBusConnection::call(QDBusMessage const&, QDBus::CallMode, int) const () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#6  0x00007f986a4fbf5d in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f986a4fe3df in QDBusAbstractInterfaceBase::qt_metacall(QMetaObject::Call, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007f986a4fe547 in QDBusAbstractInterface::qt_metacall(QMetaObject::Call, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#9  0x00007f986b0ac6ea in OrgKdeStatusNotifierWatcherInterface::qt_metacall(QMetaObject::Call, int, void**) (this=0x55cabc6a2910, _c=QMetaObject::ReadProperty, _id=1, _a=0x7fffd961d430)
    at /opt/build/kf5/frameworks/knotifications/src/statusnotifierwatcher_interface.moc:190
#10 0x00007f986539069a in QMetaProperty::read(QObject const*) const (this=this@entry=0x7fffd961d4a0, object=object@entry=0x55cabc6a2910) at kernel/qmetaobject.cpp:3039
#11 0x00007f98653afa70 in QObject::property(char const*) const (this=0x55cabc6a2910, name=0x7f986b0b2840 "IsStatusNotifierHostRegistered") at kernel/qobject.cpp:3946
#12 0x00007f986b08993a in KStatusNotifierItemPrivate::checkForRegisteredHosts() (this=0x55cabc6c65f0) at /home/martin/src/kf5/frameworks/knotifications/src/kstatusnotifieritem.cpp:877
#13 0x00007f986b08ac95 in KStatusNotifierItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55cabc694190, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x7fffd961d6d0)
    at /opt/build/kf5/frameworks/knotifications/src/KF5Notifications_autogen/include/moc_kstatusnotifieritem.cpp:187
#14 0x00007f98653b1865 in QMetaObject::activate(QObject*, int, int, void**) (sender=0x55cabc6a2910, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>)
    at kernel/qobject.cpp:3766
#15 0x00007f986b0ac7e1 in OrgKdeStatusNotifierWatcherInterface::StatusNotifierHostRegistered() (this=0x55cabc6a2910)
    at /opt/build/kf5/frameworks/knotifications/src/statusnotifierwatcher_interface.moc:225
#16 0x00007f986b0ac322 in OrgKdeStatusNotifierWatcherInterface::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55cabc6a2910, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffd961d8d0) at /opt/build/kf5/frameworks/knotifications/src/statusnotifierwatcher_interface.moc:110
#17 0x00007f986b0ac71d in OrgKdeStatusNotifierWatcherInterface::qt_metacall(QMetaObject::Call, int, void**) (this=0x55cabc6a2910, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffd961d8d0)---Type <return> to continue, or q <return> to quit---
 at /opt/build/kf5/frameworks/knotifications/src/statusnotifierwatcher_interface.moc:195
#18 0x00007f986a4eb1f8 in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#19 0x00007f98653b23d2 in QObject::event(QEvent*) (this=0x55cabc6a2910, e=<optimized out>) at kernel/qobject.cpp:1246
#20 0x00007f986630146c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f9866308d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f9865382d68 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55cabc6a2910, event=event@entry=0x7f984c00fe40) at kernel/qcoreapplication.cpp:1018
#23 0x00007f98653854dd in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x7f984c00fe40, receiver=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:233
#24 0x00007f98653854dd in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55cabbbba440) at kernel/qcoreapplication.cpp:1678
#25 0x00007f98653d8604 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55cabbbed930, flags=...) at kernel/qeventdispatcher_unix.cpp:466
#26 0x00007f98548815fd in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /opt/kf5/lib/x86_64-linux-gnu/plugins/platforms/KWinQpaPlugin.so
#27 0x00007f9865380dba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffd961ddf0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#28 0x00007f9865389d24 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1291
#29 0x000055cab9ed08e4 in main(int, char**) (argc=4, argv=0x7fffd961e718) at /home/martin/src/kf5/kde/workspace/kwin/main_wayland.cpp:818
Comment 1 David Edmundson 2017-10-19 16:15:22 UTC
Git commit 588151c5e00096953420bd53a520480c6bc7b115 by David Edmundson.
Committed on 19/10/2017 at 16:14.
Pushed by davidedmundson into branch 'master'.

Remove check for SNI hosts when chosing whether to use legacy mode

Summary:
Previous code (since very first commit) checked for both having a valid
KSNI watcher as well as making sure there was a host available in order
to choose which mode to use.

This made some sense when Plasma 4 still had proper xembed support and
one could turn SNIs off.

The current code here is broken. On first creation we only check for a
watcher - and only ends up checking for the host if it changes at
runtime.

Given it's not working properly, and the use case has changed it seems
we can safely remove this code.

This removes a blocking DBus call on the property.

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: graesslin, #frameworks

Tags: #frameworks

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

M  +0    -10   src/kstatusnotifieritem.cpp
M  +0    -1    src/kstatusnotifieritem.h

https://commits.kde.org/knotifications/588151c5e00096953420bd53a520480c6bc7b115