Bug 384441

Summary: Freeze caused by Plasma DialogShadows
Product: [Plasma] kwin Reporter: Martin Flöser <mgraesslin>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: critical CC: kde, notmart
Priority: NOR Flags: mgraesslin: Wayland+
mgraesslin: X11-
mgraesslin: ReviewRequest+
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://phabricator.kde.org/D7712
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Martin Flöser 2017-09-06 17:51:29 UTC
Steps to reproduce:
1. kwin_wayland --xwayland kwrite konsole
2. Alt+Tab

Expected behavior:
Alt+Tab shows

Actual behavior:
freeze due to recursion into DialogShadows global object:

Thread 1 "kwin_wayland" received signal SIGINT, Interrupt.
syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
38      ../sysdeps/unix/sysv/linux/x86_64/syscall.S: No such file or directory.
(gdb) bt
#0  0x00007f317eca9219 in syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f317f50ce09 in __cxa_guard_acquire () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00007f30b8f400f7 in (anonymous namespace)::Q_QGS_privateDialogShadowsSelf::innerFunction() ()
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialogshadows.cpp:130
#3  0x00007f30b8f43d4d in QGlobalStatic<DialogShadowsSingleton, (anonymous namespace)::Q_QGS_privateDialogShadowsSelf::innerFunction, (anonymous namespace)::Q_QGS_privateDialogShadowsSelf::guard>::operator->() (this=0x7f30b9189608 <privateDialogShadowsSelf>)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobalstatic.h:139
#4  0x00007f30b8f4028c in DialogShadows::self() () at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialogshadows.cpp:147
#5  0x00007f30b8f36e55 in PlasmaQuick::DialogPrivate::updateTheme() (this=0x55c639d79920)
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialog.cpp:265
#6  0x00007f30b8f393fd in PlasmaQuick::DialogPrivate::slotWindowPositionChanged() (this=0x55c639d79920)
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialog.cpp:682
#7  0x00007f30b8f399cb in PlasmaQuick::Dialog::<lambda()>::operator()(void) const (__closure=0x55c639d79d60)
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialog.cpp:745
#8  0x00007f30b8f3e2a0 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, PlasmaQuick::Dialog::Dialog(QQuickItem*)::<lambda()> >::call(PlasmaQuick::Dialog::<lambda()> &, void **) (f=..., arg=0x7fff0f520350) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#9  0x00007f30b8f3e257 in QtPrivate::Functor<PlasmaQuick::Dialog::Dialog(QQuickItem*)::<lambda()>, 0>::call<QtPrivate::List<>, void>(PlasmaQuick::Dialog::<lambda()> &, void *, void **) (f=..., arg=0x7fff0f520350) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#10 0x00007f30b8f3e19f in QtPrivate::QFunctorSlotObject<PlasmaQuick::Dialog::Dialog(QQuickItem*)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x55c639d79d50, r=0x55c639d78e40, a=0x7fff0f520350, ret=0x0)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#11 0x00007f317ffd297f in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fff0f520350, r=0x55c639d78e40, this=0x55c639d79d50)
---Type <return> to continue, or q <return> to quit---
    at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#12 0x00007f317ffd297f in QMetaObject::activate(QObject*, int, int, void**) (sender=0x55c639d78e40, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3749
#13 0x00007f3180566ce1 in QWindow::xChanged(int) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#14 0x00007f316f4751f4 in KWin::QPA::Window::setGeometry(QRect const&) (this=0x55c63a084710, rect=...)
    at /home/martin/src/kf5/kde/workspace/kwin/plugins/qpa/window.cpp:86
#15 0x00007f31805692e4 in QWindow::setGeometry(QRect const&) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#16 0x00007f3189571a49 in KWin::ShellClient::syncGeometryToInternalWindow() (this=0x55c63a0f8e20)
    at /home/martin/src/kf5/kde/workspace/kwin/shell_client.cpp:546
#17 0x00007f318957186d in KWin::ShellClient::doSetGeometry(QRect const&) (this=0x55c63a0f8e20, rect=...)
    at /home/martin/src/kf5/kde/workspace/kwin/shell_client.cpp:520
