Bug 223445

Summary: When Akonadi is not started, KMail displays bogus error message and crashes
Product: [Applications] kmail2 Reporter: Thomas McGuire <mcguire>
Component: miscAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: cuciferus, vkrause
Priority: LO Keywords: akonadi-ports-regression
Version: 1.99.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 223438    
Attachments: New crash information added by DrKonqi

Description Thomas McGuire 2010-01-19 19:56:37 UTC
Version:           1.99.0 (using Devel)
OS:                Linux

When starting KMail without starting Akonadi first, the following message will be displayed:

"Unable to create agent instance."

When clicking Ok, KMail crashes.

Application: KMail (kmail), signal: Aborted
[Current thread is 1 (Thread 0x7f5b60dd0750 (LWP 21640))]

Thread 3 (Thread 0x7f5b49a76950 (LWP 21660)):
#0  0x00007f5b5a081672 in select () from /lib64/libc.so.6
#1  0x00007f5b5b412fd9 in QProcessManager::run (this=0x7f5b5b7bb700) at io/qprocess_unix.cpp:245
#2  0x00007f5b5b312962 in QThreadPrivate::start (arg=0x7f5b5b7bb700) at thread/qthread_unix.cpp:248
#3  0x00007f5b5b061070 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f5b5a08811d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f5b48c49950 (LWP 21686)):
#0  0x00007f5b5b064d59 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f5b531bf319 in WTF::TCMalloc_PageHeap::scavengerThread() () from /media/kdedev/trunk/src/KDE/kde-qt/lib/libQtWebKit.so.4
#2  0x00007f5b531bf3a3 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /media/kdedev/trunk/src/KDE/kde-qt/lib/libQtWebKit.so.4
#3  0x00007f5b5b061070 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f5b5a08811d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f5b60dd0750 (LWP 21640)):
[KCrash Handler]
#5  0x00007f5b59fe7645 in raise () from /lib64/libc.so.6
#6  0x00007f5b59fe8c33 in abort () from /lib64/libc.so.6
#7  0x00007f5b5b306025 in qt_message_output (msgType=QtFatalMsg, 
    buf=0x93a3c8 "Fatal Error: Accessed global static 'QList<KMainWindow*> *sMemberList()' after destruction. Defined at /media/kdedev/trunk/src/KDE/kdelibs/kdeui/widgets/kmainwindow.cpp:215")
    at global/qglobal.cpp:2250
#8  0x00007f5b5b30621d in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, 
    msg=0x7f5b609377e8 "Fatal Error: Accessed global static '%s *%s()' after destruction. Defined at %s:%d", ap=0x7fff236b5410) at global/qglobal.cpp:2296
