Bug 291961

Summary: Project Neon Akonaid IMAP resources crash [@ Akonadi::ResourceBasePrivate::createItemSyncInstanceIfMissing]
Product: Akonadi Reporter: Stephan Diestelhorst <stephan.diestelhorst>
Component: IMAP resourceAssignee: Christian Mollekopf <chrigi_1>
Status: RESOLVED FIXED    
Severity: crash CC: andrew, kdepim-bugs, lacsilva, mollekopf, schnitzelkuchen, vkrause
Priority: NOR    
Version: 4.9   
Target Milestone: ---   
Platform: Ubuntu Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Similar crash of IMAP Akonadi resource.
Another similar crash of an Akonadi IMAP resource.
The third related crash.
New crash information added by DrKonqi

Description Stephan Diestelhorst 2012-01-19 14:45:55 UTC
Application: akonadi_imap_resource (4.8)
KDE Platform Version: 4.7.98 (4.8 RC2+ (4.7.98)
Qt Version: 4.8.0
Operating System: Linux 3.0.0-14-generic x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
I am using Project Neon with frequent updates. Since yersterday (2012-01-18), I have observed several crashes of my two Akonadi IMAP resources. Will attach the other saved Dr Konqi crash reports to this one.

Have rebooted in between to make sure that no old running deamons complicate matters.

System was idling / indexing while the crash occured. No specific user action that tirggered this bug. Kmail running, and Akonadi console. Nothing tweaked manually etc.

Can provide more information upon request.

The crash can be reproduced some of the time.

-- Backtrace:
Application: GMail of type IMAP E-Mail Server (akonadi_imap_resource), signal: Aborted
[Current thread is 1 (Thread 0x7f86210137a0 (LWP 4262))]

Thread 3 (Thread 0x7f860c91f700 (LWP 4666)):
#0  0xffffffffff60017b in ?? ()
#1  0x00007f860c91e930 in ?? ()
#2  0x00007fff831f17e7 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0x7f860df46700 (LWP 4753)):
#0  0xffffffffff60017b in ?? ()
#1  0x00007f860df45930 in ?? ()
#2  0x00007fff831f17e7 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x7f86210137a0 (LWP 4262)):
[KCrash Handler]
#6  0x00007f861c2b13a5 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x00007f861c2b4b0b in __GI_abort () at abort.c:92
#8  0x00007f86201eba47 in qt_message_output (msgType=QtFatalMsg, buf=0x7f86000f4708 "ASSERT failure in createItemSyncInstance: \"Calling items retrieval methods although no item retrieval is in progress\", file /build/buildd/project-neon-kdepimlibs-2+git20120118+r12550/akonadi/resourceb"...) at global/qglobal.cpp:2252
#9  0x00007f86201ebbdd in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f86203aeed0 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=0x7fff831d4be8) at global/qglobal.cpp:2298
#10 0x00007f86201ec36d in qFatal (msg=0x7f86203aeed0 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qglobal.cpp:2481
#11 0x00007f86201eb64b in qt_assert_x (where=0x7f8620b829fa "createItemSyncInstance", what=0x7f8620b829b0 "Calling items retrieval methods although no item retrieval is in progress", file=0x7f8620b82958 "/build/buildd/project-neon-kdepimlibs-2+git20120118+r12550/akonadi/resourcebase.cpp", line=155) at global/qglobal.cpp:2007
#12 0x00007f8620af0aca in Akonadi::ResourceBasePrivate::createItemSyncInstanceIfMissing (this=0x1d949b0) at /build/buildd/project-neon-kdepimlibs-2+git20120118+r12550/akonadi/resourcebase.cpp:154
#13 0x00007f8620aeef8c in Akonadi::ResourceBase::itemsRetrieved (this=0x1d9a580, items=...) at /build/buildd/project-neon-kdepimlibs-2+git20120118+r12550/akonadi/resourcebase.cpp:897
#14 0x000000000041fcf9 in ResourceState::itemsRetrieved (this=0x1cfdc40, items=...) at /build/buildd/project-neon-kdepim-runtime-2+git20120114+r7470/resources/imap/resourcestate.cpp:331
#15 0x000000000044b899 in ResourceTask::itemsRetrieved (this=0x1debcd0, items=...) at /build/buildd/project-neon-kdepim-runtime-2+git20120114+r7470/resources/imap/resourcetask.cpp:240
#16 0x0000000000458e2d in RetrieveItemsTask::onFlagsReceived (this=0x1debcd0, mailBox=..., uids=..., sizes=..., flags=..., messages=...) at /build/buildd/project-neon-kdepim-runtime-2+git20120114+r7470/resources/imap/retrieveitemstask.cpp:416
#17 0x0000000000459112 in RetrieveItemsTask::qt_static_metacall (_o=0x1debcd0, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff831d5080) at /build/buildd/project-neon-kdepim-runtime-2+git20120114+r7470/obj-x86_64-linux-gnu/resources/imap/retrieveitemstask.moc:69
#18 0x00007f8620349dae in QMetaObject::activate (sender=0x232f440, m=0x6970e0, local_signal_index=0, argv=0x7fff831d5080) at kernel/qobject.cpp:3547
#19 0x00007f861ebe5ae0 in KIMAP::FetchJob::headersReceived (this=0x232f440, _t1=..., _t2=..., _t3=..., _t4=..., _t5=...) at /build/buildd/project-neon-kdepimlibs-2+git20120118+r12550/obj-x86_64-linux-gnu/kimap/fetchjob.moc:115
#20 0x00007f861ebe6775 in KIMAP::FetchJobPrivate::emitPendings (this=0x232f6b0) at /build/buildd/project-neon-kdepimlibs-2+git20120118+r12550/kimap/fetchjob.cpp:57
#21 0x00007f861ebe5964 in KIMAP::FetchJob::qt_static_metacall (_o=0x232f440, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fff831d5170) at /build/buildd/project-neon-kdepimlibs-2+git20120118+r12550/obj-x86_64-linux-gnu/kimap/fetchjob.moc:66
#22 0x00007f8620349dae in QMetaObject::activate (sender=0x232f700, m=0x7f86206db9a0, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3547
#23 0x00007f86203aaf4f in QTimer::timeout (this=0x232f700) at .moc/debug-shared/moc_qtimer.cpp:148
#24 0x00007f862035309f in QTimer::timerEvent (this=0x232f700, e=0x7fff831d5ab0) at kernel/qtimer.cpp:280
#25 0x00007f8620344946 in QObject::event (this=0x232f700, e=0x7fff831d5ab0) at kernel/qobject.cpp:1157
#26 0x00007f861f3bf7ea in QApplicationPrivate::notify_helper (this=0x1c10e90, receiver=0x232f700, e=0x7fff831d5ab0) at kernel/qapplication.cpp:4554
#27 0x00007f861f3bce08 in QApplication::notify (this=0x7fff831d5f20, receiver=0x232f700, e=0x7fff831d5ab0) at kernel/qapplication.cpp:3936
#28 0x00007f861d2db83f in KApplication::notify (this=0x7fff831d5f20, receiver=0x232f700, event=0x7fff831d5ab0) at /build/buildd/project-neon-kdelibs-2+git20120118+r92398/kdeui/kernel/kapplication.cpp:311
#29 0x00007f862032b9da in QCoreApplication::notifyInternal (this=0x7fff831d5f20, receiver=0x232f700, event=0x7fff831d5ab0) at kernel/qcoreapplication.cpp:876
#30 0x00007f862032f54d in QCoreApplication::sendEvent (receiver=0x232f700, event=0x7fff831d5ab0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#31 0x00007f862036ae21 in QTimerInfoList::activateTimers (this=0x1c15e80) at kernel/qeventdispatcher_unix.cpp:611
#32 0x00007f8620367112 in timerSourceDispatch (source=0x1c15e20) at kernel/qeventdispatcher_glib.cpp:186
#33 0x00007f86203671f9 in idleTimerSourceDispatch (source=0x1c15ed0) at kernel/qeventdispatcher_glib.cpp:233
#34 0x00007f861aeb7a5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007f861aeb8258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007f861aeb8429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007f8620367bc7 in QEventDispatcherGlib::processEvents (this=0x1beccb0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#38 0x00007f861f497e78 in QGuiEventDispatcherGlib::processEvents (this=0x1beccb0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#39 0x00007f86203292a4 in QEventLoop::processEvents (this=0x7fff831d5e60, flags=...) at kernel/qeventloop.cpp:149
#40 0x00007f862032942e in QEventLoop::exec (this=0x7fff831d5e60, flags=...) at kernel/qeventloop.cpp:204
#41 0x00007f862032c05a in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#42 0x00007f861f3bc9f2 in QApplication::exec () at kernel/qapplication.cpp:3815
#43 0x00007f8620aeb7af in Akonadi::ResourceBase::init (r=0x1d9a580) at /build/buildd/project-neon-kdepimlibs-2+git20120118+r12550/akonadi/resourcebase.cpp:405
#44 0x000000000041d590 in Akonadi::ResourceBase::init<ImapResource> (argc=3, argv=0x7fff831d6078) at /opt/project-neon/include/akonadi/resourcebase.h:188
#45 0x000000000041bdd5 in main (argc=3, argv=0x7fff831d6078) at /build/buildd/project-neon-kdepim-runtime-2+git20120114+r7470/resources/imap/imapresource.cpp:603

Possible duplicates by query: bug 291369, bug 287560.

Reported using DrKonqi
Comment 1 Stephan Diestelhorst 2012-01-19 14:50:38 UTC
Created attachment 68004 [details]
Similar crash of IMAP Akonadi resource.
Comment 2 Stephan Diestelhorst 2012-01-19 14:51:15 UTC
Created attachment 68005 [details]
Another similar crash of an Akonadi IMAP resource.
Comment 3 Stephan Diestelhorst 2012-01-19 14:51:46 UTC
Created attachment 68006 [details]
The third related crash.
Comment 4 Stephan Diestelhorst 2012-01-19 14:53:13 UTC
By the way, this happens with two different IMAP resources. One is a rather large GMail account, not using disconnected mode. The other is an Exchange-backed IMAp server, which is using disconnected mode for IMAP.
Comment 5 Kevin Ottens 2012-02-11 10:41:42 UTC
Any network connectivity issue? Looks like the last one in the list of symptoms we have for this case, I'd just like to confirm.
Comment 6 Myriam Schweingruber 2012-10-03 09:27:07 UTC
*** Bug 307621 has been marked as a duplicate of this bug. ***
Comment 7 Myriam Schweingruber 2012-10-03 09:27:50 UTC
Confirmed by duplicate.
Comment 8 Jekyll Wu 2013-02-26 03:37:33 UTC
*** Bug 311441 has been marked as a duplicate of this bug. ***
Comment 9 Michael 2013-09-29 09:07:56 UTC
Created attachment 82534 [details]
New crash information added by DrKonqi

akonadi_davgroupware_resource (4.11) on KDE Platform 4.11.1 using Qt 4.8.5

- What I was doing when the application crashed:

I get this backtrace every time i wake up my laptop from suspend to ram. This is from KDE 4.11.1 on Gentoo. Akonadi is on version 1.10.2, and i am currently using the SQLITE backend.

Thanks for your work on KDE,
Michael

-- Backtrace (Reduced):
#6  0x00007f65a85a4319 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f65a85a5678 in __GI_abort () at abort.c:90
[...]
#11 0x00007f65ac420a1a in qt_assert_x (where=where@entry=0x7f65aac0bb08 "ResourceBase::collectionsRetrieved()", what=what@entry=0x7f65aac0bab8 "Calling collectionsRetrieved() although no collection retrieval is in progress", file=file@entry=0x7f65aac0b908 "/var/tmp/portage/kde-base/kdepimlibs-4.11.1/work/kdepimlibs-4.11.1/akonadi/resourcebase.cpp", line=line@entry=733) at global/qglobal.cpp:2026
#12 0x00007f65aab6446e in Akonadi::ResourceBase::collectionsRetrieved (this=this@entry=0x1aa3210, collections=...) at /var/tmp/portage/kde-base/kdepimlibs-4.11.1/work/kdepimlibs-4.11.1/akonadi/resourcebase.cpp:730
#13 0x000000000044a606 in DavGroupwareResource::onRetrieveCollectionsFinished (this=0x1aa3210, job=<optimized out>) at /var/tmp/portage/kde-base/kdepim-runtime-4.11.1/work/kdepim-runtime-4.11.1/resources/dav/resource/davgroupwareresource.cpp:525
Comment 10 Kevin Ottens 2013-11-16 07:30:28 UTC
The IMAP resource has a new maintainer, reassigning to him.
Comment 11 Christian Mollekopf 2013-12-11 08:52:33 UTC
This could have been triggered by stale retrieval jobs after a reconnect, in which case this should be fixed in master.