Bug 108210 - kded hogs the CPU -- kwallet doesn't work anymore
Summary: kded hogs the CPU -- kwallet doesn't work anymore
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kded (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 121462 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-27 13:00 UTC by Ralf Hildebrandt
Modified: 2008-09-17 10:29 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hildebrandt 2005-06-27 13:00:40 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Immediately after a local login via KDM kded starts to hog the CPU. Usually, the user gets a kwallet password window to enter his/her master password. This window doesn't appear when kded goes berzerk.

kded can only be killed using SIGKILL

top output: 
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM   TIME COMMAND
 5083 ingrid    25   0 37532  15m  13m R 94.8  3.2   8:54 kded [kdeinit]

# strace -p 5083
Process 5083 attached - interrupt to quit
                                                     
Yes, no output at all.

If I login as this user remotely (e.g. using ssh with X-Forwarding) and start kmail -- THEN kded initializes correctly and everything works as expected.
Comment 1 richardjones 2005-08-11 00:23:15 UTC
I am also seeing this behaviour. I also get no output from strace. The behaviour has not been repeatable until this morning, when I've now tried to log in about a dozen times, each time having to end the KDE session and manually kill -9 <kded PID> before trying again.

I actually get the bezerk kded *after* the kwallet password is entered. Kopete has started up, but kmail is pending.
Comment 2 Henk Poley 2005-10-17 20:50:48 UTC
I think I'm seeing the same thing in Bug 113958 (the crash *may* be related). For me KDED goes into CPU hog mode after I entered my password.

Found out today that you can 'fix' (heh..) this for the current session with:
$ kill `pidof kded`
$ kdeinit kded
Comment 3 Mark Brand 2005-10-19 21:25:42 UTC
I'm seeing this too using:
Suse 10.0
KDE 3.4.92 (3.5-beta 2)
kernel-default-2.6.13-15

Like Henk in comment 2, I can "fix" this by killing kded and then starting kded.

I do NOT see this on my other machine:
Suse 9.3
KDE 3.4.92 (3.5-beta 2)
kernel 2.6.11.4-21.9 (suse RPM).
I don't know what makes the difference.
Comment 4 Mark Brand 2005-10-19 21:29:58 UTC
Sorry, but I forgot to mention something. The problem started for me after upgrading my Suse 10 system to KDE 3.4.92. I did not see this behavior using either KDE 3.4.2 or KDE 3.4.3.
Comment 5 Jeroen van Agt 2005-10-22 12:53:45 UTC
The same problem here.
kded starts to hog the CPU after login.
Suse 10
KDE 3.4.92 (apt upgrade)
kernel :Linux linux 2.6.13-15-default
Comment 6 Roland Wolters 2005-10-22 18:01:25 UTC
Similar here: on a suse 10.0 system with kde 3.5beta2, a new user:
kded starts to hog the cpu.
Any output we could give to provide more information? This behaviour is NOT there with my normal user which I created before I upgraded my KDE 3.4.x to KDE 3.4.91.
Comment 7 Roland Wolters 2005-10-28 03:25:23 UTC
Hm, I recognized that my .xsession-errors is full of garbage. These are the lines, they are repeating and repeating (several million times) until I kill kded:

---> path: .xsession-errors
---> wd: 86
---> mask: 2

Can someone prove this? Can someone point out what that means?
Comment 8 Roland Wolters 2005-10-28 15:54:07 UTC
For the people with kde 3.5beta2 and SUSE rpms: it is solved! See bug 115240 for more information.
Comment 9 Ralf Hildebrandt 2005-12-27 21:32:35 UTC
Yes, seems to be fixed in 3.5.0
Comment 10 Daniel O'Connor 2006-04-05 03:05:15 UTC
This still happens to me in 3.5.1...
However it only happens if I leave a window requesting a password open for too long (ie login then go and get a coffee).

I get a stack trace like so..

#0  0x293a85f4 in __error () from /usr/lib/libpthread.so.2
#1  0x2939a801 in _pthread_mutex_trylock () from /usr/lib/libpthread.so.2
#2  0x2939c964 in pthread_mutex_lock () from /usr/lib/libpthread.so.2
#3  0x28f6815e in QRealMutexPrivate::lock (this=0x84b97c0)
    at tools/qmutex_unix.cpp:142
#4  0x28f68506 in QMutex::lock (this=0x840f200) at tools/qmutex_unix.cpp:464
#5  0x28be4520 in QMutexLocker (this=0xbfbfc990, m=0x840f200) at qmutex.h:96
#6  0x28c40c79 in QApplication::sendPostedEvents (receiver=0x0, event_type=70)
    at kernel/qapplication.cpp:3209
#7  0x28c40c43 in QApplication::sendPostedEvents (receiver=0x0, event_type=0)
    at kernel/qapplication.cpp:3203
#8  0x28c40c0f in QApplication::sendPostedEvents () at kernel/qapplication.cpp:3181
#9  0x28be3691 in QEventLoop::processEvents (this=0x84c63a0, flags=4)
    at kernel/qeventloop_x11.cpp:144
#10 0x2890cf6e in DCOPClient::call () from /usr/local/lib/libDCOP.so.6
#11 0x28903bbf in DCOPRef::callInternal () from /usr/local/lib/libDCOP.so.6
#12 0x28903c9b in DCOPRef::callInternal () from /usr/local/lib/libDCOP.so.6
#13 0x286bdd1b in KWallet::Wallet::openWallet ()
#14 0x29cf4919 in KPasswdServer::openWallet ()
   from /usr/local/lib/kde3/kded_kpasswdserver.so
#15 0x29cf80fb in KPasswdServer::checkAuthInfo ()
   from /usr/local/lib/kde3/kded_kpasswdserver.so
#16 0x29cfa673 in KPasswdServer::process ()
   from /usr/local/lib/kde3/kded_kpasswdserver.so
#17 0x2890ca8a in DCOPClient::receive () from /usr/local/lib/libDCOP.so.6
#18 0x28910b91 in DCOPProcessInternal () from /usr/local/lib/libDCOP.so.6
#19 0x289111cf in DCOPProcessMessage () from /usr/local/lib/libDCOP.so.6
#20 0x28917c05 in KDE_IceProcessMessages () from /usr/local/lib/libDCOP.so.6
#21 0x28907de0 in DCOPClient::processSocketData () from /usr/local/lib/libDCOP.so.6
#22 0x2891186b in DCOPClient::qt_invoke () from /usr/local/lib/libDCOP.so.6
#23 0x28ca5011 in QObject::activate_signal (this=0x82aaa80, clist=0x84a2b80,
    o=0xbfbfd710) at kernel/qobject.cpp:2356
