Hi all, yesterday I finally got around to doing some research into the infamous problem that sometimes when you alt-tab the alt key would "stick" and effectively make the desktop useless. It seems to be caused by a completely stuck kded4. It is stuck in the dirwatcher part, apparently. The following output from gdb and .xsession-errors is probably information enough information to find the bug for somebody who knows the code involved (David maybe?). Note that after I killed kded4 when I had extracted enough information out of it the keyboard started to work normally again and I could continue to use the desktop (I did the debugging from a different machine over ssh). I think we should also consider ways to make kded4 less brittle because it's quite important. Resistance against crashes in modules would be cool but also somewhat heavyweight so maybe one thread per module would help? This is assuming that QDBus can work sensibly in a multithreaded environment, only blocking one thread waiting for one response. Anyway, here is the debug output etc. #0 0xb7fd3410 in __kernel_vsyscall () #1 0xb75ae8f3 in __write_nocancel () from #/lib/tls/i686/cmov/libpthread.so.0 #2 0xb6b58dca in Client::writeToServer () from /usr/lib/libfam.so.0 #3 0xb6b5b9ef in ?? () from /usr/lib/libfam.so.0 #4 0xb7e06a0b in KDirWatchPrivate::removeEntry (this=0x80f3280, #instance=0x80f3200, e=0x82bd064, sub_entry=0x0) at /home/horst/ksvn/kdelibs/kio/kio/kdirwatch.cpp:801 #5 0xb7e0913e in KDirWatchPrivate::removeEntry (this=0x80f3280, instance=0x80f3200, _path=@0x8470bc0, sub_entry=0x0) at /home/horst/ksvn/kdelibs/kio/kio/kdirwatch.cpp:775 #6 0xb7e097fe in KDirWatchPrivate::removeEntries (this=0x80f3280, instance=0x80f3200) at /home/horst/ksvn/kdelibs/kio/kio/kdirwatch.cpp:877 #7 0xb7e09966 in ~KDirWatch (this=0x80f3200) at /home/horst/ksvn/kdelibs/kio/kio/kdirwatch.cpp:1537 #8 0xb7fc28b0 in Kded::updateDirWatch (this=0x8062a28) at #/home/horst/ksvn/kdelibs/kded/kded.cpp:372 #9 0xb7fc2db2 in Kded::recreate (this=0x8062a28, initial=false) at #/home/horst/ksvn/kdelibs/kded/kded.cpp:444 #10 0xb7fc2e85 in Kded::recreate (this=0x8062a28) at #/home/horst/ksvn/kdelibs/kded/kded.cpp:426 #11 0xb7fc4144 in Kded::qt_metacall (this=0x8062a28, #_c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbfe9a108) at /home/horst/ksvn/Bkdelibs/kded/kded.moc:83 #12 0xb77168d9 in QMetaObject::activate (sender=0x805fd28, from_signal_index=4, to_signal_index=4, argv=0xfffffe00) at kernel/qobject.cpp:3007 #13 0xb7716d32 in QMetaObject::activate (sender=0x805fd28, m=0xb77a1b64, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3080 #14 0xb774b8bd in QTimer::timeout (this=0x805fd28) at .moc/debug-shared/moc_qtimer.cpp:126 #15 0xb771c9e5 in QTimer::timerEvent (this=0x805fd28, e=0xbfe9a4fc) at #kernel/qtimer.cpp:263 #16 0xb771173b in QObject::event (this=0x805fd28, e=0xbfe9a4fc) at #kernel/qobject.cpp:1105 #17 0xb6caabc8 in QApplicationPrivate::notify_helper (this=0x8063ee8, #receiver=0x805fd28, e=0xbfe9a4fc) at kernel/qapplication.cpp:3772 #18 0xb6cb1571 in QApplication::notify (this=0xbfe9a80c, receiver=0x805fd28, e=0xbfe9a4fc) at kernel/qapplication.cpp:3366 #19 0xb7b69517 in KApplication::notify (this=0xbfe9a80c, receiver=0x805fd28, event=0xbfe9a4fc) at /home/horst/ksvn/kdelibs/kdeui/kernel/kapplication.cpp:311 #20 0xb7701fee in QCoreApplication::notifyInternal (this=0xbfe9a80c, receiver=0x805fd28, event=0xbfe9a4fc) at kernel/qcoreapplication.cpp:583 #21 0xb772bf3e in QTimerInfoList::activateTimers (this=0x8066e4c) at kernel/qcoreapplication.h:215 #22 0xb7729ca0 in timerSourceDispatch (source=0x8066e18) at kernel/qeventdispatcher_glib.cpp:166 #23 0xb677fbf8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #24 0xb6782e5e in ?? () from /usr/lib/libglib-2.0.so.0 #25 0x08066298 in ?? () I continued from here several times in several minutes, always got back here when I hit Ctrl-C. I looked around a bit but couldn't find anything very interesting. .xsession-errors contained a huge list of debug output from the dir watcher ::removeEntry() method because it was apparently called very often. All output stopped when kded4 had finally locked up (this seems to be its state here, locked up). The last lines of output went like this. kded(32369)/kio (KDirWatch) KDirWatchPrivate::removeEntry: Removed File "/opt/kde4/share/kde4/services/kwinactions .desktop" for "" ["KDirWatch-1"] kded(32369)/kio (KDirWatch) KDirWatchPrivate::removeEntry: path= "/opt/kde4/share/kde4/services/kwinadvanced.deskt op" sub_entry: 0x0 kded(32369)/kio (KDirWatch) KDirWatchPrivate::removeEntry: Cancelled FAM (Req 1192) for "/opt/kde4/share/kde4/serv ices/kwinadvanced.desktop" kded(32369)/kio (KDirWatch) KDirWatchPrivate::removeEntry: Removed File "/opt/kde4/share/kde4/services/kwinadvance d.desktop" for "" ["KDirWatch-1"] kded(32369)/kio (KDirWatch) KDirWatchPrivate::removeEntry: path= "/opt/kde4/share/kde4/services/kwincompositing.desktop" sub_entry: 0x0 kbuildsycoca running... Reusing existing ksycoca kbuildsycoca: WARNING: Parse error in /home/horst/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu, line 1, col 1: unexpected end of file kbuildsycoca: WARNING: Parse error in /home/horst/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu, line 1, col 1: unexpected end of file kio (KService*): WARNING: The desktop entry file .hidden/kdiff3plugin.desktop has Type=Service but is located under "apps" instead of "services" kio (KService*): WARNING: Invalid Service : .hidden/kdiff3plugin.desktop QObject: Do not delete object, 'unnamed', during its event handler! knotify(32381) NotifyBySound::notify: going to play "/opt/kde4/share/sounds/KDE-Sys-App-Message.ogg" knotify(32381)/phonon (xine backend) Phonon::Xine::XineStream::setMrl: "file:///opt/kde4/share/sounds/KDE-Sys-App-Message.ogg" , 1 Nothing interesting follows, mainly output from knotify. Some tinkering in gdb (the output is also copied from .xsession-errors): (gdb) [in frame #14] (gdb) call parent()->dumpObjectInfo() OBJECT Kded::unnamed SIGNALS OUT signal: destroyed(QObject*) --> QDBusConnectionPrivate::unnamed objectDestroyed(QObject*) --> QDBusConnectionPrivate::unnamed objectDestroyed(QObject*) SIGNALS IN <-- QTimer::unnamed timeout() <-- KDirWatch::KDirWatch-1 dirty(QString) <-- KDirWatch::KDirWatch-1 created(QString) <-- KDirWatch::KDirWatch-1 deleted(QString) <-- QDBusConnectionInterface::unnamed serviceOwnerChanged(QString,QString,QString) <-- KdedGlobalAccel::unnamed moduleDeleted(KDEDModule*) <-- KTimeZoned::unnamed moduleDeleted(KDEDModule*) <-- NetworkStatusModule::unnamed moduleDeleted(KDEDModule*) <-- KWritedModule::unnamed moduleDeleted(KDEDModule*) <-- Nepomuk::Server::unnamed moduleDeleted(KDEDModule*) <-- RemoteDirNotifyModule::unnamed moduleDeleted(KDEDModule*) <-- KonqyPreloader::unnamed moduleDeleted(KDEDModule*) <-- FavIconsModule::unnamed moduleDeleted(KDEDModule*) <-- KCookieServer::unnamed moduleDeleted(KDEDModule*) <-- KPasswdServer::unnamed moduleDeleted(KDEDModule*) <-- KWalletD::unnamed moduleDeleted(KDEDModule*) (gdb) call parent()->dumpObjectTree() Kded:: KBuildsycocaAdaptor:: QDBusAdaptorConnector:: KdedAdaptor:: QTimer:: KdedGlobalAccel:: KdedGlobalAccelAdaptor:: QDBusAdaptorConnector:: KTimeZoned:: KDirWatch::KDirWatch-3 KDirWatch::KDirWatch-4 QDBusAdaptorConnector:: NetworkStatusModule:: ClientAdaptor:: QDBusAdaptorConnector:: ServiceAdaptor:: KWritedModule:: QDBusAdaptorConnector:: RemoteDirNotifyModule:: QDBusAdaptorConnector:: KonqyPreloader:: PreloaderAdaptor:: QDBusAdaptorConnector:: FavIconsModule:: FavIconsAdaptor:: QDBusAdaptorConnector:: KCookieServer:: KCookieServerAdaptor:: QDBusAdaptorConnector:: KPasswdServer:: QDBusAdaptorConnector:: KWalletD:: KWalletDAdaptor:: QDBusAdaptorConnector:: KDirWatch::KWallet Directory Watcher That was all. Cheers, Andreas