#18 0x00007f31895740e0 in KWin::ShellClient::<lambda()>::operator()(void) const (__closure=0x7fff0f520670)
    at /home/martin/src/kf5/kde/workspace/kwin/shell_client.cpp:1104
#19 0x00007f3189574572 in KWin::ShellClient::installPlasmaShellSurface(KWayland::Server::PlasmaShellSurfaceInterface*) (this=0x55c63a0f8e20, surface=0x55c63a0f20c0) at /home/martin/src/kf5/kde/workspace/kwin/shell_client.cpp:1159
#20 0x00007f318957e443 in KWin::WaylandServer::<lambda(KWayland::Server::PlasmaShellSurfaceInterface*)>::operator()(KWayland::Server::PlasmaShellSurfaceInterface *) const (__closure=0x55c6391135d0, surface=0x55c63a0f20c0) at /home/martin/src/kf5/kde/workspace/kwin/wayland_server.cpp:234
#21 0x00007f31895838c8 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KWayland::Server::PlasmaShellSurfaceInterface*>, void, KWin::WaylandServer::init(const QByteArray&, KWin::WaylandServer::InitalizationFlags)::<lambda(KWayland::Server::PlasmaShellSurfaceInterface*)> >::call(KWin::WaylandServer::<lambda(KWayland::Server::PlasmaShellSurfaceInterface*)> &, void **) (f=..., arg=0x7fff0f520920)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#22 0x00007f3189583581 in QtPrivate::Functor<KWin::WaylandServer::init(const QByteArray&, KWin::WaylandServer::InitalizationFlags)::<lambda(KWayland::Serv---Type <return> to continue, or q <return> to quit---
er::PlasmaShellSurfaceInterface*)>, 1>::call<QtPrivate::List<KWayland::Server::PlasmaShellSurfaceInterface*>, void>(KWin::WaylandServer::<lambda(KWayland::Server::PlasmaShellSurfaceInterface*)> &, void *, void **) (f=..., arg=0x7fff0f520920)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#23 0x00007f3189583132 in QtPrivate::QFunctorSlotObject<KWin::WaylandServer::init(const QByteArray&, KWin::WaylandServer::InitalizationFlags)::<lambda(KWayland::Server::PlasmaShellSurfaceInterface*)>, 1, QtPrivate::List<KWayland::Server::PlasmaShellSurfaceInterface*>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x55c6391135c0, r=0x55c639113420, a=0x7fff0f520920, ret=0x0)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#24 0x00007f317ffd297f in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fff0f520920, r=0x55c639113420, this=0x55c6391135c0)
    at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#25 0x00007f317ffd297f in QMetaObject::activate(QObject*, int, int, void**) (sender=0x55c639113420, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3749
#26 0x00007f3182b38e9f in KWayland::Server::PlasmaShellInterface::surfaceCreated(KWayland::Server::PlasmaShellSurfaceInterface*) (this=0x55c639113420, _t1=0x55c63a0f20c0) at /opt/build/kf5/frameworks/kwayland/src/server/KF5WaylandServer_autogen/EWIEGA46WW/moc_plasmashell_interface.cpp:141
#27 0x00007f3182aec2e3 in KWayland::Server::PlasmaShellInterface::Private::createSurface(wl_client*, unsigned int, unsigned int, KWayland::Server::SurfaceInterface*, wl_resource*) (this=0x55c639113440, client=0x55c639120f50, version=4, id=21, surface=0x55c639d1a210, parentResource=0x55c63a0f2d80)
    at /home/martin/src/kf5/frameworks/kwayland/src/server/plasmashell_interface.cpp:146
#28 0x00007f3182aec0c2 in KWayland::Server::PlasmaShellInterface::Private::createSurfaceCallback(wl_client*, wl_resource*, unsigned int, wl_resource*) (client=0x55c639120f50, resource=0x55c63a0f2d80, id=21, surface=0x55c63a0f4350)
    at /home/martin/src/kf5/frameworks/kwayland/src/server/plasmashell_interface.cpp:124
