Summary: | kwalletd crashed with SIGSEGV in QMetaObject::activate() | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdelibs | Reporter: | Connor Imes <connor.k.imes> |
Component: | kwallet | Assignee: | Michael Leupold <lemma> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | cfeck, karl, kde-bugs |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Fix crash in internalOpen()
Fix crash in internalOpen() (fixed version) |
Description
Connor Imes
2009-02-04 01:36:13 UTC
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. *** |