Bug 182956

Summary: Kmail/Kontact crashs if no network is available
Product: [Frameworks and Libraries] Akonadi Reporter: Jan Gerrit <JanGerrit>
Component: KResource compat bridgesAssignee: Kevin Krammer <krammer>
Status: RESOLVED FIXED    
Severity: crash CC: vkrause
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jan Gerrit 2009-02-03 08:54:08 UTC
Version:           1.11.0 (using KDE 4.2.0)
OS:                Linux
Installed from:    Ubuntu Packages

If You start Kmail or Kontact without network, it will be crashed. The same error occurs if You switch KNetworkManager to offline mode and start Kmail. I use KDE 4.2 from the Kubuntu-experimental ppa.

Kcrash log:
Anwendung: KMail (kmail), Signal SIGABRT
0x00007f4032921621 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 7667)]

Thread 2 (Thread 0x427e4950 (LWP 7674)):
#0  0x00007f402e42755d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f4033402327 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#2  0x00007f40333f8509 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007f4033401362 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007f402e4233ea in start_thread () from /lib/libpthread.so.0
#5  0x00007f403295fc6d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f4037e0a6f0 (LWP 7667)):
[KCrash Handler]
#5  0x00007f40328abfd5 in raise () from /lib/libc.so.6
#6  0x00007f40328adb43 in abort () from /lib/libc.so.6
#7  0x00007f40328f2960 in malloc_printerr () from /lib/libc.so.6
#8  0x00007f40334f7601 in QObjectPrivate::deleteChildren () from /usr/lib/libQtCore.so.4
#9  0x00007f40335003c7 in QObject::~QObject () from /usr/lib/libQtCore.so.4
#10 0x00007f401d36a2a7 in ~CollectionFetchJob (this=0x1df3) at /build/buildd/kdepimlibs-4.2.0/akonadi/collectionfetchjob.cpp:100
#11 0x00007f40334f8dc5 in QObject::event () from /usr/lib/libQtCore.so.4
#12 0x00007f4033c0dc3d in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#13 0x00007f4033c159ba in QApplication::notify () from /usr/lib/libQtGui.so.4
#14 0x00007f40378475db in KApplication::notify (this=0x7fff3fe52c90, receiver=0x29b90f0, event=0x2a664b0) at /build/buildd/kde4libs-4.2.0/kdeui/kernel/kapplication.cpp:307
#15 0x00007f40334e9d61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#16 0x00007f40334ea9fa in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib/libQtCore.so.4
#17 0x00007f40335124d3 in ?? () from /usr/lib/libQtCore.so.4
#18 0x00007f402ac08d3b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#19 0x00007f402ac0c50d in ?? () from /usr/lib/libglib-2.0.so.0
#20 0x00007f402ac0c6cb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#21 0x00007f403351215f in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#22 0x00007f4033c9fa6f in ?? () from /usr/lib/libQtGui.so.4
#23 0x00007f40334e8682 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#24 0x00007f40334e880d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#25 0x00007f4034027065 in QDialog::exec () from /usr/lib/libQtGui.so.4
#26 0x00007f40377ce802 in KMessageBox::createKMessageBox (dialog=0x2a64020, icon=<value optimized out>, text=@0x7fff3fe43df0, strlist=@0x7fff3fe43bc0, ask=@0x7fff3fe43af0, checkboxReturn=0x0, 
    options={i = 1071921744}, details=@0x7fff3fe43ae0, notifyType=QMessageBox::Critical) at /build/buildd/kde4libs-4.2.0/kdeui/dialogs/kmessagebox.cpp:330
#27 0x00007f40377cf9d7 in KMessageBox::createKMessageBox (dialog=0x2a64020, icon=QMessageBox::Critical, text=@0x7fff3fe43df0, strlist=@0x7fff3fe43bc0, ask=@0x7fff3fe43af0, checkboxReturn=0x0, 
    options={i = 1071922000}, details=@0x7fff3fe43ae0) at /build/buildd/kde4libs-4.2.0/kdeui/dialogs/kmessagebox.cpp:151