#24 0x28ca536a in QObject::activate_signal (this=0x82aaa80, signal=2, param=3)
    at kernel/qobject.cpp:2449
#25 0x2900f0b9 in QSocketNotifier::activated (this=0x82aaa80, t0=3)
    at .moc/debug-shared-mt/moc_qsocketnotifier.cpp:85
#26 0x28cc5b98 in QSocketNotifier::event (this=0x82aaa80, e=0xbfbfd9b0)
    at kernel/qsocketnotifier.cpp:258
#27 0x28c3ff7f in QApplication::internalNotify (this=0xbfbfe620, receiver=0x82aaa80,
    e=0xbfbfd9b0) at kernel/qapplication.cpp:2635
#28 0x28c3f250 in QApplication::notify (this=0xbfbfe620, receiver=0x82aaa80,
    e=0xbfbfd9b0) at kernel/qapplication.cpp:2358
#29 0x2877a49a in KApplication::notify () from /usr/local/lib/libkdecore.so.6
#30 0x28bd0211 in QApplication::sendEvent (receiver=0x82aaa80, event=0xbfbfd9b0)
    at qapplication.h:496
#31 0x28c2dc74 in QEventLoop::activateSocketNotifiers (this=0x84c63a0)
    at kernel/qeventloop_unix.cpp:578
#32 0x28be43a5 in QEventLoop::processEvents (this=0x84c63a0, flags=4)
    at kernel/qeventloop_x11.cpp:383
#33 0x28c550d0 in QEventLoop::enterLoop (this=0x84c63a0) at kernel/qeventloop.cpp:198
#34 0x28c40167 in QApplication::enter_loop (this=0xbfbfe620)
    at kernel/qapplication.cpp:2793
#35 0x28e46835 in QDialog::exec (this=0x8489620) at dialogs/qdialog.cpp:432
#36 0x29c985e6 in KWalletD::internalOpen () from /usr/local/lib/kde3/kded_kwalletd.so
#37 0x29c9918d in KWalletD::doTransactionOpen ()
   from /usr/local/lib/kde3/kded_kwalletd.so
#38 0x29c99ef4 in KWalletD::processTransactions ()
   from /usr/local/lib/kde3/kded_kwalletd.so
#39 0x29c9a39b in KWalletD::qt_invoke () from /usr/local/lib/kde3/kded_kwalletd.so
#40 0x28ca5011 in QObject::activate_signal (this=0x8469d88, clist=0x868e0c0,
    o=0xbfbfe090) at kernel/qobject.cpp:2356
#41 0x2900e138 in QSignal::signal (this=0x8469d88, t0=@0x8469db0)
    at .moc/debug-shared-mt/moc_qsignal.cpp:100
#42 0x28cc2dc9 in QSignal::activate (this=0x8469d88) at kernel/qsignal.cpp:212
#43 0x28ccad43 in QSingleShotTimer::event (this=0x8469d60) at kernel/qtimer.cpp:286
#44 0x28c3ff7f in QApplication::internalNotify (this=0xbfbfe620, receiver=0x8469d60,
    e=0xbfbfe340) at kernel/qapplication.cpp:2635
#45 0x28c3f250 in QApplication::notify (this=0xbfbfe620, receiver=0x8469d60,
    e=0xbfbfe340) at kernel/qapplication.cpp:2358
#46 0x2877a49a in KApplication::notify () from /usr/local/lib/libkdecore.so.6
#47 0x28bd0211 in QApplication::sendEvent (receiver=0x8469d60, event=0xbfbfe340)
    at qapplication.h:496
#48 0x28c2da97 in QEventLoop::activateTimers (this=0x84c63a0)
    at kernel/qeventloop_unix.cpp:556