#9  0x00007f5b5b306349 in qFatal (msg=0x7f5b609377e8 "Fatal Error: Accessed global static '%s *%s()' after destruction. Defined at %s:%d") at global/qglobal.cpp:2479
#10 0x00007f5b608643de in <anonymous struct>::operator->(void) (this=0x7f5b60c0fb7c) at /media/kdedev/trunk/src/KDE/kdelibs/kdeui/widgets/kmainwindow.cpp:215
#11 0x00007f5b608644bd in <anonymous struct>::operator*(void) (this=0x7f5b60c0fb7c) at /media/kdedev/trunk/src/KDE/kdelibs/kdeui/widgets/kmainwindow.cpp:215
#12 0x00007f5b6086452b in KMainWindow::memberList () at /media/kdedev/trunk/src/KDE/kdelibs/kdeui/widgets/kmainwindow.cpp:1195
#13 0x00007f5b5f90e211 in KMKernel::dumpDeadLetters (this=0x7fff236b9280) at /media/kdedev/trunk/src/KDE/kdepim/kmail/kmkernel.cpp:1607
#14 0x00007f5b5f973fe2 in kmcrashHandler (sigId=11) at /media/kdedev/trunk/src/KDE/kdepim/kmail/kmstartup.cpp:68
#15 0x00007f5b607fefe2 in KCrash::defaultCrashHandler (sig=11) at /media/kdedev/trunk/src/KDE/kdelibs/kdeui/util/kcrash.cpp:240
#16 <signal handler called>
#17 0x00007f5b5c34fed4 in QVector<QAccessibleBridge*>::isEmpty (this=0x0) at ../../include/QtCore/../../src/corelib/tools/qvector.h:126
#18 0x00007f5b5c34fd7a in QAccessible::updateAccessibility (o=0x83ea70, who=0, reason=ObjectHide) at accessible/qaccessible_unix.cpp:99
#19 0x00007f5b5bcf40cd in QWidgetPrivate::hideChildren (this=0x83eda0, spontaneous=false) at kernel/qwidget.cpp:7520
#20 0x00007f5b5bcf42a5 in QWidgetPrivate::hide_helper (this=0x83eda0) at kernel/qwidget.cpp:7263
#21 0x00007f5b5bcfdbdb in QWidget::setVisible (this=0x83eba0, visible=false) at kernel/qwidget.cpp:7435
#22 0x00007f5b5bcd50c5 in QWidget::hide (this=0x83eba0) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:489
#23 0x00007f5b5bcf266a in QWidgetPrivate::close_helper (this=0x83eda0, mode=CloseNoEvent) at kernel/qwidget.cpp:7553
#24 0x00007f5b5bcf3c00 in QWidget::~QWidget (this=0x83eba0, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1421
#25 0x00007f5b5c1d6703 in QFrame::~QFrame (this=0x83eba0, __in_chrg=<value optimized out>) at widgets/qframe.cpp:242
#26 0x00007f5b5d2c3040 in ControlProgressIndicator::~ControlProgressIndicator (this=0x83eba0, __in_chrg=<value optimized out>) at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/control.cpp:39
#27 0x00007f5b5d2c2e4b in Akonadi::Control::Private::~Private (this=0x83d9e0, __in_chrg=<value optimized out>) at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/control.cpp:89
#28 0x00007f5b5d2c14a1 in Akonadi::Control::~Control (this=0x65c050, __in_chrg=<value optimized out>) at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/control.cpp:194
#29 0x00007f5b5d2c378b in StaticControl::~StaticControl (this=0x65c050, __in_chrg=<value optimized out>) at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/control.cpp:62
#30 0x00007f5b5d2c1280 in <anonymous struct>::destroy(void) () at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/control.cpp:67
#31 0x00007f5b5d25a031 in KCleanUpGlobalStatic::~KCleanUpGlobalStatic (this=0x7f5b5d625e40, __in_chrg=<value optimized out>) at /media/kdedev/trunk/kde/include/kglobal.h:62
#32 0x00007f5b59fea2ed in exit () from /lib64/libc.so.6
#33 0x00007f5b5f90d675 in KMKernel::emergencyExit (this=0x7fff236b9280, reason=...) at /media/kdedev/trunk/src/KDE/kdepim/kmail/kmkernel.cpp:1780
#34 0x00007f5b5f90ea19 in KMKernel::createDefaultCollectionDone (this=0x7fff236b9280, job=0x832570) at /media/kdedev/trunk/src/KDE/kdepim/kmail/kmkernel.cpp:1424
#35 0x00007f5b5f91b3ad in KMKernel::qt_metacall (this=0x7fff236b9280, _c=InvokeMetaMethod, _id=46, _a=0x7fff236b6710) at /media/kdedev/trunk/build/KDE/kdepim/kmail/kmkernel.moc:240
#36 0x00007f5b5b44699b in QMetaObject::metacall (object=0x7fff236b9280, cl=InvokeMetaMethod, idx=50, argv=0x7fff236b6710) at kernel/qmetaobject.cpp:237
#37 0x00007f5b5b45bc9a in QMetaObject::activate (sender=0x832570, m=0x7f5b605356c0, local_signal_index=3, argv=0x7fff236b6710) at kernel/qobject.cpp:3275
#38 0x00007f5b601857b5 in KJob::result (this=0x832570, _t1=0x832570) at /media/kdedev/trunk/build/KDE/kdelibs/kdecore/kjob.moc:194
#39 0x00007f5b60185ba1 in KJob::emitResult (this=0x832570) at /media/kdedev/trunk/src/KDE/kdelibs/kdecore/jobs/kjob.cpp:312
#40 0x00007f5b5d37bc6a in Akonadi::TransactionSequencePrivate::rollbackResult (this=0x834580, job=0x8c7b90) at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/transactionsequence.cpp:65
#41 0x00007f5b5d37b536 in Akonadi::TransactionSequence::qt_metacall (this=0x832570, _c=InvokeMetaMethod, _id=2, _a=0x7fff236b69c0)
    at /media/kdedev/trunk/build/KDE/kdepimlibs/akonadi/transactionsequence.moc:78
