Bug 251531 - Akonadi Crashes Periodically
Summary: Akonadi Crashes Periodically
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: libakonadi (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Kevin Ottens
URL:
Keywords:
: 249527 251613 259036 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-09-17 06:49 UTC by Robert Marmorstein
Modified: 2012-03-11 16:40 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Marmorstein 2010-09-17 06:49:59 UTC
Application: akonadi_imap_resource (0.1)
KDE Platform Version: 4.5.68 (4.6 >= 20100912) (Compiled from sources)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
This doesn't seem to affect mail retrieval in anyway, but it crashes every few minutes and can be really, really annoying.  My guess is that it is happening at the end of a sync.  Mail is retrieved -- and then in the cleanup process, the resource crashes.  If you'd like, I can valgrind it or try to obtain an akonadiconsole debug log....

The crash can be reproduced every time.

-- Backtrace:
Application: Akonadi Resource (akonadi_imap_resource), signal: Aborted
[Current thread is 1 (Thread 0x7fa26b02d760 (LWP 17951))]

Thread 3 (Thread 0x7fa256ee0710 (LWP 17953)):
#0  0xffffffffff60017b in ?? ()
#1  0x00007fa256edfa30 in ?? ()
#2  0x00007fffbb7ff6e2 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0x7fa252428710 (LWP 17955)):
#0  0xffffffffff60017b in ?? ()
#1  0x00007fa252427a30 in ?? ()
#2  0x00007fffbb7ff6e2 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x7fa26b02d760 (LWP 17951)):
[KCrash Handler]
#6  0x00007fa26662b565 in raise () from /lib/libc.so.6
#7  0x00007fa26662c9e6 in abort () from /lib/libc.so.6
#8  0x00007fa266eabded in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#9  0x00007fa266eaa006 in ?? () from /usr/lib/libstdc++.so.6
#10 0x00007fa266eaa033 in std::terminate() () from /usr/lib/libstdc++.so.6
#11 0x00007fa266eaa186 in __cxa_rethrow () from /usr/lib/libstdc++.so.6
#12 0x00007fa26a4c9d3d in QEventLoop::exec (this=0x7fffbb6e4390, flags=...) at kernel/qeventloop.cpp:214
#13 0x00007fa26a4cd16c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#14 0x00007fa26ab69e9d in Akonadi::ResourceBase::init (r=0x1bfcb80) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/akonadi/resourcebase.cpp:247
#15 0x00000000004265d1 in int Akonadi::ResourceBase::init<ImapResource>(int, char**) ()
#16 0x00007fa266617c4d in __libc_start_main () from /lib/libc.so.6
#17 0x0000000000411af9 in _start ()

This bug may be a duplicate of or related to bug 251337.

Possible duplicates by query: bug 251337, bug 250953, bug 250863, bug 250705, bug 250525.

Reported using DrKonqi
Comment 1 Robert Marmorstein 2010-09-18 06:51:14 UTC
Running the akonadi server by hand gives this (potentially useful) output in the terminal:

Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'Akonadi::PayloadException'
  what():  Akonadi::PayloadException: Wrong payload type (requested: sp(0)<QByteArray>; present: sp(1)<KMime::Message*>
Lost connection to resource "org.freedesktop.Akonadi.Resource.akonadi_imap_resource_18" , discarding cached interface 
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = akonadi_imap_resource path = /usr/bin pid = 7444
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/home/robert/.kde/socket-hyaline/kdeinit4__0
Comment 2 Robert Marmorstein 2010-09-18 14:56:39 UTC
Okay.  I inserted a "qFatal" assertion into the throwPayloadException function so it would generate a better backtrace.  Here's what I found:

Application: Akonadi Resource (akonadi_imap_resource), signal: Aborted
[Current thread is 1 (Thread 0x7f58fbf51760 (LWP 24128))]

Thread 3 (Thread 0x7f58e7df0710 (LWP 24178)):
#0  0x00007f58f75d4f43 in poll () from /lib/libc.so.6
#1  0x00007f58f65ee064 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f58f65ee59d in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f58fb408832 in QEventDispatcherGlib::processEvents (this=0x16844a0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#4  0x00007f58fb3e7b6b in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f58fb3e7d48 in QEventLoop::exec (this=0x7f58e7defde0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f58fb34a003 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f58fa03f154 in KIMAP::SessionThread::run (this=0x16d9b30) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/kimap/sessionthread.cpp:166
#8  0x00007f58fb34bfba in QThreadPrivate::start (arg=0x16d9b30) at thread/qthread_unix.cpp:285
#9  0x00007f58fb0c8cb0 in start_thread () from /lib/libpthread.so.0
#10 0x00007f58f75dd7ad in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f58e6be8710 (LWP 24186)):
#0  0x00007f58f65ec792 in g_main_context_release () from /usr/lib/libglib-2.0.so.0
#1  0x00007f58f65ee098 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f58f65ee59d in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f58fb408832 in QEventDispatcherGlib::processEvents (this=0x183e780, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#4  0x00007f58fb3e7b6b in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f58fb3e7d48 in QEventLoop::exec (this=0x7f58e6be7de0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f58fb34a003 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f58fa03f154 in KIMAP::SessionThread::run (this=0x1831a20) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/kimap/sessionthread.cpp:166
#8  0x00007f58fb34bfba in QThreadPrivate::start (arg=0x1831a20) at thread/qthread_unix.cpp:285
#9  0x00007f58fb0c8cb0 in start_thread () from /lib/libpthread.so.0
#10 0x00007f58f75dd7ad in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f58fbf51760 (LWP 24128)):
[KCrash Handler]
#6  0x00007f58f7541565 in raise () from /lib/libc.so.6
#7  0x00007f58f75429e6 in abort () from /lib/libc.so.6
#8  0x00007f58fb345cdf in qt_message_output (msgType=<value optimized out>, buf=<value optimized out>) at global/qglobal.cpp:2259
#9  0x00007f58fb345dbf in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f58fbae7b73 "Payload Exception!", ap=0x7fffd6d69990) at global/qglobal.cpp:2305
#10 0x00007f58fb345ede in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2488
#11 0x00007f58fba5ecd8 in Akonadi::Item::throwPayloadException (this=0x177dde0, spid=0, mtid=12) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/akonadi/item.cpp:390
#12 0x00007f58fba6f50d in Akonadi::Item::payloadImpl<QByteArray> (this=0x177dde0) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/akonadi/item.h:517
#13 0x00007f58fba6f5b8 in Akonadi::Item::payload<QByteArray> (this=0x177dde0) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/akonadi/item.h:489
#14 0x00007f58fba6e1ed in Akonadi::DefaultItemSerializerPlugin::serialize (this=<value optimized out>, item=..., label=<value optimized out>, data=...) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/akonadi/itemserializer.cpp:56
#15 0x00007f58fba6e4e9 in Akonadi::ItemSerializer::serialize (item=..., label=..., data=..., version=@0x7fffd6d6a13c) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/akonadi/itemserializer.cpp:126
#16 0x00007f58fba6e583 in Akonadi::ItemSerializer::serialize (item=..., label=..., data=<value optimized out>, version=@0x7fffd6d6a13c) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/akonadi/itemserializer.cpp:116
#17 0x00007f58fba633ee in Akonadi::ItemCreateJob::doStart (this=<value optimized out>) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/akonadi/itemcreatejob.cpp:85
#18 0x00007f58fba75980 in Akonadi::JobPrivate::startQueued (this=0x177dda0) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/akonadi/job.cpp:152
#19 0x00007f58fba75e68 in Akonadi::Job::qt_metacall (this=0x18164b0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x17b4a10) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/build/akonadi/job.moc:89
#20 0x00007f58fbab9666 in Akonadi::TransactionSequence::qt_metacall (this=0x18164b0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x17b4a10) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/build/akonadi/transactionsequence.moc:71
#21 0x00007f58fb3f8578 in QObject::event (this=0x18164b0, e=<value optimized out>) at kernel/qobject.cpp:1211
#22 0x00007f58fa72971a in QApplicationPrivate::notify_helper (this=0x1608a70, receiver=0x18164b0, e=0x17b2600) at kernel/qapplication.cpp:4434
#23 0x00007f58fa730559 in QApplication::notify (this=<value optimized out>, receiver=0x18164b0, e=0x17b2600) at kernel/qapplication.cpp:4399
#24 0x00007f58f8b1ee52 in KApplication::notify (this=0x7fffd6d6ac30, receiver=0x18164b0, event=0x17b2600) at /var/abs/local/eth-os/sources/KDE/kdelibs/kdeui/kernel/kapplication.cpp:310
#25 0x00007f58fb3e8b82 in QCoreApplication::notifyInternal (this=0x7fffd6d6ac30, receiver=0x18164b0, event=<value optimized out>) at kernel/qcoreapplication.cpp:732
#26 0x00007f58fb3eafc9 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x15c8720) at kernel/qcoreapplication.cpp:1373
#27 0x00007f58fb4084b6 in postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:277
#28 0x00007f58f65edb23 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0x00007f58f65ee300 in ?? () from /usr/lib/libglib-2.0.so.0
#30 0x00007f58f65ee59d in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0x00007f58fb408832 in QEventDispatcherGlib::processEvents (this=0x15c81f0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#32 0x00007f58fa7a9068 in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007f58fb3e7b6b in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#34 0x00007f58fb3e7d48 in QEventLoop::exec (this=0x7fffd6d6abd0, flags=...) at kernel/qeventloop.cpp:201
#35 0x00007f58fb3eb248 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#36 0x00007f58fba8a593 in Akonadi::ResourceBase::init (r=0x173c1c0) at /var/abs/local/eth-os/sources/KDE/kdepimlibs/akonadi/resourcebase.cpp:279
#37 0x00000000004265d1 in int Akonadi::ResourceBase::init<ImapResource>(int, char**) ()
#38 0x00007f58f752dc4d in __libc_start_main () from /lib/libc.so.6
#39 0x0000000000411af9 in _start ()
Comment 3 Robert Marmorstein 2010-09-18 15:10:42 UTC
[09:00] <atomopawn_home> I'm experiencing bug #251531 and would like some help figuring out how to fix it (or at least provide useful information that might help you guys fix it...).
[09:03] <krake> atomopawn: kdepimlibs from trunk, kdepim-runtime from earlier trunk or branch
[09:03] <krake> see my mail on serializer compatibility on kde-pim@kde.org
[09:05] <krake> you can reassign the bug to component libakonadi, not sure though which mail address Marc is using for bugzilla


And yes, I am using old kdepim with trunk kdepimlibs....
Comment 4 Volker Krause 2010-12-29 10:07:37 UTC
*** Bug 249527 has been marked as a duplicate of this bug. ***
Comment 5 Volker Krause 2010-12-29 10:10:28 UTC
*** Bug 251613 has been marked as a duplicate of this bug. ***
Comment 6 Robert Marmorstein 2011-01-22 11:01:10 UTC
Just realized that I never refiled this bug as Kevin had asked.  It's possible that this has been fixed already. Should I go back to kdepim from 4.4 and try it?  It would be nice to close this out as either "fixed" or "wontfix" or whatever.

The problem does disappear if you use trunk kdepimlibs with trunk kdepim.
Comment 7 Volker Krause 2012-03-11 16:38:43 UTC
Was fixed in KDE PIM 4.4.10 and did not affect combinations of newer versions.
Comment 8 Volker Krause 2012-03-11 16:40:33 UTC
*** Bug 259036 has been marked as a duplicate of this bug. ***