#49 0x28be43ca in QEventLoop::processEvents (this=0x84c63a0, flags=4)
    at kernel/qeventloop_x11.cpp:389
#50 0x28c550d0 in QEventLoop::enterLoop (this=0x84c63a0) at kernel/qeventloop.cpp:198
#51 0x28c54fea in QEventLoop::exec (this=0x84c63a0) at kernel/qeventloop.cpp:145
#52 0x28c400fb in QApplication::exec (this=0xbfbfe620)
    at kernel/qapplication.cpp:2758
#53 0x297ed2fa in kdemain () from /usr/local/lib/libkdeinit_kded.so
#54 0x297dd63a in kdeinitmain () from /usr/local/lib/kde3/kded.so
#55 0x0804e205 in execpath_avoid_loops ()
#56 0x0804fb67 in main ()
(gdb) up
#1  0x2939a801 in _pthread_mutex_trylock () from /usr/lib/libpthread.so.2
(gdb)
#2  0x2939c964 in pthread_mutex_lock () from /usr/lib/libpthread.so.2
(gdb)
#3  0x28f6815e in QRealMutexPrivate::lock (this=0x84b97c0)
    at tools/qmutex_unix.cpp:142
142     tools/qmutex_unix.cpp: No such file or directory.
        in tools/qmutex_unix.cpp
Current language:  auto; currently c++
(gdb) print *this
$1 = {<QMutexPrivate> = {_vptr$QMutexPrivate = 0x2912bd08, handle = 0x821cc70},
  recursive = true}
Comment 11 Mathias Homann 2006-10-23 23:49:23 UTC
happened to me this morning, running kde 3.5.5 on suse 10.1-x86_64.
Comment 12 Jens Nixdorf 2006-10-24 00:04:30 UTC
Since some weeks this happened to me with SUSE 10.1 with kernel 2.6.16.13 (smp) and KDE 3.5.4 and after some updates also with kernel 2.6.16.21-0.25-smp and KDE 3.5.5 "release 19.1". My machine: Toshiba Satellite A100 with 1 GB Ram and T 2300. 

This happens ONLY when kwallet is called by KMail, NOT when it is called by another program, like Konqueror. 

Comment 13 Christoph Zauner 2006-11-17 18:09:08 UTC
Still a problem on my machine :-( Sometimes when I log in to KDE and a previous session is restored kded goes berserk and eats up almost 100% of cpu time. KWallet does not work anymore. Maybe other services, like the KDED Media Manager also do not work anymore. 

However, if I kill kded and restart it everything seems to work again.

[*] Distribution: Gentoo
[*] Kernel: Linux 2.6.17-gentoo-r6
[*] installed KDE versions:
  [I--] [  ] kde-base/kde-i18n-3.5.5 (3.5)
  [I--] [  ] kde-base/kdeartwork-kscreensaver-3.5.5 (3.5)
  [I--] [  ] kde-base/kdebase-data-3.5.5 (3.5)
  [I--] [  ] kde-base/kdebase-kioslaves-3.5.5-r1 (3.5)
  [I--] [  ] kde-base/kdebase-pam-6 (0)
  [I--] [  ] kde-base/kdebase-startkde-3.5.5 (3.5)
  [I--] [  ] kde-base/kdelibs-3.5.5-r5 (3.5)
  [I--] [  ] kde-base/kdemultimedia-kioslaves-3.5.5 (3.5)
  [I--] [  ] kde-base/kdepasswd-3.5.2 (3.5)
  [I--] [  ] kde-base/kdeprint-3.5.5 (3.5)
  [I--] [  ] kde-base/kdesktop-3.5.5 (3.5)
  [I--] [  ] kde-base/kdesu-3.5.5 (3.5)  
Comment 14 Krzysztof Lichota 2007-02-04 21:11:15 UTC
I have the same problem in KDE 3.5.5 on Kubuntu Dapper. I have many apps open and when session starts, many KWallet windows are opened. I Cancel them, but KDED starts to eat 100% of CPU.

I have attached debugger and it is looping in these lines in dcopclient.cpp:

1753            do {
1754               QApplication::eventLoop()->processEvents( QEventLoop::WaitForMore);
1755            } while( !localClient->isLocalTransactionFinished(id, replyType, replyData));

Here is the backtrace and stepping through functions:
(gdb) thread apply all bt

Thread 1 (Thread -1230223680 (LWP 7033)):
#0  0xb6af0ea2 in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
#1  0xb7e1d70e in pthread_mutex_lock () from /lib/tls/i686/cmov/libc.so.6
#2  0xb759802b in QRecursiveMutexPrivate::lock () from /usr/lib/libqt-mt.so.3
#3  0xb759788a in QMutex::lock () from /usr/lib/libqt-mt.so.3
#4  0xb71f11d6 in QMutexLocker::QMutexLocker () from /usr/lib/libqt-mt.so.3
#5  0xb71f0415 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#6  0xb6c44540 in DCOPClient::call (this=0x816f570, remApp=@0xbfbc42a4, remObjId=@0xbfbc42ac, remFun=@0xbfbc4194,
    data=@0xbfbc4308, replyType=@0xbfbc4300, replyData=@0xbfbc42f8, useEventLoop=false, timeout=0) at dcopclient.cpp:1754
