Summary: | Akonadi Imap resource crash when Relaunching KOrg | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Sabine Faure <sabine> |
Component: | IMAP resource | Assignee: | Kevin Ottens <ervin> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | faure, jtamate, kdepim-bugs, vkrause |
Priority: | NOR | Keywords: | akonadi-ports-regression |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Sabine Faure
2010-04-30 19:43:56 UTC
After the Imap resource crash I tried to stop and restart Akonadi server from the Akonadi Configure dialogue but got another crash: Application: Akonadi Resource (akonadi_imap_resource), signal: Aborted [Current thread is 1 (Thread 0x7f6dd2297760 (LWP 3526))] Thread 3 (Thread 0x7f6dc39d2710 (LWP 3600)): #0 0xffffffffff60017b in ?? () #1 0x00007f6dc39d1940 in ?? () #2 0x00007fffe79ff852 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Thread 2 (Thread 0x7f6dc25c7710 (LWP 3603)): #0 0x00007f6dcbf5c043 in g_main_context_query () from /lib/libglib-2.0.so.0 #1 0x00007f6dcbf6139c in ?? () from /lib/libglib-2.0.so.0 #2 0x00007f6dcbf618fc in g_main_context_iteration () from /lib/libglib-2.0.so.0 #3 0x00007f6dd16a13f6 in QEventDispatcherGlib::processEvents (this=0x99dfe0, flags=...) at kernel/qeventdispatcher_glib.cpp:414 #4 0x00007f6dd16613f0 in QEventLoop::processEvents (this=0x7f6dc25c6d70, flags=...) at kernel/qeventloop.cpp:149 #5 0x00007f6dd1661546 in QEventLoop::exec (this=0x7f6dc25c6d70, flags=...) at kernel/qeventloop.cpp:201 #6 0x00007f6dd15350b9 in QThread::exec (this=0x7f6dbc002210) at thread/qthread.cpp:487 #7 0x00007f6dcfe4b54f in KIMAP::SessionThread::run (this=0x7f6dbc002210) at /d/kde/src/t/kdepimlibs/kimap/sessionthread.cpp:160 #8 0x00007f6dd1537b65 in QThreadPrivate::start (arg=0x7f6dbc002210) at thread/qthread_unix.cpp:248 #9 0x00007f6dd127f9ca in start_thread (arg=<value optimized out>) at pthread_create.c:300 #10 0x00007f6dccf796dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #11 0x0000000000000000 in ?? () Thread 1 (Thread 0x7f6dd2297760 (LWP 3526)): [KCrash Handler] #5 0x00007f6dccec6a75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #6 0x00007f6dcceca5c0 in *__GI_abort () at abort.c:92 #7 0x00007f6dd152bc3d in qt_message_output (msgType=QtFatalMsg, buf=0x97b0f8 "ASSERT: \"!d->mIncremental\" in file /d/kde/src/t/kdepimlibs/akonadi/itemsync.cpp, line 141") at global/qglobal.cpp:2250 #8 0x00007f6dd152be3f in qt_message (msgType=QtFatalMsg, msg=0x7f6dd16ed988 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fffe78855d0) at global/qglobal.cpp:2296 #9 0x00007f6dd152c6ac in qFatal (msg=0x7f6dd16ed988 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2479 #10 0x00007f6dd152b7cf in qt_assert (assertion=0x7f6dd1e21bf5 "!d->mIncremental", file=0x7f6dd1e21bc8 "/d/kde/src/t/kdepimlibs/akonadi/itemsync.cpp", line=141) at global/qglobal.cpp:2013 #11 0x00007f6dd1d9d10b in Akonadi::ItemSync::setFullSyncItems (this=0xa531c0, items=...) at /d/kde/src/t/kdepimlibs/akonadi/itemsync.cpp:141 #12 0x00007f6dd1dc2d33 in Akonadi::ResourceBase::itemsRetrieved (this=0x8937f0, items=...) at /d/kde/src/t/kdepimlibs/akonadi/resourcebase.cpp:625 #13 0x000000000042fda1 in ImapResource::onHeadersReceived (this=0x8937f0, mailBox=..., uids=..., sizes=..., flags=..., messages=...) at /d/kde/src/t/kdepim/runtime/resources/imap/imapresource.cpp:885 #14 0x0000000000439c06 in ImapResource::qt_metacall (this=0x8937f0, _c=QMetaObject::InvokeMetaMethod, _id=17, _a=0x7fffe7885b10) at /d/kde/build/t/kdepim/runtime/resources/imap/imapresource.moc:184 #15 0x00007f6dd166c557 in QMetaObject::metacall (object=0x8937f0, cl=QMetaObject::InvokeMetaMethod, idx=56, argv=0x7fffe7885b10) at kernel/qmetaobject.cpp:237 #16 0x00007f6dd16829d5 in QMetaObject::activate (sender=0x847af0, m=0x67bce0, local_signal_index=0, argv=0x7fffe7885b10) at kernel/qobject.cpp:3293 #17 0x00007f6dcfe364f4 in KIMAP::FetchJob::headersReceived (this=0x847af0, _t1=..., _t2=..., _t3=..., _t4=..., _t5=...) at /d/kde/build/t/kdepimlibs/kimap/fetchjob.moc:101 #18 0x00007f6dcfe37955 in KIMAP::FetchJobPrivate::emitPendings (this=0xa57f10) at /d/kde/src/t/kdepimlibs/kimap/fetchjob.cpp:75 #19 0x00007f6dcfe34136 in KIMAP::FetchJob::handleResponse (this=0x847af0, response=...) at /d/kde/src/t/kdepimlibs/kimap/fetchjob.cpp:252 #20 0x00007f6dcfe480b5 in KIMAP::SessionPrivate::responseReceived (this=0x996a90, response=...) at /d/kde/src/t/kdepimlibs/kimap/session.cpp:215 #21 0x00007f6dcfe48a98 in KIMAP::Session::qt_metacall (this=0x920140, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7f6dbc0a3a70) at /d/kde/build/t/kdepimlibs/kimap/session.moc:98 #22 0x00007f6dd166c557 in QMetaObject::metacall (object=0x920140, cl=QMetaObject::InvokeMetaMethod, idx=7, argv=0x7f6dbc0a3a70) at kernel/qmetaobject.cpp:237 #23 0x00007f6dd167bc10 in QMetaCallEvent::placeMetaCall (this=0x7f6dbc03bc70, object=0x920140) at kernel/qobject.cpp:561 #24 0x00007f6dd167e28d in QObject::event (this=0x920140, e=0x7f6dbc03bc70) at kernel/qobject.cpp:1248 #25 0x00007f6dd06147aa in QApplicationPrivate::notify_helper (this=0x7e7b00, receiver=0x920140, e=0x7f6dbc03bc70) at kernel/qapplication.cpp:4304 #26 0x00007f6dd0611e65 in QApplication::notify (this=0x7fffe7886c80, receiver=0x920140, e=0x7f6dbc03bc70) at kernel/qapplication.cpp:3708 #27 0x00007f6dce3815cb in KApplication::notify (this=0x7fffe7886c80, receiver=0x920140, event=0x7f6dbc03bc70) at /d/kde/src/t/kdelibs/kdeui/kernel/kapplication.cpp:302 #28 0x00007f6dd16643f8 in QCoreApplication::notifyInternal (this=0x7fffe7886c80, receiver=0x920140, event=0x7f6dbc03bc70) at kernel/qcoreapplication.cpp:704 #29 0x00007f6dd16683d3 in QCoreApplication::sendEvent (receiver=0x920140, event=0x7f6dbc03bc70) at kernel/qcoreapplication.h:215 #30 0x00007f6dd166565e in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x7cec30) at kernel/qcoreapplication.cpp:1345 #31 0x00007f6dd1665279 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1238 #32 0x00007f6dd16a1c3b in QCoreApplication::sendPostedEvents () at kernel/qcoreapplication.h:220 #33 0x00007f6dd16a0119 in postEventSourceDispatch (s=0x7eb640) at kernel/qeventdispatcher_glib.cpp:276 #34 0x00007f6dcbf5d8c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #35 0x00007f6dcbf61748 in ?? () from /lib/libglib-2.0.so.0 #36 0x00007f6dcbf618fc in g_main_context_iteration () from /lib/libglib-2.0.so.0 #37 0x00007f6dd16a13d3 in QEventDispatcherGlib::processEvents (this=0x7ce380, flags=...) at kernel/qeventdispatcher_glib.cpp:412 #38 0x00007f6dd06e54c0 in QGuiEventDispatcherGlib::processEvents (this=0x7ce380, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #39 0x00007f6dd16613f0 in QEventLoop::processEvents (this=0x7fffe7886be0, flags=...) at kernel/qeventloop.cpp:149 #40 0x00007f6dd1661546 in QEventLoop::exec (this=0x7fffe7886be0, flags=...) at kernel/qeventloop.cpp:201 #41 0x00007f6dd1664afa in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981 #42 0x00007f6dd06119ec in QApplication::exec () at kernel/qapplication.cpp:3583 #43 0x00007f6dd1dbfcbc in Akonadi::ResourceBase::init (r=0x8937f0) at /d/kde/src/t/kdepimlibs/akonadi/resourcebase.cpp:219 #44 0x000000000043f04d in Akonadi::ResourceBase::init<ImapResource> (argc=3, argv=0x7fffe7886de8) at /d/kde/inst/kde-trunk/include/akonadi/resourcebase.h:186 #45 0x00000000004397de in main (argc=3, argv=0x7fffe7886de8) at /d/kde/src/t/kdepim/runtime/resources/imap/imapresource.cpp:1955 Trunk, Svn Rev 1121099 Here's my debugging of the issue. The problem is that the imap resource "moves on to the next task" while it still has a KIMAP::SelectJob running. So later on when that job finishes, the resource is quite confused and hits asserts. The reason why the imap resource moves on to the next task is that Akonadi::ResourceBasePrivate::slotItemSyncDone calls taskDone. And ItemSync is done because of an error (ItemFetchJob subjob fails). But still, taskDone is called too early, since the slot connected to that KIMAP::SelectJob was the one that was supposed to say "itemsRetrievalDone". I assume the running kimap jobs should be killed when ItemSync fails? akonadi_imap_resource_2(26578)/libakonadi Akonadi::ResourceScheduler::executeNext: ======================================== current task: 8 SyncCollection collection 660 akonadi_imap_resource_2(26578)/kdepimlibs (kimap) ImapResource::retrieveItems: "/shared.mailing-lists" akonadi_imap_resource_2(26578)/kdepimlibs (kimap) KIMAP::Job::start: KIMAP::GetMetaDataJob(0x7f7ba80b2120) akonadi_imap_resource_2(26578)/kdepimlibs (kimap) KIMAP::Job::start: KIMAP::GetAclJob(0x7f7ba80a8940) akonadi_imap_resource_2(26578)/kdepimlibs (kimap) KIMAP::Job::start: KIMAP::MyRightsJob(0x7f7ba80ac110) akonadi_imap_resource_2(26578)/kdepimlibs (kimap) KIMAP::Job::start: KIMAP::GetQuotaRootJob(0x7f7ba80b86d0) akonadi_imap_resource_2(26578)/kdepimlibs (kimap) ImapResource::triggerExpunge: "shared.mailing-lists" akonadi_imap_resource_2(26578) ImapResource::retrieveItems: SelectJob KIMAP::SelectJob(0x7f7ba80b0b60) will call onSelectDone akonadi_imap_resource_2(26578)/kdepimlibs (kimap) KIMAP::Job::start: KIMAP::SelectJob(0x7f7ba80b0b60) akonadi_imap_resource_2(26578)/kdepimlibs (kimap) ImapResource::onRightsReceived: "/shared.mailing-lists" imapRights: 7743 newRights: 39 oldRights: 39 akonadi_imap_resource_2(26578) ImapResource::onSelectDone: KIMAP::SelectJob(0x7f7ba80b0b60) akonadi_imap_resource_2(26578)/libakonadi Akonadi::JobPrivate::handleResponse: Akonadi::CollectionModifyJob(0x7f7ba80ae380) "OK MODIFY done " akonadi_imap_resource_2(26578)/libakonadi Akonadi::JobPrivate::delayedEmitResult: Akonadi::CollectionModifyJob(0x7f7ba80ae380) emitResult akonadi_imap_resource_2(26578)/libakonadi Akonadi::JobPrivate::handleResponse: Akonadi::CollectionStatisticsJob(0x7f7ba80acb90) "OK STATUS completed " akonadi_imap_resource_2(26578)/libakonadi Akonadi::JobPrivate::delayedEmitResult: Akonadi::CollectionStatisticsJob(0x7f7ba80acb90) emitResult akonadi_imap_resource_2(26578) ImapResource::onCollectionStatisticsReceived: Akonadi::CollectionStatisticsJob(0x7f7ba80acb90) akonadi_imap_resource_2(26578)/kdepimlibs (kimap) ImapResource::onSelectDone: integrity: "shared.mailing-lists" should be: 0 current: 0 akonadi_imap_resource_2(26578)/kdepimlibs (kimap) ImapResource::onSelectDone: All fine, asking for all message flags looking for changes akonadi_imap_resource_2(26578)/libakonadi Akonadi::ResourceBase::setItemStreamingEnabled: mItemSyncer= Akonadi::ItemSync(0x7f7ba8093570) akonadi_imap_resource_2(26578)/kdepimlibs (kimap) KIMAP::Job::start: KIMAP::FetchJob(0x7f7ba80b1960) akonadi_imap_resource_2(26578)/libakonadi Akonadi::JobPrivate::startNext: 0x7f7ba8012320 starting subjob: Akonadi::ItemFetchJob(0x7f7ba80acb90) akonadi_imap_resource_2(26578)/libakonadi Akonadi::JobPrivate::startNext: 0x7f7ba8016520 starting subjob: Akonadi::CollectionSelectJob(0x7f7ba809e770) akonadi_imap_resource_2(26578)/libakonadi Akonadi::JobPrivate::handleResponse: Akonadi::CollectionSelectJob(0x7f7ba809e770) "OK Completed " akonadi_imap_resource_2(26578)/libakonadi Akonadi::JobPrivate::delayedEmitResult: Akonadi::CollectionSelectJob(0x7f7ba809e770) emitResult akonadi_imap_resource_2(26578)/libakonadi Akonadi::Job::slotResult: Akonadi::ItemFetchJob(0x7f7ba80acb90) subjob done: Akonadi::CollectionSelectJob(0x7f7ba809e770) akonadi_imap_resource_2(26578)/libakonadi Akonadi::JobPrivate::handleResponse: Akonadi::ItemFetchJob(0x7f7ba80acb90) "NO Unable to retrieve item parts " akonadi_imap_resource_2(26578)/libakonadi Akonadi::Job::slotResult: Akonadi::ItemSync(0x7f7ba8093570) subjob done: Akonadi::ItemFetchJob(0x7f7ba80acb90) akonadi_imap_resource_2(26578)/libakonadi Akonadi::ResourceBasePrivate::slotItemSyncDone: ResourceBasePrivate::slotItemSyncDone calling taskDone akonadi_imap_resource_2(26578)/libakonadi Akonadi::ResourceScheduler::executeNext: ======================================== current task: 9 SyncCollection collection 664 ASSERT: "m_jobs.isEmpty()" in file /d/kde/src/t/kdepim/runtime/resources/imap/imapresource.cpp, line 813 Debug output generated by http://www.davidfaure.fr/2010/imap_resource_debug.diff http://www.davidfaure.fr/2010/kdepimlibs_akonadi_debug.diff Should be fixed by now, at least the code changed dramatically since this report was created (moved to an internal command pattern in particular so none of the backtraces match anymore). *** Bug 246930 has been marked as a duplicate of this bug. *** |