#29 0x00007f3176be6038 in ffi_call_unix64 () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#30 0x00007f3176be5a9a in ffi_call () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#31 0x00007f317c2caa3b in  () at /usr/lib/x86_64-linux-gnu/libwayland-server.so.0
---Type <return> to continue, or q <return> to quit---
#32 0x00007f317c2c727f in  () at /usr/lib/x86_64-linux-gnu/libwayland-server.so.0
#33 0x00007f317c2c8c12 in wl_event_loop_dispatch () at /usr/lib/x86_64-linux-gnu/libwayland-server.so.0
#34 0x00007f3182abcc54 in KWayland::Server::Display::Private::dispatch() (this=0x55c639110010)
    at /home/martin/src/kf5/frameworks/kwayland/src/server/display.cpp:134
#35 0x00007f3182abd0aa in KWayland::Server::Display::dispatchEvents(int) (this=0x55c639110260, msecTimeout=0)
    at /home/martin/src/kf5/frameworks/kwayland/src/server/display.cpp:180
#36 0x00007f3189580051 in KWin::WaylandServer::dispatch() (this=0x55c639110070) at /home/martin/src/kf5/kde/workspace/kwin/wayland_server.cpp:545
#37 0x00007f316f47360f in KWin::QPA::roundtrip() () at /home/martin/src/kf5/kde/workspace/kwin/plugins/qpa/nativeinterface.cpp:94
#38 0x00007f3182de687d in KWayland::Client::ConnectionThread::roundtrip() (this=0x55c63a0f3e60)
    at /home/martin/src/kf5/frameworks/kwayland/src/client/connection_thread.cpp:282
#39 0x00007f30b8f43b6d in DialogShadows::Private::setupWaylandIntegration() (this=0x55c63a0f8420)
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialogshadows.cpp:741
#40 0x00007f30b8f446eb in DialogShadows::Private::Private(DialogShadows*) (this=0x55c63a0f8420, shadows=
    0x7f30b91895e0 <(anonymous namespace)::Q_QGS_privateDialogShadowsSelf::innerFunction()::holder>)
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialogshadows.cpp:56
#41 0x00007f30b8f40190 in DialogShadows::DialogShadows(QObject*, QString const&) (this=0x7f30b91895e0 <(anonymous namespace)::Q_QGS_privateDialogShadowsSelf::innerFunction()::holder>, parent=0x0, prefix=...) at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialogshadows.cpp:134
#42 0x00007f30b8f447fe in DialogShadowsSingleton::DialogShadowsSingleton() (this=0x7f30b91895e0 <(anonymous namespace)::Q_QGS_privateDialogShadowsSelf::innerFunction()::holder>) at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialogshadows.cpp:124
#43 0x00007f30b8f4009c in (anonymous namespace)::Q_QGS_privateDialogShadowsSelf::Holder::Holder() (this=0x7f30b91895e0 <(anonymous namespace)::Q_QGS_privateDialogShadowsSelf::innerFunction()::holder>) at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialogshadows.cpp:130
#44 0x00007f30b8f4010c in (anonymous namespace)::Q_QGS_privateDialogShadowsSelf::innerFunction() ()
---Type <return> to continue, or q <return> to quit---
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialogshadows.cpp:130
#45 0x00007f30b8f43d4d in QGlobalStatic<DialogShadowsSingleton, (anonymous namespace)::Q_QGS_privateDialogShadowsSelf::innerFunction, (anonymous namespace)::Q_QGS_privateDialogShadowsSelf::guard>::operator->() (this=0x7f30b9189608 <privateDialogShadowsSelf>)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobalstatic.h:139
#46 0x00007f30b8f4028c in DialogShadows::self() () at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialogshadows.cpp:147
#47 0x00007f30b8f36e55 in PlasmaQuick::DialogPrivate::updateTheme() (this=0x55c639d79920)
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialog.cpp:265
#48 0x00007f30b8f38d2a in PlasmaQuick::DialogPrivate::syncToMainItemSize() (this=0x55c639d79920)
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialog.cpp:614
#49 0x00007f30b8f371ed in PlasmaQuick::DialogPrivate::updateVisibility(bool) (this=0x55c639d79920, visible=true)
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialog.cpp:301
#50 0x00007f30b8f3c42f in PlasmaQuick::Dialog::event(QEvent*) (this=0x55c639d78e40, event=0x7fff0f521a80)
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialog.cpp:1202
#51 0x00007f3180f2246c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#52 0x00007f3180f29d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#53 0x00007f317ffa3d68 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55c639d78e40, event=0x7fff0f521a80)
    at kernel/qcoreapplication.cpp:1018