#7  0xb6c462a8 in DCOPRef::callInternal (this=0xbfbc42a4, fun=@0xbfbc4350, args=@0xbfbc4310, data=@0x0,
    useEventLoop=NoEventLoop, timeout=0) at dcopref.cpp:77
#8  0xb6c463b0 in DCOPRef::callInternal (this=0x0, fun=@0x0, args=@0x0, data=@0x0) at dcopref.cpp:52
#9  0xb6c71e87 in KWallet::Wallet::openWallet (name=@0xbfbc43b8, w=67108869, ot=KWallet::Wallet::Synchronous)
    at dcopref.h:523
#10 0xb66a20ed in KPasswdServer::openWallet (this=0x8251078, windowId=0) at kpasswdserver.cpp:292
#11 0xb66a5147 in KPasswdServer::processRequest (this=0x8251078) at kpasswdserver.cpp:349
#12 0xb66a5ccd in KPasswdServer::qt_invoke (this=0x8251078, _id=3, _o=0xbfbc4748) at kpasswdserver.moc:87
#13 0xb72b6051 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#14 0xb7649432 in QSignal::signal () from /usr/lib/libqt-mt.so.3
#15 0xb72d37c8 in QSignal::activate () from /usr/lib/libqt-mt.so.3
#16 0xb72db2b8 in QSingleShotTimer::event () from /usr/lib/libqt-mt.so.3
#17 0xb724bf3e in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#18 0xb724c13a in QApplication::notify () from /usr/lib/libqt-mt.so.3
#19 0xb792d1cd in KApplication::notify (this=0xbfbc5844, receiver=0x819ee58, event=0xbfbc4ab8) at kapplication.cpp:550
#20 0xb71dd157 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#21 0xb723d92b in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#22 0xb71f0f67 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#23 0xb7264a2f in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#24 0xb724aa79 in QApplication::enter_loop () from /usr/lib/libqt-mt.so.3
#25 0xb74695c4 in QDialog::exec () from /usr/lib/libqt-mt.so.3
#26 0xb66129ab in KWalletD::internalOpen (this=0x82514d8, appid=@0x83930dc, wallet=@0x83930e8, isPath=false, w=37748741,
    modal=false) at kwalletd.cpp:440
#27 0xb6613a3f in KWalletD::doTransactionOpen (this=0x82514d8, appid=@0x83930dc, wallet=@0x0, wId=37748741, modal=false)
    at kwalletd.cpp:354
#28 0xb6614c87 in KWalletD::processTransactions (this=0x82514d8) at kwalletd.cpp:150
#29 0xb66185da in KWalletD::qt_invoke (this=0x82514d8, _id=7, _o=0xbfbc51e8) at kwalletd.moc:100
#30 0xb72b6051 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#31 0xb7649432 in QSignal::signal () from /usr/lib/libqt-mt.so.3
#32 0xb72d37c8 in QSignal::activate () from /usr/lib/libqt-mt.so.3
#33 0xb72db2b8 in QSingleShotTimer::event () from /usr/lib/libqt-mt.so.3
#34 0xb724bf3e in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#35 0xb724c13a in QApplication::notify () from /usr/lib/libqt-mt.so.3
#36 0xb792d1cd in KApplication::notify (this=0xbfbc5844, receiver=0x8179298, event=0xbfbc5558) at kapplication.cpp:550
#37 0xb71dd157 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
---Type <return> to continue, or q <return> to quit---
#38 0xb723d92b in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#39 0xb71f0f67 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#40 0xb7264a2f in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#41 0xb7264952 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#42 0xb724aa4d in QApplication::exec () from /usr/lib/libqt-mt.so.3
#43 0xb6965d69 in kdemain (argc=0, argv=0x0) at kded.cpp:960
#44 0xb7ef04f0 in kdeinitmain (argc=0, argv=0x0) at kded_dummy.cpp:3
#45 0x0804e30e in launch (argc=2, _name=0x805100f "kded", args=0x8051033 "--oom-pipe", cwd=0x0, envc=0, envs=0x0,
    reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x0) at kinit.cpp:673
#46 0x08050231 in main (argc=5, argv=0xbfbc5e34, envp=0x0) at kinit.cpp:1856
#47 0xb7d5bea2 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#48 0x0804b901 in _start () at ../sysdeps/i386/elf/start.S:119
#0  0xb6af0ea2 in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
(gdb) frame 5
#5  0xb71f0415 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
(gdb) s
Single stepping until exit from function pthread_mutex_lock,
which has no line number information.
[Switching to Thread -1230223680 (LWP 7033)]
0xb7e1d70e in pthread_mutex_lock () from /lib/tls/i686/cmov/libc.so.6
(gdb) n
Single stepping until exit from function pthread_mutex_lock,
which has no line number information.
0xb759802b in QRecursiveMutexPrivate::lock () from /usr/lib/libqt-mt.so.3
(gdb)
Single stepping until exit from function _ZN22QRecursiveMutexPrivate4lockEv,
which has no line number information.
0xb759788a in QMutex::lock () from /usr/lib/libqt-mt.so.3
(gdb)
Single stepping until exit from function _ZN6QMutex4lockEv,
which has no line number information.
0xb71f11d6 in QMutexLocker::QMutexLocker () from /usr/lib/libqt-mt.so.3
(gdb)
Single stepping until exit from function _ZN12QMutexLockerC1EP6QMutex,
which has no line number information.
0xb71f0415 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
(gdb)
Single stepping until exit from function _ZN10QEventLoop13processEventsEj,
which has no line number information.
DCOPClient::call (this=0x816f570, remApp=@0xbfbc42a4, remObjId=@0xbfbc42ac, remFun=@0xbfbc4194, data=@0xbfbc4308,
    replyType=@0xbfbc4300, replyData=@0xbfbc42f8, useEventLoop=false, timeout=0) at dcopclient.cpp:1753