#28 0x00007f40377d083c in KMessageBox::errorListWId (parent_id=58722360, text=@0x7fff3fe43df0, strlist=@0x7fff3fe43bc0, caption=@0x7fff3fe43db0, options={i = 1071922128})
    at /build/buildd/kde4libs-4.2.0/kdeui/dialogs/kmessagebox.cpp:848
#29 0x00007f40377d0a08 in KMessageBox::error (parent=<value optimized out>, text=@0x7fff3fe43df0, caption=@0x7fff3fe43db0, options=<value optimized out>)
    at /build/buildd/kde4libs-4.2.0/kdeui/dialogs/kmessagebox.cpp:812
#30 0x00007f4036a73332 in KMail::ImapAccountBase::handleError (this=0x1f2f7d0, errorCode=114, errorMsg=@0x7fff3fe443a0, job=0x0, context=@0x7fff3fe43ea0, abortSync=true)
    at /build/buildd/kdepim-4.2.0/kmail/imapaccountbase.cpp:1057
#31 0x00007f4036a6c7a7 in KMail::ImapAccountBase::slotSchedulerSlaveError (this=0x1df3, aSlave=<value optimized out>, errorCode=114, errorMsg=@0x7fff3fe443a0)
    at /build/buildd/kdepim-4.2.0/kmail/imapaccountbase.cpp:630
#32 0x00007f4036a765ae in KMail::ImapAccountBase::qt_metacall (this=0x1f2f7d0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff3fe44020)
    at /build/buildd/kdepim-4.2.0/obj-x86_64-linux-gnu/kmail/imapaccountbase.moc:129
#33 0x00007f4036a7c885 in KMAcctImap::qt_metacall (this=0x1df3, _c=7667, _id=6, _a=0xffffffffffffffff) at /build/buildd/kdepim-4.2.0/obj-x86_64-linux-gnu/kmail/kmacctimap.moc:76
#34 0x00007f40334fe134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#35 0x00007f4034eb7b25 in KIO::Scheduler::slaveError (this=0x1df3, _t1=0x25813a0, _t2=114, _t3=<value optimized out>) at /build/buildd/kde4libs-4.2.0/obj-x86_64-linux-gnu/kio/scheduler.moc:124
#36 0x00007f4034ebe353 in KIO::Scheduler::qt_metacall (this=0x200e2e0, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>)
    at /build/buildd/kde4libs-4.2.0/obj-x86_64-linux-gnu/kio/scheduler.moc:104
#37 0x00007f40334fe134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#38 0x00007f4034ed0af6 in KIO::SlaveInterface::error (this=0x1df3, _t1=114, _t2=<value optimized out>) at /build/buildd/kde4libs-4.2.0/obj-x86_64-linux-gnu/kio/slaveinterface.moc:151
#39 0x00007f4034ed4399 in KIO::SlaveInterface::dispatch (this=0x25813a0, _cmd=102, rawdata=<value optimized out>) at /build/buildd/kde4libs-4.2.0/kio/kio/slaveinterface.cpp:208
#40 0x00007f4034ed0df2 in KIO::SlaveInterface::dispatch (this=0x25813a0) at /build/buildd/kde4libs-4.2.0/kio/kio/slaveinterface.cpp:91
#41 0x00007f4034ec2013 in KIO::Slave::gotInput (this=0x25813a0) at /build/buildd/kde4libs-4.2.0/kio/kio/slave.cpp:322
#42 0x00007f4034ec4318 in KIO::Slave::qt_metacall (this=0x25813a0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff3fe44560) at /build/buildd/kde4libs-4.2.0/obj-x86_64-linux-gnu/kio/slave.moc:75
#43 0x00007f40334fe134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#44 0x00007f4034deaf21 in KIO::ConnectionPrivate::dequeue (this=0x25876f0) at /build/buildd/kde4libs-4.2.0/kio/kio/connection.cpp:82
#45 0x00007f4034deb37a in KIO::Connection::qt_metacall (this=0x2588ad0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x2942a80)
    at /build/buildd/kde4libs-4.2.0/obj-x86_64-linux-gnu/kio/connection.moc:72
