kded DCOP deadlock (kwallet/kpasswdserver)

David Faure faure at kde.org
Thu Mar 10 09:09:49 GMT 2005


The problem with kded being a single process / single thread, is when two kded modules
want to talk to each other using DCOP:

#5  0x40ca6599 in QApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qapplication.cpp:3194
#6  0x40ca6565 in QApplication::sendPostedEvents () at kernel/qapplication.cpp:3172
#7  0x40c4b485 in QEventLoop::processEvents (this=0x8162350, flags=4) at kernel/qeventloop_x11.cpp:144
#8  0x40985a23 in DCOPClient::call (this=0x80e1970, remApp=@0xbfffdf00, remObjId=@0xbfffdf08, remFun=@0xbfffddc0, data=@0xbfffde60,
    replyType=@0xbfffdec8, replyData=@0xbfffdec0, useEventLoop=false, timeout=-1) at /mnt/devel/kde/kdecvs/kdelibs/dcop/dcopclient.cpp:1767

^ waits for DCOP call to KWallet to finish

#9  0x4097a2b2 in DCOPRef::callInternal (this=0xbfffdf00, fun=@0xbfffdef0, args=@0xbfffde70, data=@0xbfffde60, useEventLoop=NoEventLoop,
    timeout=-1) at /mnt/devel/kde/kdecvs/kdelibs/dcop/dcopref.cpp:77
#10 0x4097a083 in DCOPRef::callInternal (this=0xbfffdf00, fun=@0xbfffdef0, args=@0xbfffde70, data=@0xbfffde60)
    at /mnt/devel/kde/kdecvs/kdelibs/dcop/dcopref.cpp:52
#11 0x406f1e8c in DCOPRef::call<QString, unsigned int> (this=0xbfffdf00, fun=@0xbfffdef0, t1=@0xbfffdf70, t2=@0xbfffdebc) at dcopref.h:523
#12 0x406eeefe in KWallet::Wallet::openWallet (name=@0xbfffdf70, w=35651591, ot=KWallet::Wallet::Synchronous)
    at /mnt/devel/kde/kdecvs/kdelibs/kwallet/client/kwallet.cc:179
#13 0x42c4341f in KPasswdServer::checkAuthInfo (this=0x83a4828, info=
      {url = {m_strProtocol = {d = 0x84e7578}, m_strUser = {d = 0x8057050}, m_strPass = {d = 0x8057050}, m_strHost = {d = 0x84de840}, m_strPath = d = 0x84dbf60}, m_strRef_encoded = {d = 0x8057050}, m_strQuery_encoded = {d = 0x84df830}, m_bIsMalformed = false, m_iUriMode = URL, freeForUse = 1, m_iPort = 0, m_strPath_encoded = {d = 0x84dbf78}, d = 0x84e7e28}, username = {d = 0x8057050}, password = {d = 0x8057050}, prompt = {d = 0x805705}, caption = {d = 0x8057050}, comment = {d = 0x8057050}, commentLabel = {d = 0x8057050}, realmValue = {d = 0x8057050}, digestInfo = {d = 0x8057050, verifyPath = true, readOnly = false, keepPassword = false, modified = false, d = 0x805163a}, windowId=35651591)
    at /mnt/devel/kde/kdecvs/kdelibs/kio/kpasswdserver/kpasswdserver.cpp:125
#14 0x42c490e5 in KPasswdServer::process (this=0x83a4828, fun=@0xbfffe390, data=@0xbfffe3a0, replyType=@0xbfffe350, replyData=@0xbfffe340)
    at ./kio/kpasswdserver/kpasswdserver_skel.cpp:38
#15 0x40985374 in DCOPClient::receive (this=0x80e1970, objId=@0xbfffe380, fun=@0xbfffe390, data=@0xbfffe3a0, replyType=@0xbfffe350,
    replyData=@0xbfffe340) at /mnt/devel/kde/kdecvs/kdelibs/dcop/dcopclient.cpp:1653
#16 0x4097f6c4 in DCOPProcessInternal (d=0x80e19a0, opcode=2, key=183, dataReceived=@0xbfffe4a0, canPost=true)
    at /mnt/devel/kde/kdecvs/kdelibs/dcop/dcopclient.cpp:527
#17 0x4097f02b in DCOPProcessMessage (iceConn=0x80e1ba8, clientObject=0x80e19a0, opcode=2, length=307, replyWait=0x0, replyWaitRet=0xbfffe51c)
    at /mnt/devel/kde/kdecvs/kdelibs/dcop/dcopclient.cpp:435
#18 0x40992419 in KDE_IceProcessMessages (iceConn=0x80e1ba8, replyWait=0x0, replyReadyRet=0x0)
    at /mnt/devel/kde/kdecvs/kdelibs/dcop/KDE-ICE/process.c:326

^ while the dialog is up, kpasswdserver gets another DCOP request