1753    dcopclient.cpp: Nie ma takiego pliku ani katalogu.
        in dcopclient.cpp
(gdb) n
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp
(gdb)
1754    in dcopclient.cpp
(gdb)
1753    in dcopclient.cpp

Comment 15 Krzysztof Lichota 2007-02-04 21:13:52 UTC
*** Bug 121462 has been marked as a duplicate of this bug. ***
Comment 16 Pascal Hofmann 2007-02-05 15:01:00 UTC
*** This bug has been confirmed by popular vote. ***
Comment 17 Jan Essert 2007-02-05 21:38:04 UTC
I also experience this bug, with KDE 3.5.6 and Qt 3.3.6 on Gentoo. Actually it's a slightly different behaviour, when I login, kwalletmanager shows a password box, but when entering the password kded freezes.
This now happens almost all the time, I _think_ it always happens when I wait a longer time before entering my password.
Programms accessing the wallet are kopete, kmail, konqueror and akregator.

I know that this behaviour is slightly different from the original posters', since I do get a password prompt, but I thought I'd mention it here.
Comment 18 PhobosK 2007-02-13 18:44:08 UTC
Well my system is Gentoo with KDE 3.5.6 and QT 3.3.6-r5 and I have this problem too.
In fact I really cannot trace what happens. There is no connection with any of my computer activities, no traces left in syslog or ~/.xsession-errors.
What happens is that at a certain point of my working on the PC kded gets killed (or maybe dies is more proper because i don't get any sign of that), so all services supported by it die too and get messed up - kwallet especially.
What I have to do is to start kded in konsole and khotkeys too.
Another problem that I have is maybe somehow connected to this.
It is that kwallet does't remember new things entered in it. I've tried manually entering (or changing) passes in it and closing all wallets but after opening again the changes are gone.
I see some common issues with the things mentioned in Bug 138066 too.
BTW these problems started after the upgrade to 3.5.6 from 3.5.5
Comment 19 Alexey Neyman 2007-02-27 16:00:33 UTC
Happens with Fedora Core 6. As well, a quasi-reliable way is to wait several minutes after logging in, ignoring the kwallet's prompt.
Comment 20 Aaron Williams 2007-03-28 08:54:45 UTC
I am also seeing this problem on SuSE 10.2 with KDE 3.5.6.
Comment 21 Aaron Williams 2007-03-29 07:32:27 UTC
Here's my stack trace when it happens... looks similar to the one above.

#0  0x00002b7743ca93cd in pthread_mutex_lock () from /lib64/libpthread.so.0
#1  0x00002b77437fea12 in QRecursiveMutexPrivate::unlock ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#2  0x00002b7743550b3e in QApplication::sendPostedEvents ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#3  0x00002b7743505495 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#4  0x00002b774303bb16 in DCOPClient::call () from /opt/kde3/lib64/libDCOP.so.4
#5  0x00002b774303e6fa in DCOPRef::callInternal () from /opt/kde3/lib64/libDCOP.so.4
#6  0x00002b774303e797 in DCOPRef::callInternal () from /opt/kde3/lib64/libDCOP.so.4
#7  0x00002b7744cd733d in KWallet::Wallet::openWallet ()
   from /opt/kde3/lib64/libkwalletclient.so.1
#8  0x00002b7748d95954 in KPasswdServer::openWallet ()
   from /opt/kde3/lib64/kde3/kded_kpasswdserver.so
#9  0x00002b7748d9686f in KPasswdServer::checkAuthInfo ()
   from /opt/kde3/lib64/kde3/kded_kpasswdserver.so
#10 0x00002b7748d98bdc in KPasswdServer::process ()
   from /opt/kde3/lib64/kde3/kded_kpasswdserver.so
#11 0x00002b7743039a07 in DCOPClient::receive () from /opt/kde3/lib64/libDCOP.so.4
#12 0x00002b774303acf8 in DCOPProcessInternal () from /opt/kde3/lib64/libDCOP.so.4
#13 0x00002b774303b73c in DCOPProcessMessage () from /opt/kde3/lib64/libDCOP.so.4
#14 0x00002b7743049a53 in KDE_IceProcessMessages () from /opt/kde3/lib64/libDCOP.so.4
#15 0x00002b7743032a0a in DCOPClient::processSocketData ()
   from /opt/kde3/lib64/libDCOP.so.4
#16 0x00002b774303b311 in DCOPClient::qt_invoke () from /opt/kde3/lib64/libDCOP.so.4
#17 0x00002b77435a659c in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#18 0x00002b77435a719f in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#19 0x00002b77435c0d9b in QSocketNotifier::event () from /usr/lib/qt3/lib64/libqt-mt.so.3
#20 0x00002b774354f425 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#21 0x00002b7743550057 in QApplication::notify () from /usr/lib/qt3/lib64/libqt-mt.so.3
#22 0x00002b7742d54f88 in KApplication::notify () from /opt/kde3/lib64/libkdecore.so.4
#23 0x00002b7743544b7b in QEventLoop::activateSocketNotifiers ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#24 0x00002b77435056f0 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
---Type <return> to continue, or q <return> to quit---
#25 0x00002b7743563fd3 in QEventLoop::enterLoop () from /usr/lib/qt3/lib64/libqt-mt.so.3
#26 0x00002b7743705acb in QDialog::exec () from /usr/lib/qt3/lib64/libqt-mt.so.3
#27 0x00002b7748fb9243 in KWalletD::internalOpen ()
   from /opt/kde3/lib64/kde3/kded_kwalletd.so
#28 0x00002b7748fba152 in KWalletD::doTransactionOpen ()
   from /opt/kde3/lib64/kde3/kded_kwalletd.so
#29 0x00002b7748fc32d5 in KWalletD::processTransactions ()
   from /opt/kde3/lib64/kde3/kded_kwalletd.so
#30 0x00002b7748fc373e in KWalletD::qt_invoke ()
   from /opt/kde3/lib64/kde3/kded_kwalletd.so
#31 0x00002b77435a659c in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#32 0x00002b774388bc42 in QSignal::signal () from /usr/lib/qt3/lib64/libqt-mt.so.3
#33 0x00002b77435bf025 in QSignal::activate () from /usr/lib/qt3/lib64/libqt-mt.so.3
#34 0x00002b77435c5638 in QSingleShotTimer::event ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#35 0x00002b774354f425 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#36 0x00002b7743550057 in QApplication::notify () from /usr/lib/qt3/lib64/libqt-mt.so.3
#37 0x00002b7742d54f88 in KApplication::notify () from /opt/kde3/lib64/libkdecore.so.4
#38 0x00002b7743545a6f in QEventLoop::activateTimers ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#39 0x00002b774350579d in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#40 0x00002b7743563fd3 in QEventLoop::enterLoop () from /usr/lib/qt3/lib64/libqt-mt.so.3
#41 0x00002b7743563e82 in QEventLoop::exec () from /usr/lib/qt3/lib64/libqt-mt.so.3
#42 0x00002b7741fe4103 in kdemain () from /opt/kde3/lib64/libkdeinit_kded.so
#43 0x00002b774225eae4 in __libc_start_main () from /lib64/libc.so.6
#44 0x0000000000400599 in _start ()
Comment 22 Andreas Zitzelsberger 2007-04-01 11:04:29 UTC
I also have that bug on Ubuntu Dapper / KDE 3.5.2. Because it's rather frequent, I'm using a small script to kill and restart kded, kwalletmanager, kopete, kmail and amarok. However, this bug does not occur on my laptop (same os/KDE version, but then only kwalletmanager is started on login) nor on any other KDE installation I've set up. 

stack trace:
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7dc908d in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb6e20a8d in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#3  0xb7474490 in DCOPClient::call (this=0x8056bf0, remApp=@0xbfb72644,
    remObjId=@0xbfb7264c, remFun=@0xbfb72534, data=@0xbfb726a8,
    replyType=@0xbfb726a0, replyData=@0xbfb72698, useEventLoop=false,
    timeout=-514) at dcopclient.cpp:1754
