Bug 344145 - ksmserver randomly hangs after suspend
Summary: ksmserver randomly hangs after suspend
Status: RESOLVED WORKSFORME
Alias: None
Product: kscreenlocker
Classification: Plasma
Component: library (show other bugs)
Version: unspecified
Platform: Chakra Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-14 05:10 UTC by Weng Xuetian
Modified: 2015-12-18 20:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Weng Xuetian 2015-02-14 05:10:09 UTC
Related backtrace obtained by gdb when ksmserver hangs.

#0  0x00007f2813c338bf in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f28146fb78d in _XReply () from /usr/lib/libX11.so.6
#2  0x00007f28146fe171 in ?? () from /usr/lib/libX11.so.6
#3  0x00007f28146fd911 in _XError () from /usr/lib/libX11.so.6
#4  0x00007f28146fa867 in ?? () from /usr/lib/libX11.so.6
#5  0x00007f28146fa925 in ?? () from /usr/lib/libX11.so.6
#6  0x00007f28146fb865 in _XReply () from /usr/lib/libX11.so.6
#7  0x00007f28146f718d in XSync () from /usr/lib/libX11.so.6
#8  0x00007f2802dcf020 in ScreenLocker::KSldApp::establishGrab (this=<optimized out>)
    at /chakra/desktop-testing/plasma-workspace/src/plasma-workspace-5.2.0/ksmserver/screenlocker/ksldapp.cpp:341
#9  0x00007f2802dcfae4 in ScreenLocker::KSldApp::lock (this=0x24c1e70, establishLock=ScreenLocker::EstablishLock::Immediate)
    at /chakra/desktop-testing/plasma-workspace/src/plasma-workspace-5.2.0/ksmserver/screenlocker/ksldapp.cpp:310
#10 0x00007f28144a354a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#11 0x00007f2802dda3b2 in LogindIntegration::prepareForSleep (this=<optimized out>, _t1=true)
    at /chakra/desktop-testing/plasma-workspace/src/build/ksmserver/screenlocker/moc_logind.cpp:183
#12 0x00007f2802ddaaf3 in LogindIntegration::qt_metacall (this=0x24c8d20, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffe01e1090)
    at /chakra/desktop-testing/plasma-workspace/src/build/ksmserver/screenlocker/moc_logind.cpp:151
#13 0x00007f280a2a1417 in ?? () from /usr/lib/libQt5DBus.so.5
#14 0x00007f28144a4d3a in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#15 0x00007f28127b4e0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007f28127ba360 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#17 0x00007f28144742cb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#18 0x00007f281447630b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#19 0x00007f28144cb533 in ?? () from /usr/lib/libQt5Core.so.5
#20 0x00007f2810ec0a1d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#21 0x00007f2810ec0d08 in ?? () from /usr/lib/libglib-2.0.so.0
#22 0x00007f2810ec0dbc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#23 0x00007f28144cb927 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#24 0x00007f2814471d62 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#25 0x00007f281447971c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#26 0x00007f2802db1dbd in kdemain (argc=1, argv=<optimized out>) at /chakra/desktop-testing/plasma-workspace/src/plasma-workspace-5.2.0/ksmserver/main.cpp:330
#27 0x00000000004083cc in ?? ()
#28 0x0000000000409bc9 in ?? ()
#29 0x000000000040a216 in ?? ()
#30 0x0000000000404fa2 in main ()


Reproducible: Sometimes

Steps to Reproduce:
close laptop lid to suspend


Actual Results:  
lock screen shows and locks properly, but randomly ksmserver will hang. And when this happens, all new Qt application can not be started because they all stuck at QSessionManager which is trying to talk to ksmserver.

Expected Results:  
no hang/deadlock happens.
Comment 1 Martin Flöser 2015-02-16 08:38:49 UTC
the line in question is:
XSync(QX11Info::display(), False);

this can also be seen in the backtrace: it hangs in XLib. I fear there is nothing we can do about it and it's an issue in Xlib or the Xserver. Please try to get debug symbols for XLib to get a better backtrace.
Comment 2 Shmerl 2015-11-13 02:04:43 UTC
I'm not sure if it's the same or similar bug, but for me, quite often when trying to shutdown (using KDE shutdown from the applications launcher menu), ksmserver starts eating 100% CPU and the shutdown dialog doesn't even come up. Please let me know how to identify the issue better, or if it's worth filing a separate bug for it.
Comment 3 Shmerl 2015-11-13 02:09:05 UTC
My system: current Debian testing x86_64, plasma-workspace (with ksmserver) 5.4.2.
Comment 4 Martin Flöser 2015-12-15 17:03:50 UTC
are you still experiencing this problem?
Comment 5 Shmerl 2015-12-15 17:11:28 UTC
Actually not, recently it didn't happen anymore.
Comment 6 Weng Xuetian 2015-12-15 17:55:17 UTC
Me neither, probably close it as worksforme?
Comment 7 Martin Flöser 2015-12-15 18:00:03 UTC
thanks for the quick reply. setting to worksforme.
Comment 8 Shmerl 2015-12-18 20:29:44 UTC
Just happened to me again - ksmserver eating 100% on shutdown and dialog not coming up...