#54 0x00007f318056c89e in QWindow::setVisible(bool) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#55 0x00007f30b8f3d206 in PlasmaQuick::Dialog::setVisible(bool) (this=0x55c639d78e40, visible=true)
    at /home/martin/src/kf5/frameworks/plasma-framework/src/plasmaquick/dialog.cpp:1379
#56 0x00007f30b8f3db16 in PlasmaQuick::Dialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55c639d78e40, _c=QMetaObject::WriteProperty, _id=9, _a=0x7fff0f521c50) at /opt/build/kf5/frameworks/plasma-framework/src/plasmaquick/KF5PlasmaQuick_autogen/include/moc_dialog.cpp:348
---Type <return> to continue, or q <return> to quit---
#57 0x00007f3187b34ed3 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const (flags=..., value=<optimized out>, target=<optimized out>, this=<optimized out>) at ../../include/QtQml/5.9.1/QtQml/private/../../../../../src/qml/qml/qqmlpropertycache_p.h:320
#58 0x00007f3187b34ed3 in GenericBinding<1>::doStore<bool>(bool, QQmlPropertyData const*, QFlags<QQmlPropertyData::WriteFlag>) const (flags=..., pd=<optimized out>, value=<optimized out>, this=<optimized out>) at qml/qqmlbinding.cpp:295
#59 0x00007f3187b34ed3 in GenericBinding<1>::write(QV4::Value const&, bool, QFlags<QQmlPropertyData::WriteFlag>) (this=0x55c639d7c2c0, result=..., isUndefined=<optimized out>, flags=...) at qml/qqmlbinding.cpp:259
#60 0x00007f3187b3511e in QQmlNonbindingBinding::doUpdate(QQmlJavaScriptExpression::DeleteWatcher const&, QFlags<QQmlPropertyData::WriteFlag>, QV4::Scope&) (this=0x55c639d7c2c0, watcher=..., flags=..., scope=...) at qml/qqmlbinding.cpp:210
#61 0x00007f3187b31ee3 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) (this=0x55c639d7c2c0, flags=...) at qml/qqmlbinding.cpp:167
#62 0x00007f3187b08b03 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (endpoint=<optimized out>, a=a@entry=0x0) at qml/qqmlnotifier.cpp:106
#63 0x00007f3187aa7aa9 in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) (object=0x55c639f9fae0, index=<optimized out>, a=0x0)
    at qml/qqmlengine.cpp:839
#64 0x00007f317ffd209f in QMetaObject::activate(QObject*, int, int, void**) (sender=0x55c639f9fae0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3643
#65 0x00007f31895f2361 in KWin::TabBox::SwitcherItem::visibleChanged() (this=0x55c639f9fae0)
    at /opt/build/kf5/kde/workspace/kwin/kwin_autogen/WF44ZIICEP/moc_switcheritem.cpp:274
#66 0x00007f31895b0d1f in KWin::TabBox::SwitcherItem::setVisible(bool) (this=0x55c639f9fae0, visible=true)
    at /home/martin/src/kf5/kde/workspace/kwin/tabbox/switcheritem.cpp:76
#67 0x00007f31895b3667 in KWin::TabBox::TabBoxHandlerPrivate::show() (this=0x55c6398a8b50)
    at /home/martin/src/kf5/kde/workspace/kwin/tabbox/tabboxhandler.cpp:342
#68 0x00007f31895b384e in KWin::TabBox::TabBoxHandler::show() (this=0x55c6398b4040)
    at /home/martin/src/kf5/kde/workspace/kwin/tabbox/tabboxhandler.cpp:384