#4  0xb74761f8 in DCOPRef::callInternal (this=0xbfb72644, fun=@0xbfb726f0,
    args=@0xbfb726b0, data=@0xfffffdfe, useEventLoop=NoEventLoop, timeout=-514)
    at dcopref.cpp:77
#5  0xb7476300 in DCOPRef::callInternal (this=0xfffffdfe, fun=@0xfffffdfe,
    args=@0xfffffdfe, data=@0xfffffdfe) at dcopref.cpp:52
#6  0xb76fbe87 in KWallet::Wallet::openWallet (name=@0xbfb72758, w=0,
    ot=KWallet::Wallet::Synchronous) at dcopref.h:523
#7  0xb622b08d in KPasswdServer::openWallet (this=0x820b6a8,
    windowId=4294966782) at kpasswdserver.cpp:292
#8  0xb622df0e in KPasswdServer::checkAuthInfo (this=0x820b6a8,
    info=@0xbfb728f4, windowId=0) at kpasswdserver.cpp:218
#9  0xb622e25e in KPasswdServer::process (this=0x820b6a8, fun=@0xbfb72cd4,
    data=@0xbfb72ccc, replyType=@0xbfb72cc4, replyData=@0xbfb72cbc)
    at kpasswdserver_skel.cpp:38
#10 0xb747143d in DCOPClient::receive (this=0x8056bf0, objId=@0xbfb72cdc,
    fun=@0xbfb72cd4, data=@0xbfb72ccc, replyType=@0xbfb72cc4,
    replyData=@0xbfb72cbc) at dcopclient.cpp:1640
