Every now and then, my KDE session loses the ability to start new applications, unless I unset $SESSION_MANAGER. Debugging applications indicates that they are stuck trying to communicate with the session manager (i.e. ksmserver). The stack trace for ksmserver seems to indicate that it is stuck in a read. This has happened to me at least three times in the last few months, and seems to be happening within some hours or days after updating KDE packages. IIRC it eventually (hours or days later) started working again on one occasion. Reproducible: Sometimes Steps to Reproduce: 1. Install some KDE updates (package containing ksmserver seems to be a likely suspect.) 2. Continue using the system normally for a few days without logging out. Actual Results: At some point, new applications start hanging on startup. ksmserver's stack: #0 0x0000003866e0e87d in read () at ../sysdeps/unix/syscall-template.S:81 #1 0x000000386aa082e7 in read (__nbytes=418, __buf=0x7ffff8e0b2fe, __fd=<optimized out>) at /usr/include/bits/unistd.h:44 #2 _IceTransSocketRead (ciptr=0x1dbef30, buf=0x7ffff8e0b2fe "", size=418) at /usr/include/X11/Xtrans/Xtranssock.c:2116 #3 0x000000386aa0c7d8 in _IceRead (iceConn=iceConn@entry=0x1ec6e20, nbytes=nbytes@entry=512, ptr=0x7ffff8e0b2fe "", ptr@entry=0x7ffff8e0b2a0 "name=\"GetVariable\" returntype=\"xml\"><arguments><string>$version</string></arguments></invoke>\n") at misc.c:228 #4 0x000000386aa0c92c in _IceReadSkip (iceConn=iceConn@entry=0x1ec6e20, nbytes=53173112) at misc.c:324 #5 0x000000386aa109a7 in IceProcessMessages (iceConn=0x1ec6e20, replyWait=0x0, replyReadyRet=0x0) at process.c:366 #6 0x0000003bbe216926 in KSMServer::processData (this=0x1e1eb40) at /usr/src/debug/kde-workspace-4.11.8/ksmserver/server.cpp:790 #7 0x0000003bbe21b43b in KSMServer::qt_static_metacall (_o=0x1e1eb40, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at /usr/src/debug/kde-workspace-4.11.8/x86_64-redhat-linux-gnu/ksmserver/server.moc:116 #8 0x0000003870798cf8 in QMetaObject::activate (sender=sender@entry=0x1dc37f0, m=m@entry=0x3870ae8960 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffff8e0b6e0) at kernel/qobject.cpp:3547 #9 0x00000038707e649e in QSocketNotifier::activated (this=this@entry=0x1dc37f0, _t1=75) at .moc/release-shared/moc_qsocketnotifier.cpp:102 #10 0x00000038707a1f2b in QSocketNotifier::event (this=0x1dc37f0, e=0x7ffff8e0ba70) at kernel/qsocketnotifier.cpp:316 Example stack from another application: #0 0x0000003866e0e860 in __read_nocancel () at ../sysdeps/unix/syscall-template.S:81 #1 0x000000386aa082e7 in read (__nbytes=8, __buf=0x718620, __fd=<optimized out>) at /usr/include/bits/unistd.h:44 #2 _IceTransSocketRead (ciptr=0x6d6500, buf=0x718620 "0\256p", size=8) at /usr/include/X11/Xtrans/Xtranssock.c:2116 #3 0x000000386aa0c7d8 in _IceRead (iceConn=iceConn@entry=0x6d57f0, nbytes=nbytes@entry=8, ptr=0x718620 "0\256p") at misc.c:228 #4 0x000000386aa108d0 in IceProcessMessages (iceConn=iceConn@entry=0x6d57f0, replyWait=replyWait@entry=0x0, replyReadyRet=replyReadyRet@entry=0x0) at process.c:196 #5 0x000000386aa06094 in IceOpenConnection ( networkIdsList=networkIdsList@entry=0x7fffffffe177 "local/unix:@/tmp/.ICE-unix/11626,unix/unix:/tmp/.ICE-unix/11626", context=context@entry=0x0, mustAuthenticate=mustAuthenticate@entry=0, majorOpcodeCheck=<optimized out>, errorLength=errorLength@entry=256, errorStringRet=errorStringRet@entry=0x7fffffffd410 "") at connect.c:258 #6 0x0000003b81c01e7f in SmcOpenConnection (networkIdsList=<optimized out>, context=0x0, xsmpMajorRev=<optimized out>, xsmpMinorRev=<optimized out>, mask=15, callbacks=0x7fffffffd3d0, previousId=0x6498b8 "", clientIdRet=0x7fffffffd3c8, errorLength=256, errorStringRet=0x7fffffffd410 "") at sm_client.c:135 #7 0x00000039fec357b5 in QSessionManager::QSessionManager (this=0x6e1c60, app=<optimized out>, id="", key=...) at kernel/qapplication_x11.cpp:5928 #8 0x00000039febcda31 in QApplicationPrivate::initialize (this=this@entry=0x653c10) at kernel/qapplication.cpp:1004
Comments would be appreciated. This could probably be avoided if KSMServer::processData timed out; is there a reason it doesn't? I've had at least one instance where I was able to "fix" this by quitting the application on the far end. Presumably this causes the read to fail because the other end of the socket no longer exists, after which ksmserver is able to go back to working normally.
The affected ksmserver seems to be 4.11 which is no longer developed on. Is the problem also present in 5.x? The architecture underneath changed a lot, so I wouldn't just assume that it's also present there.
I've seen plasma5's ksmserver stop responding once or twice already, but didn't get a backtrace. If it happens again, I'll make sure to do so.
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!