Bug 303087

Summary: Reproduceable crash of imap ressource
Product: [Frameworks and Libraries] Akonadi Reporter: Christian Reiner <foss>
Component: IMAP resourceAssignee: Kevin Ottens <ervin>
Status: RESOLVED DUPLICATE    
Severity: crash CC: adaptee, kdepim-bugs, vkrause
Priority: NOR    
Version: 4.8   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Christian Reiner 2012-07-06 05:04:08 UTC
Application: akonadi_imap_resource (4.8)
KDE Platform Version: 4.8.4 (4.8.4) "release 7"
Qt Version: 4.8.2
Operating System: Linux 3.4.3-30-desktop x86_64
Distribution: "openSUSE 12.1 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
The system had a longer period of high network load that lead to several timeouts of different applications. The system runs fine otherwise. 
I restartet the akoadi server and retried, it appears the crashes can be reproduced. I will try to restart the whole system in a minute.

The crash can be reproduced every time.

-- Backtrace:
Application: c-r.info of type IMAP E-Mail Server (akonadi_imap_resource), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f8b7a7fd760 (LWP 31732))]

Thread 3 (Thread 0x7f8b69228700 (LWP 31851)):
#0  0x00007fffc0dff82f in clock_gettime ()
#1  0x00007f8b74df3d9a in clock_gettime () from /lib64/librt.so.1
#2  0x00007f8b79bb7014 in do_gettime (frac=0x7f8b69227bc8, sec=0x7f8b69227bc0) at tools/qelapsedtimer_unix.cpp:123
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#4  0x00007f8b79c8e59d in QTimerInfoList::updateCurrentTime (this=0x7f8b64002860) at kernel/qeventdispatcher_unix.cpp:343
#5  0x00007f8b79c8e8d3 in QTimerInfoList::timerWait (this=0x7f8b64002860, tm=...) at kernel/qeventdispatcher_unix.cpp:450
#6  0x00007f8b79c8d30c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7f8b69227c9c) at kernel/qeventdispatcher_glib.cpp:136
#7  0x00007f8b79c8d3b5 in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#8  0x00007f8b74b433ce in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#9  0x00007f8b74b43bcb in ?? () from /usr/lib64/libglib-2.0.so.0
#10 0x00007f8b74b43dd4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#11 0x00007f8b79c8de36 in QEventDispatcherGlib::processEvents (this=0x7f8b640008c0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#12 0x00007f8b79c5d842 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#13 0x00007f8b79c5da97 in QEventLoop::exec (this=0x7f8b69227e00, flags=...) at kernel/qeventloop.cpp:204
#14 0x00007f8b79b5d5f7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#15 0x00007f8b78874119 in KIMAP::SessionThread::run (this=0x16b5130) at /usr/src/debug/kdepimlibs-4.8.4/kimap/sessionthread.cpp:181
#16 0x00007f8b79b6061b in QThreadPrivate::start (arg=0x16b5130) at thread/qthread_unix.cpp:307
#17 0x00007f8b75aa7f05 in start_thread () from /lib64/libpthread.so.0
#18 0x00007f8b761f510d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f8b61eb1700 (LWP 328)):
#0  0x00007f8b761ebff3 in poll () from /lib64/libc.so.6
#1  0x00007f8b74b43ca6 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f8b74b43dd4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f8b79c8de36 in QEventDispatcherGlib::processEvents (this=0x7f8b58005d60, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f8b79c5d842 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f8b79c5da97 in QEventLoop::exec (this=0x7f8b61eb0e00, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f8b79b5d5f7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f8b78874119 in KIMAP::SessionThread::run (this=0x1827a30) at /usr/src/debug/kdepimlibs-4.8.4/kimap/sessionthread.cpp:181
#8  0x00007f8b79b6061b in QThreadPrivate::start (arg=0x1827a30) at thread/qthread_unix.cpp:307
#9  0x00007f8b75aa7f05 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f8b761f510d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f8b7a7fd760 (LWP 31732)):
[KCrash Handler]
#6  0x0000000000000000 in ?? ()
#7  0x00007f8b78887357 in qDeleteAll<QList<KIMAP::Job*>::const_iterator> (end=<optimized out>, begin=<optimized out>) at /usr/include/QtCore/qalgorithms.h:322
#8  qDeleteAll<QQueue<KIMAP::Job*> > (c=...) at /usr/include/QtCore/qalgorithms.h:330
#9  KIMAP::SessionPrivate::clearJobQueue (this=0x1802720) at /usr/src/debug/kdepimlibs-4.8.4/kimap/session.cpp:401
#10 0x00007f8b79c77e06 in QObject::event (this=0x1821770, e=<optimized out>) at kernel/qobject.cpp:1204
#11 0x00007f8b78fe1fe4 in notify_helper (e=0x7f8b58007fd0, receiver=0x1821770, this=0x14b4470) at kernel/qapplication.cpp:4551
#12 QApplicationPrivate::notify_helper (this=0x14b4470, receiver=0x1821770, e=0x7f8b58007fd0) at kernel/qapplication.cpp:4523
#13 0x00007f8b78fe6db3 in QApplication::notify (this=0x7fffc0d1e4c0, receiver=0x1821770, e=0x7f8b58007fd0) at kernel/qapplication.cpp:4412
#14 0x00007f8b770f8746 in KApplication::notify (this=0x7fffc0d1e4c0, receiver=0x1821770, event=0x7f8b58007fd0) at /usr/src/debug/kdelibs-4.8.4/kdeui/kernel/kapplication.cpp:311
#15 0x00007f8b79c5ed0c in QCoreApplication::notifyInternal (this=0x7fffc0d1e4c0, receiver=0x1821770, event=0x7f8b58007fd0) at kernel/qcoreapplication.cpp:915
#16 0x00007f8b79c625ba in sendEvent (event=0x7f8b58007fd0, receiver=0x1821770) at kernel/qcoreapplication.h:231
#17 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1491e50) at kernel/qcoreapplication.cpp:1539
#18 0x00007f8b79c8d9a3 in sendPostedEvents () at kernel/qcoreapplication.h:236
#19 postEventSourceDispatch (s=0x14b42b0) at kernel/qeventdispatcher_glib.cpp:279
#20 0x00007f8b74b4394a in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#21 0x00007f8b74b43d10 in ?? () from /usr/lib64/libglib-2.0.so.0
#22 0x00007f8b74b43dd4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#23 0x00007f8b79c8ddcf in QEventDispatcherGlib::processEvents (this=0x1491710, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#24 0x00007f8b7908569e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#25 0x00007f8b79c5d842 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#26 0x00007f8b79c5da97 in QEventLoop::exec (this=0x7fffc0d1e440, flags=...) at kernel/qeventloop.cpp:204
#27 0x00007f8b79c628b5 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#28 0x00007f8b7a2c90e7 in Akonadi::ResourceBase::init (r=0x16190a0) at /usr/src/debug/kdepimlibs-4.8.4/akonadi/resourcebase.cpp:412
#29 0x000000000041bea6 in Akonadi::ResourceBase::init<ImapResource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/akonadi/resourcebase.h:188
#30 0x00007f8b7613b23d in __libc_start_main () from /lib64/libc.so.6
#31 0x0000000000416885 in _start () at ../sysdeps/x86_64/elf/start.S:113