#11 0xb74729ed in DCOPProcessInternal (d=0x8062368, opcode=2, key=127,
    dataReceived=@0xbfb72d98, canPost=true) at dcopclient.cpp:518
#12 0xb7473010 in DCOPProcessMessage (iceConn=0x8056e40,
    clientObject=0x8062368, opcode=2, length=283, replyWait=0x0,
    replyWaitRet=0xbfb72e04) at dcopclient.cpp:430
#13 0xb747f4aa in KDE_IceProcessMessages (iceConn=0x8056e40, replyWait=0x0,
    replyReadyRet=0x0)
    at /build/buildd/kdelibs-3.5.2/./dcop/KDE-ICE/process.c:326
#14 0xb746b655 in DCOPClient::processSocketData (this=0x8056bf0, fd=4)
    at dcopclient.cpp:2009
#15 0xb74736d0 in DCOPClient::qt_invoke (this=0x8056bf0, _id=2, _o=0xbfb72fa8)
    at dcopclient.moc:176
#16 0xb6ee6051 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#17 0xb6ee6960 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#18 0xb727a207 in QSocketNotifier::activated () from /usr/lib/libqt-mt.so.3
#19 0xb6f06396 in QSocketNotifier::event () from /usr/lib/libqt-mt.so.3
#20 0xb6e7bf3e in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#21 0xb6e7c13a in QApplication::notify () from /usr/lib/libqt-mt.so.3
#22 0xb7623d7d in KApplication::notify (this=0xbfb74004, receiver=0x80d5ca8,
    event=0xbfb73300) at kapplication.cpp:550
#23 0xb6e0d157 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#24 0xb6e6da5b in QEventLoop::activateSocketNotifiers ()
   from /usr/lib/libqt-mt.so.3
#25 0xb6e20f43 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#26 0xb6e94a2f in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#27 0xb6e7aa79 in QApplication::enter_loop () from /usr/lib/libqt-mt.so.3
#28 0xb70995c4 in QDialog::exec () from /usr/lib/libqt-mt.so.3
#29 0xb63d9dbf in KWalletD::internalOpen (this=0x81c3fd0, appid=@0x81c3ca4,
    wallet=@0x81c3cb0, isPath=false, w=18874375) at kwalletd.cpp:426
#30 0xb63dae66 in KWalletD::doTransactionOpen (this=0x81c3fd0,
    appid=@0xfffffdfe, wallet=@0xfffffdfe, wId=18874375) at kwalletd.cpp:337
#31 0xb63dc047 in KWalletD::processTransactions (this=0x81c3fd0)
    at kwalletd.cpp:152
#32 0xb63dfae2 in KWalletD::qt_invoke (this=0x81c3fd0, _id=7, _o=0xbfb739a8)
    at kwalletd.moc:100
#33 0xb6ee6051 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#34 0xb7279432 in QSignal::signal () from /usr/lib/libqt-mt.so.3
#35 0xb6f037c8 in QSignal::activate () from /usr/lib/libqt-mt.so.3
#36 0xb6f0b2b8 in QSingleShotTimer::event () from /usr/lib/libqt-mt.so.3
#37 0xb6e7bf3e in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#38 0xb6e7c13a in QApplication::notify () from /usr/lib/libqt-mt.so.3
#39 0xb7623d7d in KApplication::notify (this=0xbfb74004, receiver=0x8063600,
    event=0xbfb73d18) at kapplication.cpp:550
#40 0xb6e0d157 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#41 0xb6e6d92b in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#42 0xb6e20f67 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#43 0xb6e94a2f in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#44 0xb6e94952 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#45 0xb6e7aa4d in QApplication::exec () from /usr/lib/libqt-mt.so.3
#46 0xb7f45450 in kdemain (argc=-514, argv=0xfffffdfe) at kded.cpp:904
#47 0xb7d1bea2 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#48 0x080483b1 in _start () at ../sysdeps/i386/elf/start.S:119
Comment 23 Marc Schiffbauer 2007-05-26 19:38:47 UTC
This seems to be fixed in 3.5.7. At least using the kubuntu packages for feisty this works for me now. No more kded deadlocks on login If I do not enter my kwallet password instantly. Great!

-Marc
Comment 24 Thomas Vollmer 2007-05-26 21:11:38 UTC
> ------- Additional Comments From marc links2linux de  2007-05-26 19:38
> ------- This seems to be fixed in 3.5.7. At least using the kubuntu
> packages for feisty this works for me now. No more kded deadlocks on
> login If I do not enter my kwallet password instantly. Great!


On my Debian testing box with SVN checkout from today there problem ist 
still there.
Comment 25 Marc Schiffbauer 2007-05-29 10:42:05 UTC
Hm, like it seems I have to revert my last comment: The problem still exists but with slightly different behavior:

Now the mediamanager does not crash anymore when I have to kill -9 kded, so I do not have to restart the whole session when I am to slow entering the kwallet password. Today it was enough to just "kill -9 kded; kded", then eject and reinsert removable media to be able to access it again.

