Version: (using KDE 4.2.0) OS: Linux Installed from: Ubuntu Packages This bug was filed automatically on Ubuntu's Launchpad at https://launchpad.net/bugs/325009 If possible, please request required information there so that the original reporter can see responses. Original reporter says "kwalletd crashed during/after connection to wireless network (WPA-PSK secured) Password to the network is stored in kwallet" Architecture: i386 DistroRelease: Ubuntu 9.04 SourcePackage: kdebase-runtime Backtrace as follows: . Thread 1 (process 5170): #0 KWalletD::internalOpen (this=0xbfa02238, appid=@0x9fc4824, wallet=@0x9fc4830, isPath=false, w=316, modal=true, service=@0x9fc4834) at /build/buildd/kdebase-runtime-4.2.0/kwalletd/backend/kwalletbackend.h:132 brandNew = <value optimized out> thisApp = {static null = {<No data fields>}, static shared_null = { ref = {_q_value = 2645}, alloc = 0, size = 0, data = 0xb75e29ba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 43}, alloc = 0, size = 0, data = 0xb75e29ce, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = { 0}}, d = 0x9fbfb88, static codecForCStrings = 0x0} rc = 1584946119 __PRETTY_FUNCTION__ = "int KWalletD::internalOpen(const QString&, const QString&, bool, WId, bool, const QString&)" #1 0xb7fb95b9 in KWalletD::doTransactionOpen (this=0xbfa02238, appid=@0x9fc4824, wallet=@0x9fc4830, isPath=<value optimized out>, wId=<value optimized out>, modal=true, service=@0x9fc4834) at /build/buildd/kdebase-runtime-4.2.0/kwalletd/kwalletd.cpp:400 rc = <value optimized out> #2 0xb7fba67b in KWalletD::processTransactions (this=0xbfa02238) at /build/buildd/kdebase-runtime-4.2.0/kwalletd/kwalletd.cpp:182 res = -1085755392 processing = true #3 0xb7fba916 in KWalletD::qt_metacall (this=0xbfa02238, _c=QMetaObject::InvokeMetaMethod, _id=57, _a=0xbfa01ad8) at /build/buildd/kdebase-runtime-4.2.0/obj-i486-linux-gnu/kwalletd/kwalletd.moc:275 No locals. #4 0xb7511c10 in QMetaObject::activate () from /usr/lib/libQtCore.so.4 #5 0xb7512992 in QMetaObject::activate () from /usr/lib/libQtCore.so.4 #6 0xb7517f67 in ?? () from /usr/lib/libQtCore.so.4 #7 0xb751808c in ?? () from /usr/lib/libQtCore.so.4 #8 0xb750c6ef in QObject::event () from /usr/lib/libQtCore.so.4 #9 0xb6ba087c in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4 #10 0xb6ba86fe in QApplication::notify () from /usr/lib/libQtGui.so.4 #11 0xb7a3300d in KApplication::notify (this=0xbfa02294, receiver=0x9fc44b0, event=0xbfa01f6c) at /build/buildd/kde4libs-4.2.0/kdeui/kernel/kapplication.cpp:307 No locals. #12 0xb74fcff1 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4 #13 0xb752af31 in ?? () from /usr/lib/libQtCore.so.4 #14 0xb75276d0 in ?? () from /usr/lib/libQtCore.so.4 #15 0xb647cbf8 in IA__g_main_context_dispatch (context=0x9f1a898) at /build/buildd/glib2.0-2.19.6/glib/gmain.c:1814 No locals. #16 0xb64802a3 in g_main_context_iterate (context=0x9f1a898, block=1, dispatch=1, self=0x9f141a0) at /build/buildd/glib2.0-2.19.6/glib/gmain.c:2448 max_priority = 0 timeout = 0 some_ready = 1 nfds = 5 allocated_nfds = <value optimized out> fds = (GPollFD *) 0x9fc1ce0 __PRETTY_FUNCTION__ = "g_main_context_iterate" #17 0xb6480461 in IA__g_main_context_iteration (context=0x9f1a898, may_block=1) at /build/buildd/glib2.0-2.19.6/glib/gmain.c:2511 retval = <value optimized out> #18 0xb7527628 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4 #19 0xb6c3aee5 in ?? () from /usr/lib/libQtGui.so.4 #20 0xb74fb6ba in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4 #21 0xb74fb87a in QEventLoop::exec () from /usr/lib/libQtCore.so.4 #22 0xb74fdf35 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4 #23 0xb6ba06f7 in QApplication::exec () from /usr/lib/libQtGui.so.4 #24 0xb7fafcd9 in kdemain (argc=1, argv=0xbfa02414) at /build/buildd/kdebase-runtime-4.2.0/kwalletd/main.cpp:66 aboutdata = {d = 0x9f053b0} app = {<KApplication> = {<> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0xb734ad48, stringdata = 0xb7bacfc0 "KApplication", data = 0xb7bad160, extradata = 0x0}}, static loadedByKdeinit = false, static KApp = 0xbfa02294, d = 0x9f49f68}, static staticMetaObject = {d = { superdata = 0xb7bd4ca0, stringdata = 0xb7bad960 "KUniqueApplication", data = 0xb7bada60, extradata = 0x0}}, d = 0x9fa42b0} walletd = {<> = {<No data fields>}, <QDBusContext> = {d_ptr = 0x0}, static staticMetaObject = {d = {superdata = 0xb75dc278, stringdata = 0xb7fc58e0 "KWalletD", data = 0xb7fc6220, extradata = 0x0}}, _wallets = {{d = 0xa1f0510, e = 0xa1f0510}}, _dw = 0x9fa47e8, _failed = 0, _leaveOpen = false, _closeIdle = true, _launchManager = true, _enabled = true, _openPrompt = true, _firstUse = false, _showingFailureNotify = false, _idleTime = 600000, _implicitAllowMap = {{d = 0x9fab0e8, e = 0x9fab0e8}}, _implicitDenyMap = {{ d = 0x9fa5450, e = 0x9fa5450}}, _closeTimers = {<> = {<No data fields>}, static staticMetaObject = {d = { superdata = 0xb75dc278, stringdata = 0xb7fc7180 "KTimeout", data = 0xb7fc7200, extradata = 0x0}}, _timers = {{d = 0xa1e78e8, e = 0xa1e78e8}}}, _syncTimers = {<> = {<No data fields>}, static staticMetaObject = {d = {superdata = 0xb75dc278, stringdata = 0xb7fc7180 "KTimeout", data = 0xb7fc7200, extradata = 0x0}}, _timers = {{d = 0x9ff6570, e = 0x9ff6570}}}, _syncTime = 5000, _curtrans = 0x9fc4820, _transactions = {{p = { static shared_null = {ref = {_q_value = 549}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x9f183a0}, d = 0x9f183a0}}, activeDialog = {o = 0x0}, screensaver = 0x9fa5b80, _sessions = {m_sessions = {{d = 0x9fc5508, e = 0x9fc5508}}}} res = <value optimized out> __PRETTY_FUNCTION__ = "int kdemain(int, char**)" #25 0x08048672 in main (argc=) at /build/buildd/kdebase-runtime-4.2.0/obj-i486-linux-gnu/kwalletd/kwalletd_dummy.cpp:3 No locals.
I have similar crash, using kde 4.2.1 QT 4.5.0 gentoo linux packages. Application: KDE Wallet Service (kwalletd), signal SIGSEGV Thread 1 (Thread 0xb62158e0 (LWP 8140)): [KCrash Handler] #6 0xb7fc9c56 in KWallet::Backend::ref (this=0x0) at /var/tmp/portage/kde-base/kwalletd-4.2.1/work/kwalletd-4.2.1/kwalletd/backend/kwalletbackend.h:132 #7 0xb7fc719b in KWalletD::internalOpen (this=0xbfdf9204, appid=@0x8145694, wallet=@0x81456a0, isPath=false, w=0, modal=true, service=@0x81456a4) at /var/tmp/portage/kde-base/kwalletd-4.2.1/work/kwalletd-4.2.1/kwalletd/kwalletd.cpp:535 #8 0xb7fc74da in KWalletD::doTransactionOpen (this=0xbfdf9204, appid=@0x8145694, wallet=@0x81456a0, isPath=<value optimized out>, wId=<value optimized out>, modal=true, service=@0x81456a4) at /var/tmp/portage/kde-base/kwalletd-4.2.1/work/kwalletd-4.2.1/kwalletd/kwalletd.cpp:396 #9 0xb7fc81eb in KWalletD::processTransactions (this=0xbfdf9204) at /var/tmp/portage/kde-base/kwalletd-4.2.1/work/kwalletd-4.2.1/kwalletd/kwalletd.cpp:182 #10 0xb7fc845e in KWalletD::qt_metacall (this=0xbfdf9204, _c=QMetaObject::InvokeMetaMethod, _id=57, _a=0xbfdf8aa8) at /var/tmp/portage/kde-base/kwalletd-4.2.1/work/kwalletd_build/kwalletd/kwalletd.moc:276 #11 0xb75c9ca9 in QMetaObject::activate (sender=0x81182b8, from_signal_index=<value optimized out>, to_signal_index=4, argv=0x0) at kernel/qobject.cpp:3057 #12 0xb75ca2c3 in QMetaObject::activate (sender=0x81182b8, m=0xb7666924, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3134 #13 0xb75cf8f8 in QSingleShotTimer::timeout (this=0x81182b8) at .moc/debug-shared/qtimer.moc:76 #14 0xb75cfa2d in QSingleShotTimer::timerEvent (this=0x81182b8) at kernel/qtimer.cpp:298 #15 0xb75c461f in QObject::event (this=0x81182b8, e=0xbfdf8f4c) at kernel/qobject.cpp:1073 #16 0xb6c6478c in QApplicationPrivate::notify_helper (this=0x8059898, receiver=0x81182b8, e=0xbfdf8f4c) at kernel/qapplication.cpp:4084 #17 0xb6c6d550 in QApplication::notify (this=0xbfdf9280, receiver=0x81182b8, e=0xbfdf8f4c) at kernel/qapplication.cpp:3631 #18 0xb7a7b7d4 in KApplication::notify (this=0xbfdf9280, receiver=0x81182b8, event=0xbfdf8f4c) at /var/tmp/portage/kde-base/kdelibs-4.2.1/work/kdelibs-4.2.1/kdeui/kernel/kapplication.cpp:307 #19 0xb75b34c2 in QCoreApplication::notifyInternal (this=0xbfdf9280, receiver=0x81182b8, event=0xbfdf8f4c) at kernel/qcoreapplication.cpp:598 #20 0xb75e1377 in QTimerInfoList::activateTimers (this=0x805c994) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213 #21 0xb75de521 in timerSourceDispatch (source=0x805c960) at kernel/qeventdispatcher_glib.cpp:164 #22 0xb65a20cf in IA__g_main_context_dispatch (context=0x805b858) at gmain.c:2144 #23 0xb65a58ab in g_main_context_iterate (context=0x805b858, block=1, dispatch=1, self=0x8058c30) at gmain.c:2778 #24 0xb65a5a62 in IA__g_main_context_iteration (context=0x805b858, may_block=1) at gmain.c:2841 #25 0xb75de479 in QEventDispatcherGlib::processEvents (this=0x804f5d0, flags={i = -1075867448}) at kernel/qeventdispatcher_glib.cpp:323 #26 0xb6cfdb96 in QGuiEventDispatcherGlib::processEvents (this=0x804f5d0, flags={i = -1075867400}) at kernel/qguieventdispatcher_glib.cpp:202 #27 0xb75b1eab in QEventLoop::processEvents (this=0xbfdf9160, flags={i = -1075867336}) at kernel/qeventloop.cpp:149 #28 0xb75b208a in QEventLoop::exec (this=0xbfdf9160, flags={i = -1075867288}) at kernel/qeventloop.cpp:196 #29 0xb75b7211 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880 #30 0xb6c644a8 in QApplication::exec () at kernel/qapplication.cpp:3553 #31 0xb7fc0a85 in kdemain (argc=1, argv=0xbfdf93c4) at /var/tmp/portage/kde-base/kwalletd-4.2.1/work/kwalletd-4.2.1/kwalletd/main.cpp:68 #32 0x08048782 in main (argc=) at /var/tmp/portage/kde-base/kwalletd-4.2.1/work/kwalletd_build/kwalletd/kwalletd_dummy.cpp:3
Which application/application version does it crash with for you Karl?
The kde twitter widget that comes with kde 4.2.1
I found a way to reproduce this. Logout of KDE rm -rf $HOME/.kde4.2 Login. Add kde twitter widget with kde wallet. crash. If I then logout/login kdetwitter with kwallet works fine.
Created attachment 33980 [details] Fix crash in internalOpen() Check that the rc key is still in the _wallets hash. The problem is that isAuthorizedApp() can open a dialog. If during execution of that dialog the _wallets hash could be changed, it no longer contains the desired value. Michael, can you please check if the patch makes sense? I am not 100% sure how the wallet works, and because this may affect sensible data, I will not commit myself :) Thanks.
Created attachment 33990 [details] Fix crash in internalOpen() (fixed version) This compiles :)
SVN commit 975518 by mleupold: Crashfix. Before checking if an application is authorized, add a reference so the wallet isn't accidentally closed while kwalletd asks for authorization. After the authorization dialog returns, check if the wallet is still available (it might have been forcefully closed). @Christoph: Thanks for finding and fixing this bug. BUG:183112 M +21 -4 kwalletd.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=975518
SVN commit 975521 by mleupold: Backport of r975518: Crashfix. Before checking if an application is authorized, add a reference so the wallet isn't accidentally closed while kwalletd asks for authorization. After the authorization dialog returns, check if the wallet is still available (it might have been forcefully closed). CCBUG:183112 M +21 -4 kwalletd.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=975521
*** Bug 167887 has been marked as a duplicate of this bug. ***