#46 0x00007f40334f8da5 in QObject::event () from /usr/lib/libQtCore.so.4
#47 0x00007f4033c0dc3d in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#48 0x00007f4033c159ba in QApplication::notify () from /usr/lib/libQtGui.so.4
#49 0x00007f40378475db in KApplication::notify (this=0x7fff3fe52c90, receiver=0x2588ad0, event=0x29ca640) at /build/buildd/kde4libs-4.2.0/kdeui/kernel/kapplication.cpp:307
#50 0x00007f40334e9d61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#51 0x00007f40334ea9fa in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib/libQtCore.so.4
#52 0x00007f40335124d3 in ?? () from /usr/lib/libQtCore.so.4
#53 0x00007f402ac08d3b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#54 0x00007f402ac0c50d in ?? () from /usr/lib/libglib-2.0.so.0
#55 0x00007f402ac0c6cb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#56 0x00007f403351215f in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#57 0x00007f4033c9fa6f in ?? () from /usr/lib/libQtGui.so.4
#58 0x00007f40334e8682 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#59 0x00007f40334e880d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#60 0x00007f4034027065 in QDialog::exec () from /usr/lib/libQtGui.so.4
#61 0x00007f40377ce802 in KMessageBox::createKMessageBox (dialog=0x2909c30, icon=<value optimized out>, text=@0x7fff3fe45850, strlist=@0x7fff3fe45620, ask=@0x7fff3fe45550, checkboxReturn=0x0, 
    options={i = 1071928496}, details=@0x7fff3fe45540, notifyType=QMessageBox::Critical) at /build/buildd/kde4libs-4.2.0/kdeui/dialogs/kmessagebox.cpp:330
#62 0x00007f40377cf9d7 in KMessageBox::createKMessageBox (dialog=0x2909c30, icon=QMessageBox::Critical, text=@0x7fff3fe45850, strlist=@0x7fff3fe45620, ask=@0x7fff3fe45550, checkboxReturn=0x0, 
    options={i = 1071928752}, details=@0x7fff3fe45540) at /build/buildd/kde4libs-4.2.0/kdeui/dialogs/kmessagebox.cpp:151
#63 0x00007f40377d083c in KMessageBox::errorListWId (parent_id=58722360, text=@0x7fff3fe45850, strlist=@0x7fff3fe45620, caption=@0x7fff3fe45810, options={i = 1071928880})
    at /build/buildd/kde4libs-4.2.0/kdeui/dialogs/kmessagebox.cpp:848
#64 0x00007f40377d0a08 in KMessageBox::error (parent=<value optimized out>, text=@0x7fff3fe45850, caption=@0x7fff3fe45810, options=<value optimized out>)
    at /build/buildd/kde4libs-4.2.0/kdeui/dialogs/kmessagebox.cpp:812
#65 0x00007f4036a73332 in KMail::ImapAccountBase::handleError (this=0x1f51ab0, errorCode=114, errorMsg=@0x7fff3fe45e00, job=0x0, context=@0x7fff3fe45900, abortSync=true)
    at /build/buildd/kdepim-4.2.0/kmail/imapaccountbase.cpp:1057
#66 0x00007f4036a6c7a7 in KMail::ImapAccountBase::slotSchedulerSlaveError (this=0x1df3, aSlave=<value optimized out>, errorCode=114, errorMsg=@0x7fff3fe45e00)
    at /build/buildd/kdepim-4.2.0/kmail/imapaccountbase.cpp:630
#67 0x00007f4036a765ae in KMail::ImapAccountBase::qt_metacall (this=0x1f51ab0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff3fe45a80)
    at /build/buildd/kdepim-4.2.0/obj-x86_64-linux-gnu/kmail/imapaccountbase.moc:129