-Marc
Comment 26 PhobosK 2007-07-24 22:10:02 UTC
Just for info - now i use KDE 3.5.7 and this problem seems to be fixed there....
Comment 27 Thomas Vollmer 2007-07-25 08:49:00 UTC
On Dienstag, 24. Juli 2007, PhobosK wrote:
> ------- Additional Comments From phobosk fastmail fm  2007-07-24 22:10
> ------- Just for info - now i use KDE 3.5.7 and this problem seems to
> be fixed there....


I use KDE SVN 3.5.x from yesterday and its still there.

Thomas
Comment 28 Andreas Zitzelsberger 2007-10-23 12:36:12 UTC
I have this bug now on two installations running Kubuntu Gutsy (KDE 3.5.8). 
Please remember that this bug is not reproducible and obviously does not occur on every installation before claiming that it's fixed.
Comment 29 Jacob Wintersmith 2007-11-06 04:38:24 UTC
I also experienced this bug on Kubuntu Gutsy Gibbon (KDE 3.5.8). However, I came across someone who suggested (http://dgtlmoon.com/all_your_cpu_are_belong_to_kded) installing famd and dnotify. This appears to have fixed the problem.
Comment 30 Marc Schiffbauer 2007-11-06 22:43:53 UTC
Thanks Jacob!

This seems indeed to have fixed the problem here, too!

Additional comment: fam was already installed here, but dnotify was not.

So it turns out to be a packaging bug?

If so, kded might still behave better if dnotify is not there... (IMO)
Comment 31 Aaron Williams 2007-11-07 23:11:30 UTC
I personally detest famd since I have had many instances, especially with NFS, with famd consuming huge amounts of CPU as well and bringing the system to a crawl and requiring me to kill famd.

The problem with kded seems to happen when multiple applications try and access it at the same time, I suspect kwallet myself.
Comment 32 Thomas Vollmer 2007-11-08 08:51:11 UTC
Today I had kded hanging again. Besides fam, which I had installed 
already, I also installed dnotifiy yesterday.

For me it seems that it depends on how long I need to enter the password 
for the wallet to open. When I enter the password in the first few 
seconds after the dialog appears everything goes fine. But waiting 
longer (30 secs for example) causes the hang.
Comment 33 Thomas Vollmer 2007-11-21 18:08:28 UTC
Some news from me on this bug.

I configured kdelibs with the --enable-dnotify flag and without having dnotify installed. 

After the reports that installing dnotify helps, I also installed it. Without success. But then I did a clean build of kdelibs with dnotify installed, and now the problem seems to be gone.
Comment 34 Jan Essert 2007-11-22 10:26:08 UTC
OK, I have a Gentoo system. My linux kernel has inotify enabled. I always thought that for inotify support I would need something like fam or gamin. I use the latter, hence my kdelibs are compiled with --enable-fam and (this is automatically selected by gentoo on linux) --enable-dnotify.
I somehow heard that there is a kdelibs-internal thing using inotify, so I probably wouldn't need gamin either?

Does it make sense to enable multiple things of these? Shouldn't dnotify automatically be disabled if fam is selected or something?

So, my question is: which one of these should I enable? Perhaps disabling both fam and dnotify would solve the problem, and in addition kdelibs would use inotify by itself, which would be my favored solution?
Comment 35 Marcel Schaal 2007-11-23 08:56:16 UTC
I can confirm Thomas using Ubuntu Feisty earlier and Gutsy now. Kded hangs with or without fam and dnotify. It seems to be a some sort of timeout problem, because today I waited about a minute to enter the password into kwallet and after that kded eats my cpu.

More Informations: On startup kded restores konqueror, kmail and kopete and all of them request passwords from kwallet. My Home is mounted on nfsv4
Comment 36 Nick LeRoy 2007-11-26 15:41:49 UTC
I'm also seeing this problem, and have been for quite some time..  It's followed me from SuSE 9.3 to openSuse 10.3, and still hit's me probably 1/2 the time I login or more.  I've found that a simple script which does a 'killall -9 kded; kdedinit kded' that I run by hand is a work-around, but this still needs to get fixed.
Comment 37 Marcus Better 2008-01-08 10:57:09 UTC
Debian bug entry: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453618
Comment 38 Iñaki Baz Castillo 2008-01-21 20:22:57 UTC
This issue occurs ALWAYS to me in my work host: at start I'm asked for my kdewallet password and after that kded consumes 100% and nothing works. The "solution" (as said above) is "killall -9 kded ; kded".
My work host is not very powerfull so I try to leave session open just a few apps (akregator, konqueror and kontact). But is not enought.

In my laptop (more powerful) it has never occured... until today. It's a AMD Turion 2xCPU with 1GB RAM. Yesterday when ended the session I left open konqueror, kontact, amarok, akregator and ktorrent. And this bug has occured now when starting.
Comment 39 David Faure 2008-09-16 17:18:21 UTC
Does this still happen with KDE 4.1 ?
Comment 40 Pascal Hofmann 2008-09-16 18:55:11 UTC
I think: no. It only happend to me while using kde 3.
Comment 41 David Faure 2008-09-17 10:29:55 UTC
Right, in fact kwalletd has been moved to a separate daemon, to fix such reentrancy problems in kded.