#42 0x00007f5b5d363d4f in Akonadi::SpecialCollectionsRequestJob::qt_metacall (this=0x832570, _c=InvokeMetaMethod, _id=36, _a=0x7fff236b69c0)
    at /media/kdedev/trunk/build/KDE/kdepimlibs/akonadi/specialcollectionsrequestjob.moc:73
#43 0x00007f5b578fbac5 in Akonadi::SpecialMailCollectionsRequestJob::qt_metacall (this=0x832570, _c=InvokeMetaMethod, _id=36, _a=0x7fff236b69c0)
    at /media/kdedev/trunk/build/KDE/kdepimlibs/akonadi/kmime/specialmailcollectionsrequestjob.moc:64
#44 0x00007f5b5b44699b in QMetaObject::metacall (object=0x832570, cl=InvokeMetaMethod, idx=36, argv=0x7fff236b69c0) at kernel/qmetaobject.cpp:237
#45 0x00007f5b5b45bc9a in QMetaObject::activate (sender=0x8c7b90, m=0x7f5b605356c0, local_signal_index=3, argv=0x7fff236b69c0) at kernel/qobject.cpp:3275
#46 0x00007f5b601857b5 in KJob::result (this=0x8c7b90, _t1=0x8c7b90) at /media/kdedev/trunk/build/KDE/kdelibs/kdecore/kjob.moc:194
#47 0x00007f5b60185ba1 in KJob::emitResult (this=0x8c7b90) at /media/kdedev/trunk/src/KDE/kdelibs/kdecore/jobs/kjob.cpp:312
#48 0x00007f5b5d31a31b in Akonadi::JobPrivate::handleResponse (this=0xae5a10, tag=..., data=...) at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/job.cpp:67
#49 0x00007f5b5d31a1ba in Akonadi::JobPrivate::handleResponse (this=0x834580, tag=..., data=...) at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/job.cpp:49
#50 0x00007f5b5d3521c1 in Akonadi::SessionPrivate::dataReceived (this=0x7740a0) at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/session.cpp:121
#51 0x00007f5b5d352ab3 in Akonadi::Session::qt_metacall (this=0x791ed0, _c=InvokeMetaMethod, _id=3, _a=0x7fff236b6e40) at /media/kdedev/trunk/build/KDE/kdepimlibs/akonadi/session.moc:87
#52 0x00007f5b5b44699b in QMetaObject::metacall (object=0x791ed0, cl=InvokeMetaMethod, idx=7, argv=0x7fff236b6e40) at kernel/qmetaobject.cpp:237
#53 0x00007f5b5b45bc9a in QMetaObject::activate (sender=0x79fab0, m=0x7f5b5b7b49a0, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3275
#54 0x00007f5b5b4c255a in QIODevice::readyRead (this=0x79fab0) at .moc/debug-shared/moc_qiodevice.cpp:91
#55 0x00007f5b5b4c25cd in QIODevice::qt_metacall (this=0x79fab0, _c=InvokeMetaMethod, _id=0, _a=0x7fff236b7050) at .moc/debug-shared/moc_qiodevice.cpp:77
#56 0x00007f5b5adbec02 in QLocalSocket::qt_metacall (this=0x79fab0, _c=InvokeMetaMethod, _id=4, _a=0x7fff236b7050) at .moc/debug-shared/moc_qlocalsocket.cpp:81
#57 0x00007f5b5b44699b in QMetaObject::metacall (object=0x79fab0, cl=InvokeMetaMethod, idx=4, argv=0x7fff236b7050) at kernel/qmetaobject.cpp:237
#58 0x00007f5b5b45bc9a in QMetaObject::activate (sender=0x79e9e8, m=0x7f5b5b7b49a0, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3275
#59 0x00007f5b5b4c255a in QIODevice::readyRead (this=0x79e9e8) at .moc/debug-shared/moc_qiodevice.cpp:91
#60 0x00007f5b5adb7597 in QAbstractSocketPrivate::canReadNotification (this=0x7de610) at socket/qabstractsocket.cpp:626
#61 0x00007f5b5adbaec5 in QAbstractSocketPrivate::readNotification (this=0x7de610) at socket/qabstractsocket_p.h:77
#62 0x00007f5b5ada054d in QAbstractSocketEngine::readNotification (this=0x61c650) at socket/qabstractsocketengine.cpp:154
#63 0x00007f5b5ada1ecf in QReadNotifier::event (this=0xabc290, e=0x7fff236b7aa0) at socket/qnativesocketengine.cpp:1089
#64 0x00007f5b5bc7b72b in QApplicationPrivate::notify_helper (this=0x64d4f0, receiver=0xabc290, e=0x7fff236b7aa0) at kernel/qapplication.cpp:4297
#65 0x00007f5b5bc7bba8 in QApplication::notify (this=0x7fff236b93a0, receiver=0xabc290, e=0x7fff236b7aa0) at kernel/qapplication.cpp:3701
#66 0x00007f5b607817d9 in KApplication::notify (this=0x7fff236b93a0, receiver=0xabc290, event=0x7fff236b7aa0) at /media/kdedev/trunk/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#67 0x00007f5b5b43eb81 in QCoreApplication::notifyInternal (this=0x7fff236b93a0, receiver=0xabc290, event=0x7fff236b7aa0) at kernel/qcoreapplication.cpp:704
#68 0x00007f5b5bc78abb in QCoreApplication::sendEvent (receiver=0xabc290, event=0x7fff236b7aa0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#69 0x00007f5b5b47bbfe in socketNotifierSourceDispatch (source=0x6528c0) at kernel/qeventdispatcher_glib.cpp:110
#70 0x00007f5b4f6030fb in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#71 0x00007f5b4f6068cd in ?? () from /usr/lib64/libglib-2.0.so.0
#72 0x00007f5b4f606a8b in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#73 0x00007f5b5b47a579 in QEventDispatcherGlib::processEvents (this=0x6166b0, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#74 0x00007f5b5bd6eea3 in QGuiEventDispatcherGlib::processEvents (this=0x6166b0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#75 0x00007f5b5b43af7b in QEventLoop::processEvents (this=0x7fff236b7e00, flags=...) at kernel/qeventloop.cpp:149
#76 0x00007f5b5b43b19f in QEventLoop::exec (this=0x7fff236b7e00, flags=...) at kernel/qeventloop.cpp:201
#77 0x00007f5b60186529 in KJob::exec (this=0x87ddc0) at /media/kdedev/trunk/src/KDE/kdelibs/kdecore/jobs/kjob.cpp:204
#78 0x00007f5b5f90a57c in KMKernel::allFoldersCollection (this=0x7fff236b9280) at /media/kdedev/trunk/src/KDE/kdepim/kmail/kmkernel.cpp:2022
#79 0x00007f5b5f9764a6 in KMMainWidget::initializeFolderShortcutActions (this=0x85b290) at /media/kdedev/trunk/src/KDE/kdepim/kmail/kmmainwidget.cpp:4049
#80 0x00007f5b5f97d1b4 in KMMainWidget::slotShowStartupFolder (this=0x85b290) at /media/kdedev/trunk/src/KDE/kdepim/kmail/kmmainwidget.cpp:3916
#81 0x00007f5b5f99e62b in KMMainWidget::qt_metacall (this=0x85b290, _c=InvokeMetaMethod, _id=96, _a=0x7fff236b81a0) at /media/kdedev/trunk/build/KDE/kdepim/kmail/kmmainwidget.moc:439
#82 0x00007f5b5b44699b in QMetaObject::metacall (object=0x85b290, cl=InvokeMetaMethod, idx=123, argv=0x7fff236b81a0) at kernel/qmetaobject.cpp:237
#83 0x00007f5b5b45bc9a in QMetaObject::activate (sender=0x9d12b0, m=0x7f5b5b7b33e0, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3275
#84 0x00007f5b5b465a4e in QSingleShotTimer::timeout (this=0x9d12b0) at .moc/debug-shared/qtimer.moc:82
#85 0x00007f5b5b465b8f in QSingleShotTimer::timerEvent (this=0x9d12b0) at kernel/qtimer.cpp:308
#86 0x00007f5b5b456552 in QObject::event (this=0x9d12b0, e=0x7fff236b8d50) at kernel/qobject.cpp:1212
#87 0x00007f5b5bc7b72b in QApplicationPrivate::notify_helper (this=0x64d4f0, receiver=0x9d12b0, e=0x7fff236b8d50) at kernel/qapplication.cpp:4297
#88 0x00007f5b5bc7bba8 in QApplication::notify (this=0x7fff236b93a0, receiver=0x9d12b0, e=0x7fff236b8d50) at kernel/qapplication.cpp:3701
#89 0x00007f5b607817d9 in KApplication::notify (this=0x7fff236b93a0, receiver=0x9d12b0, event=0x7fff236b8d50) at /media/kdedev/trunk/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#90 0x00007f5b5b43eb81 in QCoreApplication::notifyInternal (this=0x7fff236b93a0, receiver=0x9d12b0, event=0x7fff236b8d50) at kernel/qcoreapplication.cpp:704
#91 0x00007f5b5bc78abb in QCoreApplication::sendEvent (receiver=0x9d12b0, event=0x7fff236b8d50) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#92 0x00007f5b5b47e17f in QTimerInfoList::activateTimers (this=0x652990) at kernel/qeventdispatcher_unix.cpp:603
#93 0x00007f5b5b47b857 in timerSourceDispatch (source=0x652930) at kernel/qeventdispatcher_glib.cpp:184
#94 0x00007f5b4f6030fb in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#95 0x00007f5b4f6068cd in ?? () from /usr/lib64/libglib-2.0.so.0
#96 0x00007f5b4f606a8b in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#97 0x00007f5b5b47a579 in QEventDispatcherGlib::processEvents (this=0x6166b0, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#98 0x00007f5b5bd6eea3 in QGuiEventDispatcherGlib::processEvents (this=0x6166b0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#99 0x00007f5b5b43af7b in QEventLoop::processEvents (this=0x7847d0, flags=...) at kernel/qeventloop.cpp:149
#100 0x00007f5b5b43b19f in QEventLoop::exec (this=0x7847d0, flags=...) at kernel/qeventloop.cpp:201
#101 0x00007f5b5d2c1d94 in Akonadi::Control::Private::exec (this=0x83d9e0) at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/control.cpp:137
#102 0x00007f5b5d2c2297 in Akonadi::Control::start () at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/control.cpp:206
#103 0x00007f5b5d2c22ea in Akonadi::Control::start (parent=0x0) at /media/kdedev/trunk/src/KDE/kdepimlibs/akonadi/control.cpp:233
#104 0x00000000004041c6 in main (argc=1, argv=0x7fff236b9558) at /media/kdedev/trunk/src/KDE/kdepim/kmail/main.cpp:147
Comment 1 Cristi 2010-02-01 18:53:49 UTC
Created attachment 40441 [details]
New crash information added by DrKonqi

kmail starts but waits forever for akonadi to get started, there is no cancel nor anyway around it
Comment 2 Volker Krause 2010-03-13 12:47:24 UTC
Could you retest please? Should be fixed by the recent start-up changes.
Comment 3 Thomas McGuire 2010-03-15 22:54:15 UTC
Yep, seems to work now.
Thanks :)