Possible duplicates by query: bug 301825, bug 295189.

Reported using DrKonqi
Comment 1 Christian Reiner 2012-07-06 05:24:06 UTC
I tried these steps, none of it fixed the problem: 
- restart agent
- restart akonadi server
- restart the system
- remove and readd the imap ressource
The resource always crashes after a few minutes. Nevertheless it does report and fetch old and new messages. The resource is therefore unusable: this is a BLOCKER.
Comment 2 Christian Reiner 2012-07-06 05:41:13 UTC
Surprising enough I got that issue fixed by restarting the imap server !
It is a cyrus imap server in version 2.3.16. Since that restart I did not experience a single crash anyone.
Comment 3 Christian Reiner 2012-07-06 09:01:17 UTC
Unfortunately I have to report that the issue is _not_ fixed. 
It appears the ressource still crashes, but not in all situations. I will keep an eye on that (cannot really miss it, error popups every few minutes). I got the impression these crashes happen when there are latencies in the network connection.
Comment 4 Jekyll Wu 2012-07-06 19:09:09 UTC

*** This bug has been marked as a duplicate of bug 301825 ***
Comment 5 Christian Reiner 2012-07-14 00:46:15 UTC
Additional information: 
I fixed a problem on the imap server (cyrus-2.3.16), an invalid 'Trash' folder 
Wherever that came from (akonadi?) this fixed most of the problems for me. I do not experience any more crashes, though the imap resource is pretty slow (unresponsive) right now. 
This fits to what I saw in the mail client: diggin deeper I saw a message about a "non existing job" being queued.