#19 0x40986768 in DCOPClient::processSocketData (this=0x80e1970, fd=3) at /mnt/devel/kde/kdecvs/kdelibs/dcop/dcopclient.cpp:2031
#20 0x40987dfd in DCOPClient::qt_invoke (this=0x80e1970, _id=2, _o=0xbfffe690) at dcopclient.moc:176
#21 0x40d0a167 in QObject::activate_signal (this=0x8162fd0, clist=0x8163078, o=0xbfffe690) at kernel/qobject.cpp:2357
#22 0x40d0a4c0 in QObject::activate_signal (this=0x8162fd0, signal=2, param=3) at kernel/qobject.cpp:2450
#23 0x4106bc99 in QSocketNotifier::activated (this=0x8162fd0, t0=3) at .moc/debug-shared-mt/moc_qsocketnotifier.cpp:85
#24 0x40d2af40 in QSocketNotifier::event (this=0x8162fd0, e=0xbfffe900) at kernel/qsocketnotifier.cpp:280
#25 0x40ca58c9 in QApplication::internalNotify (this=0xbffff490, receiver=0x8162fd0, e=0xbfffe900) at kernel/qapplication.cpp:2635
#26 0x40ca4d8d in QApplication::notify (this=0xbffff490, receiver=0x8162fd0, e=0xbfffe900) at kernel/qapplication.cpp:2358
#27 0x407dbe03 in KApplication::notify (this=0xbffff490, receiver=0x8162fd0, event=0xbfffe900)
    at /mnt/devel/kde/kdecvs/kdelibs/kdecore/kapplication.cpp:549
#28 0x4004b209 in QApplication::sendEvent (receiver=0x8162fd0, event=0xbfffe900) at qapplication.h:491
#29 0x40c93827 in QEventLoop::activateSocketNotifiers (this=0x8162350) at kernel/qeventloop_unix.cpp:580
#30 0x40c4c020 in QEventLoop::processEvents (this=0x8162350, flags=4) at kernel/qeventloop_x11.cpp:383
#31 0x40cba838 in QEventLoop::enterLoop (this=0x8162350) at kernel/qeventloop.cpp:198
#32 0x40ca5ab3 in QApplication::enter_loop (this=0xbffff490) at kernel/qapplication.cpp:2790
#33 0x40ea90b5 in QDialog::exec (this=0x8202e80) at dialogs/qdialog.cpp:432
#34 0x42c6414f in KWalletD::internalOpen (this=0x837c060, appid=@0x841fa1c, wallet=@0x841fa28, isPath=false, w=56623111)
    at /mnt/devel/kde/kdecvs/kdelibs/kio/misc/kwalletd/kwalletd.cpp:426

^ KWallet is busy displaying a dialog

#35 0x42c635f0 in KWalletD::doTransactionOpen (this=0x837c060, appid=@0x841fa1c, wallet=@0x841fa28, wId=56623111)
    at /mnt/devel/kde/kdecvs/kdelibs/kio/misc/kwalletd/kwalletd.cpp:337
#36 0x42c626db in KWalletD::processTransactions (this=0x837c060) at /mnt/devel/kde/kdecvs/kdelibs/kio/misc/kwalletd/kwalletd.cpp:152
#37 0x42c68f1e in KWalletD::qt_invoke (this=0x837c060, _id=7, _o=0xbfffef10) at kwalletd.moc:100
#38 0x40d0a167 in QObject::activate_signal (this=0x80e2e40, clist=0x8204578, o=0xbfffef10) at kernel/qobject.cpp:2357
#39 0x4106ad20 in QSignal::signal (this=0x80e2e40, t0=@0x80e2e68) at .moc/debug-shared-mt/moc_qsignal.cpp:100
#40 0x40d280f5 in QSignal::activate (this=0x80e2e40) at kernel/qsignal.cpp:212
#41 0x40d2feeb in QSingleShotTimer::event (this=0x80e2e18) at kernel/qtimer.cpp:277
#42 0x40ca58c9 in QApplication::internalNotify (this=0xbffff490, receiver=0x80e2e18, e=0xbffff190) at kernel/qapplication.cpp:2635
#43 0x40ca4d8d in QApplication::notify (this=0xbffff490, receiver=0x80e2e18, e=0xbffff190) at kernel/qapplication.cpp:2358
#44 0x407dbe03 in KApplication::notify (this=0xbffff490, receiver=0x80e2e18, event=0xbffff190)
    at /mnt/devel/kde/kdecvs/kdelibs/kdecore/kapplication.cpp:549
#45 0x4004b209 in QApplication::sendEvent (receiver=0x80e2e18, event=0xbffff190) at qapplication.h:491
#46 0x40c93663 in QEventLoop::activateTimers (this=0x8162350) at kernel/qeventloop_unix.cpp:558
#47 0x40c4c045 in QEventLoop::processEvents (this=0x8162350, flags=4) at kernel/qeventloop_x11.cpp:389
#48 0x40cba838 in QEventLoop::enterLoop (this=0x8162350) at kernel/qeventloop.cpp:198
#49 0x40cba756 in QEventLoop::exec (this=0x8162350) at kernel/qeventloop.cpp:145
#50 0x40ca5a49 in QApplication::exec (this=0xbffff490) at kernel/qapplication.cpp:2758
#51 0x4174a01a in kdemain (argc=1, argv=0x8060370) at /mnt/devel/kde/kdecvs/kdelibs/kded/kded.cpp:897
#52 0x0804e432 in launch (argc=1, _name=0x8053405 "kded", args=0x0, cwd=0x0, envc=0, envs=0x0, reset_env=false, tty=0x0, avoid_loops=false,
    startup_id_str=0x8052d9f "0") at /mnt/devel/kde/kdecvs/kdelibs/kinit/kinit.cpp:625
#53 0x08051079 in main (argc=2, argv=0xbffff8e4, envp=0xbffff8f0) at /mnt/devel/kde/kdecvs/kdelibs/kinit/kinit.cpp:1778

Waldo: is this the kind of thing that can be fixed with DCOP transactions?
Or... any ideas?

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list