#68 0x00007f4036a7c885 in KMAcctImap::qt_metacall (this=0x1df3, _c=7667, _id=6, _a=0xffffffffffffffff) at /build/buildd/kdepim-4.2.0/obj-x86_64-linux-gnu/kmail/kmacctimap.moc:76
#69 0x00007f40334fe134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#70 0x00007f4034eb7b25 in KIO::Scheduler::slaveError (this=0x1df3, _t1=0x25529e0, _t2=114, _t3=<value optimized out>) at /build/buildd/kde4libs-4.2.0/obj-x86_64-linux-gnu/kio/scheduler.moc:124
#71 0x00007f4034ebe353 in KIO::Scheduler::qt_metacall (this=0x200e2e0, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>)
    at /build/buildd/kde4libs-4.2.0/obj-x86_64-linux-gnu/kio/scheduler.moc:104
#72 0x00007f40334fe134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#73 0x00007f4034ed0af6 in KIO::SlaveInterface::error (this=0x1df3, _t1=114, _t2=<value optimized out>) at /build/buildd/kde4libs-4.2.0/obj-x86_64-linux-gnu/kio/slaveinterface.moc:151
#74 0x00007f4034ed4399 in KIO::SlaveInterface::dispatch (this=0x25529e0, _cmd=102, rawdata=<value optimized out>) at /build/buildd/kde4libs-4.2.0/kio/kio/slaveinterface.cpp:208
#75 0x00007f4034ed0df2 in KIO::SlaveInterface::dispatch (this=0x25529e0) at /build/buildd/kde4libs-4.2.0/kio/kio/slaveinterface.cpp:91
#76 0x00007f4034ec2013 in KIO::Slave::gotInput (this=0x25529e0) at /build/buildd/kde4libs-4.2.0/kio/kio/slave.cpp:322
#77 0x00007f4034ec4318 in KIO::Slave::qt_metacall (this=0x25529e0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff3fe45fc0) at /build/buildd/kde4libs-4.2.0/obj-x86_64-linux-gnu/kio/slave.moc:75
#78 0x00007f40334fe134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#79 0x00007f4034deaf21 in KIO::ConnectionPrivate::dequeue (this=0x2581050) at /build/buildd/kde4libs-4.2.0/kio/kio/connection.cpp:82
#80 0x00007f4034deb37a in KIO::Connection::qt_metacall (this=0x2581440, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x29cafd0)
    at /build/buildd/kde4libs-4.2.0/obj-x86_64-linux-gnu/kio/connection.moc:72
#81 0x00007f40334f8da5 in QObject::event () from /usr/lib/libQtCore.so.4
#82 0x00007f4033c0dc3d in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#83 0x00007f4033c159ba in QApplication::notify () from /usr/lib/libQtGui.so.4
#84 0x00007f40378475db in KApplication::notify (this=0x7fff3fe52c90, receiver=0x2581440, event=0x285d660) at /build/buildd/kde4libs-4.2.0/kdeui/kernel/kapplication.cpp:307
#85 0x00007f40334e9d61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#86 0x00007f40334ea9fa in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib/libQtCore.so.4
#87 0x00007f40335124d3 in ?? () from /usr/lib/libQtCore.so.4
#88 0x00007f402ac08d3b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#89 0x00007f402ac0c50d in ?? () from /usr/lib/libglib-2.0.so.0
#90 0x00007f402ac0c6cb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#91 0x00007f403351215f in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#92 0x00007f4033c9fa6f in ?? () from /usr/lib/libQtGui.so.4
#93 0x00007f40334e8682 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#94 0x00007f40334e880d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#95 0x00007f40372c68e7 in KJob::exec (this=0x29b90f0) at /build/buildd/kde4libs-4.2.0/kdecore/jobs/kjob.cpp:195
#96 0x00007f401d5fa11f in KABC::ResourceAkonadi::asyncLoad (this=0x2275150) at /build/buildd/kdepim-4.2.0/kresources/akonadi/kabc/resourceakonadi.cpp:409
#97 0x00007f4035ae1001 in KABC::AddressBook::asyncLoad (this=0x2556a50) at /build/buildd/kdepimlibs-4.2.0/kabc/addressbook.cpp:369
#98 0x00007f4035b0c368 in KABC::StdAddressBook::Private::init (this=0x29931d0, asynchronous=true) at /build/buildd/kdepimlibs-4.2.0/kabc/stdaddressbook.cpp:181
#99 0x00007f4035b0d60b in KABC::StdAddressBook::self (asynchronous=<value optimized out>) at /build/buildd/kdepimlibs-4.2.0/kabc/stdaddressbook.cpp:92
#100 0x00007f4036b4a213 in KMail::FancyHeaderStyle::format (this=<value optimized out>, message=0x284ce60, strategy=0x1c49eb0, vCardName=@0x7fff3fe51910, printing=<value optimized out>, 
    topLevel=true) at /build/buildd/kdepim-4.2.0/kmail/headerstyle.cpp:455