---Type <return> to continue, or q <return> to quit---
#69 0x00007f31895a3c5d in KWin::TabBox::TabBox::show() (this=0x55c6393d87d0) at /home/martin/src/kf5/kde/workspace/kwin/tabbox/tabbox.cpp:767
#70 0x00007f31895f2558 in KWin::TabBox::TabBox::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55c6393d87d0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fff0f523aa0) at /opt/build/kf5/kde/workspace/kwin/kwin_autogen/WF44ZIICEP/moc_tabbox.cpp:174
#71 0x00007f317ffd2865 in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x55c6393d87f8, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff0f523aa0) at kernel/qobject.cpp:3766
#72 0x00007f317ffd2f37 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x55c6393d87f8, m=m@entry=0x7f318045bea0 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff0f523aa0) at kernel/qobject.cpp:3628
#73 0x00007f317ffdf337 in QTimer::timeout(QTimer::QPrivateSignal) (this=this@entry=0x55c6393d87f8, _t1=...) at .moc/moc_qtimer.cpp:201
#74 0x00007f317ffdf698 in QTimer::timerEvent(QTimerEvent*) (this=0x55c6393d87f8, e=<optimized out>) at kernel/qtimer.cpp:255
#75 0x00007f317ffd338b in QObject::event(QEvent*) (this=0x55c6393d87f8, e=<optimized out>) at kernel/qobject.cpp:1268
#76 0x00007f3180f2246c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#77 0x00007f3180f29d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#78 0x00007f317ffa3d68 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55c6393d87f8, event=event@entry=0x7fff0f523da0)
    at kernel/qcoreapplication.cpp:1018
#79 0x00007f317fffb89e in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x7fff0f523da0, receiver=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:233
#80 0x00007f317fffb89e in QTimerInfoList::activateTimers() (this=this@entry=0x55c6390f35a0) at kernel/qtimerinfo_unix.cpp:643
#81 0x00007f317fff8c7c in QEventDispatcherUNIXPrivate::activateTimers() (this=this@entry=0x55c6390f3500) at kernel/qeventdispatcher_unix.cpp:249
#82 0x00007f317fff9a52 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...)
    at kernel/qeventdispatcher_unix.cpp:514
#83 0x00007f316f4b36bd in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /opt/kf5/lib/x86_64-linux-gnu/plugins/platforms/KWinQpaPlugin.so
---Type <return> to continue, or q <return> to quit---
#84 0x00007f317ffa1dba in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff0f523f60, flags=..., flags@entry=...)
    at kernel/qeventloop.cpp:212
#85 0x00007f317ffaad24 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1291
#86 0x000055c638ce84e2 in main(int, char**) (argc=6, argv=0x7fff0f524888) at /home/martin/src/kf5/kde/workspace/kwin/main_wayland.cpp:763
Comment 1 Martin Flöser 2017-09-06 19:06:53 UTC
Patch at: https://phabricator.kde.org/D7712
Comment 2 Martin Flöser 2017-09-07 17:10:22 UTC
Git commit e0f95fd913b6e7c9106ca153c0dd1e3d46c9e297 by Martin Flöser.
Committed on 07/09/2017 at 17:06.
Pushed by graesslin into branch 'master'.

Delay syncing internal window geometry to end of cycle

Summary:
The syncing of the window geometry to the internal geometry can
unfortunately cause a freeze in very special conditions:
1. create QML component
2. a Plasma::Dialog gets created
3. It creates the DialogShadows
4. This triggers QGlobalStatic creation which locks a non-recursive
mutex
5. The creation of DialogShadows creates a Registry and triggers a
roundtrip on the Wayland server
6. KWin processes all Wayland events
7. This triggers the creation of a ShellClient
8. The ShellClient has a PlasmaShellSurface which requested a position
9. The new geometry does not match the geometry of the Plasma::Dialog
10. ShellClient syncs the geometry to the Plasma::Dialog
11. Plasma::Dialog updates the theme because window geometry changed
12. This accesses the DialogShadows...

which is still in the non recursive mutex and we have a freeze.

By delaying the sync to the end of cycle we jump out of this deadly
sequence.

Test Plan:
The freeze doesn't hit any more. It's possible that some test
cases need adjustments.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

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

M  +3    -3    autotests/integration/internal_window.cpp
M  +2    -1    shell_client.cpp

https://commits.kde.org/kwin/e0f95fd913b6e7c9106ca153c0dd1e3d46c9e297