#101 0x00007f40369d7cb7 in KMReaderWin::writeMsgHeader (this=0x22074e0, aMsg=0x284ce60, hasVCard=false, topLevel=false) at /build/buildd/kdepim-4.2.0/kmail/kmreaderwin.cpp:1733
#102 0x00007f40369de790 in KMReaderWin::parseMsg (this=0x22074e0, aMsg=0x284ce60) at /build/buildd/kdepim-4.2.0/kmail/kmreaderwin.cpp:1618
#103 0x00007f40369cc577 in KMReaderWin::displayMessage (this=0x22074e0) at /build/buildd/kdepim-4.2.0/kmail/kmreaderwin.cpp:1555
#104 0x00007f40369cc765 in KMReaderWin::updateReaderWin (this=0x22074e0) at /build/buildd/kdepim-4.2.0/kmail/kmreaderwin.cpp:1495
#105 0x00007f40369d9c35 in KMReaderWin::qt_metacall (this=0x22074e0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff3fe52180)
    at /build/buildd/kdepim-4.2.0/obj-x86_64-linux-gnu/kmail/kmreaderwin.moc:164
#106 0x00007f40334fe134 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#107 0x00007f40334f8a43 in QObject::event () from /usr/lib/libQtCore.so.4
#108 0x00007f4033c0dc3d in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#109 0x00007f4033c159ba in QApplication::notify () from /usr/lib/libQtGui.so.4
#110 0x00007f40378475db in KApplication::notify (this=0x7fff3fe52c90, receiver=0x2207578, event=0x7fff3fe52830) at /build/buildd/kde4libs-4.2.0/kdeui/kernel/kapplication.cpp:307
#111 0x00007f40334e9d61 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#112 0x00007f4033515ab6 in ?? () from /usr/lib/libQtCore.so.4
#113 0x00007f40335121fd in ?? () from /usr/lib/libQtCore.so.4
#114 0x00007f402ac08d3b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#115 0x00007f402ac0c50d in ?? () from /usr/lib/libglib-2.0.so.0
#116 0x00007f402ac0c6cb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#117 0x00007f403351215f in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#118 0x00007f4033c9fa6f in ?? () from /usr/lib/libQtGui.so.4
#119 0x00007f40334e8682 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#120 0x00007f40334e880d in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#121 0x00007f40334eacbd in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#122 0x000000000040309b in main (argc=<value optimized out>, argv=<value optimized out>) at /build/buildd/kdepim-4.2.0/kmail/main.cpp:146
Comment 1 Kevin Krammer 2009-02-08 14:41:02 UTC
SVN commit 923208 by krake:

Using nested event loops to achieve synchronous call behavior while doing Akonadi jobs has created way to many issues due to unexpected re-entrancy.

This is basically backport of a series of changes in trunk which replace this form of blocking with real blocking of the caller and delegating the Akonadi job execution to a worker thread.

This should fix all the bugs this is sent to. If they remain with 4.2.1 once it is released, please re-open.

DarĂ­o, in case I missed some of the eventloop related bugs, please feel free to close them as well.

BUG: 177294
BUG: 158129
BUG: 182475
BUG: 178869
BUG: 179577
BUG: 179838
BUG: 180384
BUG: 181153
BUG: 181966
BUG: 182833
BUG: 182956
BUG: 183187


 M  +210 -55   kabc/resourceakonadi.cpp  
 M  +202 -54   kcal/resourceakonadi.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=923208