Bug 282337

Summary: akonadi agent crashed on trying to get mail from unreachable IMAP server
Product: [Frameworks and Libraries] Akonadi Reporter: Robby Engelmann <robby.engelmann>
Component: IMAP resourceAssignee: Kevin Ottens <ervin>
Status: RESOLVED DUPLICATE    
Severity: crash CC: kde, kdepim-bugs, mail, martin.tlustos, serge.jadot, sven.burmeister, vkrause
Priority: NOR    
Version: 4.7   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description Robby Engelmann 2011-09-19 11:50:40 UTC
Application: akonadi_imap_resource (4.7)
KDE Platform Version: 4.7.00 (4.7.0)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-11-generic i686
Distribution: Ubuntu 11.04

-- Information about the crash:
- What I was doing when the application crashed:
akonadi agent crashed on trying to get mail from unreachable IMAP server within a local network.
I open the settings dialogue of that ressouce and tried to autodetect encryption capabilities of the imap server. After that an error message said, that the server is not reachable. I clicked to OK and shortly after that I saw that crash.

The crash can be reproduced some of the time.

-- Backtrace:
Application: Akonadi Resource (akonadi_imap_resource), signal: Segmentation fault
[Current thread is 1 (Thread 0xb76d1930 (LWP 2003))]

Thread 4 (Thread 0xb6136b70 (LWP 2718)):
#0  0x0074f416 in __kernel_vsyscall ()
#1  0x051b5f76 in __poll (fds=0x8a05200, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0x07d0184b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x07cf11af in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x07cf1524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x00aca577 in QEventDispatcherGlib::processEvents (this=0x8a04af8, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x00a9c289 in QEventLoop::processEvents (this=0xb6136290, flags=...) at kernel/qeventloop.cpp:149
#7  0x00a9c522 in QEventLoop::exec (this=0xb6136290, flags=...) at kernel/qeventloop.cpp:201
#8  0x009a62a0 in QThread::exec (this=0x8a02808) at thread/qthread.cpp:492
#9  0x00a7dfdb in QInotifyFileSystemWatcherEngine::run (this=0x8a02808) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x009a8da2 in QThreadPrivate::start (arg=0x8a02808) at thread/qthread_unix.cpp:320
#11 0x00514e99 in start_thread (arg=0xb6136b70) at pthread_create.c:304
#12 0x051c473e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xb45d6b70 (LWP 2720)):
#0  0x0066ed41 in clock_gettime (clock_id=1, tp=0xb45d6020) at ../sysdeps/unix/clock_gettime.c:116
#1  0x009fedd8 in do_gettime () at tools/qelapsedtimer_unix.cpp:123
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#3  0x00acb4f2 in updateCurrentTime (this=0x89d793c, tm=...) at kernel/qeventdispatcher_unix.cpp:339
#4  QTimerInfoList::timerWait (this=0x89d793c, tm=...) at kernel/qeventdispatcher_unix.cpp:442
#5  0x00ac9d32 in timerSourcePrepareHelper (src=<value optimized out>, timeout=0xb45d60fc) at kernel/qeventdispatcher_glib.cpp:136
#6  0x00ac9dcd in timerSourcePrepare (source=0x89d7908, timeout=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#7  0x07ceffd4 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0x07cf0e63 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0x07cf1524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0x00aca577 in QEventDispatcherGlib::processEvents (this=0x8b7ab70, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#11 0x00a9c289 in QEventLoop::processEvents (this=0xb45d62b0, flags=...) at kernel/qeventloop.cpp:149
#12 0x00a9c522 in QEventLoop::exec (this=0xb45d62b0, flags=...) at kernel/qeventloop.cpp:201
#13 0x009a62a0 in QThread::exec (this=0x895e680) at thread/qthread.cpp:492
#14 0x00364c52 in KIMAP::SessionThread::run (this=0x895e680) at ../../kimap/sessionthread.cpp:166
#15 0x009a8da2 in QThreadPrivate::start (arg=0x895e680) at thread/qthread_unix.cpp:320
#16 0x00514e99 in start_thread (arg=0xb45d6b70) at pthread_create.c:304
#17 0x051c473e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb6937b70 (LWP 2754)):
#0  0x0066ed41 in clock_gettime (clock_id=1, tp=0xb6937020) at ../sysdeps/unix/clock_gettime.c:116
#1  0x009fedd8 in do_gettime () at tools/qelapsedtimer_unix.cpp:123
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#3  0x00acb4f2 in updateCurrentTime (this=0x8a10304, tm=...) at kernel/qeventdispatcher_unix.cpp:339
#4  QTimerInfoList::timerWait (this=0x8a10304, tm=...) at kernel/qeventdispatcher_unix.cpp:442
#5  0x00ac9d32 in timerSourcePrepareHelper (src=<value optimized out>, timeout=0xb69370fc) at kernel/qeventdispatcher_glib.cpp:136
#6  0x00ac9dcd in timerSourcePrepare (source=0x8a102d0, timeout=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#7  0x07ceffd4 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0x07cf0e63 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0x07cf1524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0x00aca577 in QEventDispatcherGlib::processEvents (this=0x8995110, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#11 0x00a9c289 in QEventLoop::processEvents (this=0xb69372b0, flags=...) at kernel/qeventloop.cpp:149
#12 0x00a9c522 in QEventLoop::exec (this=0xb69372b0, flags=...) at kernel/qeventloop.cpp:201
#13 0x009a62a0 in QThread::exec (this=0x88a6ac8) at thread/qthread.cpp:492
#14 0x00364c52 in KIMAP::SessionThread::run (this=0x88a6ac8) at ../../kimap/sessionthread.cpp:166
#15 0x009a8da2 in QThreadPrivate::start (arg=0x88a6ac8) at thread/qthread_unix.cpp:320
#16 0x00514e99 in start_thread (arg=0xb6937b70) at pthread_create.c:304
#17 0x051c473e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb76d1930 (LWP 2003)):
[KCrash Handler]
#7  0x08098931 in takeFirst (this=0x88174d0, session=0x882eb90) at /usr/include/qt4/QtCore/qlist.h:477
#8  SessionPool::declareSessionReady (this=0x88174d0, session=0x882eb90) at ../../../resources/imap/sessionpool.cpp:207
#9  0x0809a2f4 in SessionPool::onLoginDone (this=0x88174d0, job=0x882ec10) at ../../../resources/imap/sessionpool.cpp:348
#10 0x0809a654 in SessionPool::qt_metacall (this=0x88174d0, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0xbfab5c38) at ./sessionpool.moc:118
#11 0x00aa36ba in QMetaObject::metacall (object=0x88174d0, cl=QMetaObject::InvokeMetaMethod, idx=14, argv=0xbfab5c38) at kernel/qmetaobject.cpp:237
#12 0x00ab34ff in QMetaObject::activate (sender=0x882ec10, m=0x5a2a508, local_signal_index=3, argv=0xbfab5c38) at kernel/qobject.cpp:3287
#13 0x058ccd73 in KJob::result (this=0x882ec10, _t1=0x882ec10) at ./kjob.moc:194
#14 0x058ccdc8 in KJob::emitResult (this=0x882ec10) at ../../kdecore/jobs/kjob.cpp:312
#15 0x00359838 in KIMAP::LoginJob::handleResponse (this=0x882ec10, response=...) at ../../kimap/loginjob.cpp:322
#16 0x003627e0 in KIMAP::SessionPrivate::responseReceived (this=0x88a6380, response=...) at ../../kimap/session.cpp:271
#17 0x00363c28 in KIMAP::Session::qt_metacall (this=0x882eb90, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x88b5328) at ./session.moc:113
#18 0x00aa36ba in QMetaObject::metacall (object=0x882eb90, cl=QMetaObject::InvokeMetaMethod, idx=11, argv=0x88b5328) at kernel/qmetaobject.cpp:237
#19 0x00aade16 in QMetaCallEvent::placeMetaCall (this=0x88b3e00, object=0x882eb90) at kernel/qobject.cpp:535
#20 0x00ab23b7 in QObject::event (this=0x882eb90, e=0x88b3e00) at kernel/qobject.cpp:1226
#21 0x00d07d24 in QApplicationPrivate::notify_helper (this=0x86ba888, receiver=0x882eb90, e=0x88b3e00) at kernel/qapplication.cpp:4462
#22 0x00d0c8ce in QApplication::notify (this=0xbfab6740, receiver=0x882eb90, e=0x88b3e00) at kernel/qapplication.cpp:3862
#23 0x0620793a in KApplication::notify (this=0xbfab6740, receiver=0x882eb90, event=0x88b3e00) at ../../kdeui/kernel/kapplication.cpp:311
#24 0x00a9d0bb in QCoreApplication::notifyInternal (this=0xbfab6740, receiver=0x882eb90, event=0x88b3e00) at kernel/qcoreapplication.cpp:731
#25 0x00aa0c79 in sendEvent (receiver=0x0, event_type=0, data=0x8679970) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#26 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8679970) at kernel/qcoreapplication.cpp:1372
#27 0x00aa0e0d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1265
#28 0x00aca3c4 in sendPostedEvents (s=0x86b19b8) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#29 postEventSourceDispatch (s=0x86b19b8) at kernel/qeventdispatcher_glib.cpp:277
#30 0x07cf0aa8 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#31 0x07cf1270 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#32 0x07cf1524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#33 0x00aca53c in QEventDispatcherGlib::processEvents (this=0x86794c8, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#34 0x00dbe1e5 in QGuiEventDispatcherGlib::processEvents (this=0x86794c8, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#35 0x00a9c289 in QEventLoop::processEvents (this=0xbfab6694, flags=...) at kernel/qeventloop.cpp:149
#36 0x00a9c522 in QEventLoop::exec (this=0xbfab6694, flags=...) at kernel/qeventloop.cpp:201
#37 0x00aa0ecc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#38 0x00d058e7 in QApplication::exec () at kernel/qapplication.cpp:3736
#39 0x0023f938 in Akonadi::ResourceBase::init (r=0x8824fa8) at ../../akonadi/resourcebase.cpp:393
#40 0x0805b303 in init<ImapResource> (argc=) at /usr/include/akonadi/resourcebase.h:188
#41 main (argc=) at ../../../resources/imap/imapresource.cpp:598

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

Possible duplicates by query: bug 282076, bug 278756, bug 265173, bug 256837.

Reported using DrKonqi
Comment 1 Scott Kitterman 2011-10-03 15:30:54 UTC
Created attachment 64170 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.1 (4.7.1) using Qt 4.7.4

- What I was doing when the application crashed:

Crash was shortly after resume while checking  mail before the network was back up.

The package has been updated to the head of the 4.7 branch as of October 1, very close to what will be 4.7.2.

-- Backtrace (Reduced):
#7  0x08099f26 in takeFirst (this=0x8c2834c) at /usr/include/qt4/QtCore/qlist.h:477
#8  SessionPool::declareSessionReady (this=0x8c28328, session=0x8d31bf8) at ../../../resources/imap/sessionpool.cpp:207
#9  0x0809ba29 in SessionPool::onLoginDone (this=0x8c28328, job=0x8cdb748) at ../../../resources/imap/sessionpool.cpp:348
#10 0x0809bd89 in SessionPool::qt_metacall (this=0x8c28328, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0xbf964df8) at ./sessionpool.moc:118
#11 0xb7436b7d in metacall (argv=0xbf964df8, idx=14, cl=QMetaObject::InvokeMetaMethod, object=0x8c28328) at kernel/qmetaobject.cpp:237
Comment 2 Scott Kitterman 2011-10-05 14:05:15 UTC
Created attachment 64246 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.1 (4.7.1) using Qt 4.7.4

- What I was doing when the application crashed:

Lost network connectivity and then automatic imap email check ran.  Akonadi 1.6.2 and kdepim* 4.7.2.

-- Backtrace (Reduced):
#7  0x08099f26 in takeFirst (this=0x9dead94) at /usr/include/qt4/QtCore/qlist.h:477
#8  SessionPool::declareSessionReady (this=0x9dead70, session=0x9fc38c0) at ../../../resources/imap/sessionpool.cpp:207
#9  0x0809ba29 in SessionPool::onLoginDone (this=0x9dead70, job=0xa089f50) at ../../../resources/imap/sessionpool.cpp:348
#10 0x0809bd89 in SessionPool::qt_metacall (this=0x9dead70, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0xbfe24358) at ./sessionpool.moc:118
#11 0xb73c7b7d in metacall (argv=0xbfe24358, idx=14, cl=QMetaObject::InvokeMetaMethod, object=0x9dead70) at kernel/qmetaobject.cpp:237
Comment 3 S. Burmeister 2011-10-07 09:54:13 UTC
Created attachment 64306 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

- What I was doing when the application crashed:

The internet connection was not available while akonadi continued to check for emails. (network connection was available, just no internet) This always leads to a crash after some minutes.

-- Backtrace (Reduced):
#7  0x0809a897 in takeFirst (this=0x81fa2e8, session=0x82836a8) at /usr/include/QtCore/qlist.h:477
#8  SessionPool::declareSessionReady (this=0x81fa2e8, session=0x82836a8) at /usr/src/debug/kdepim-runtime-4.7.2/resources/imap/sessionpool.cpp:207
#9  0x0809c38c in SessionPool::onLoginDone (this=0x81fa2e8, job=0x82bb5a0) at /usr/src/debug/kdepim-runtime-4.7.2/resources/imap/sessionpool.cpp:348
#10 0x0809c6f9 in SessionPool::qt_metacall (this=0x81fa2e8, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0xbfbfe6d8) at /usr/src/debug/kdepim-runtime-4.7.2/build/resources/imap/sessionpool.moc:118
[...]
#13 0xb5c6c205 in KJob::result (this=0x82bb5a0, _t1=0x82bb5a0) at /usr/src/debug/kdelibs-4.7.2/build/kdecore/kjob.moc:194
Comment 4 Milian Wolff 2011-10-09 18:44:35 UTC
Created attachment 64370 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

kmail was trying to fetch mail in a network which required special login via a webinterface and then just crashed

-- Backtrace (Reduced):
#11 0x000000000043dac6 in QList<long long>::first (this=0x1471448) at /usr/include/QtCore/qlist.h:269
#12 0x000000000045d652 in QList<long long>::takeFirst (this=0x1471448) at /usr/include/QtCore/qlist.h:477
#13 0x000000000045b298 in SessionPool::declareSessionReady (this=0x1471400, session=0x1667a60) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/sessionpool.cpp:207
#14 0x000000000045c0ae in SessionPool::onLoginDone (this=0x1471400, job=0x14c4be0) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/sessionpool.cpp:348
#15 0x000000000045cde3 in SessionPool::qt_metacall (this=0x1471400, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0x7fff043c5600) at /home/milian/projects/.build/kde4/kdepim-runtime/resources/imap/sessionpool.moc:118
Comment 5 Milian Wolff 2011-10-09 18:44:48 UTC
Created attachment 64371 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

kmail was trying to fetch mail in a network which required special login via a webinterface and then just crashed

-- Backtrace (Reduced):
#11 0x000000000043dac6 in QList<long long>::first (this=0x1471448) at /usr/include/QtCore/qlist.h:269
#12 0x000000000045d652 in QList<long long>::takeFirst (this=0x1471448) at /usr/include/QtCore/qlist.h:477
#13 0x000000000045b298 in SessionPool::declareSessionReady (this=0x1471400, session=0x1667a60) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/sessionpool.cpp:207
#14 0x000000000045c0ae in SessionPool::onLoginDone (this=0x1471400, job=0x14c4be0) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/sessionpool.cpp:348
#15 0x000000000045cde3 in SessionPool::qt_metacall (this=0x1471400, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0x7fff043c5600) at /home/milian/projects/.build/kde4/kdepim-runtime/resources/imap/sessionpool.moc:118
Comment 6 Martin Tlustos 2011-10-29 08:08:20 UTC
This bug affects me, too. Akonadi does not be patient enough with server replies. I have Caldav resources pointing to google calendars (7, to be exact), deveral IMAP resources etc. and if I have running down- or uploads, the resource that is trying to sync at the time, crashes.
Comment 7 Christophe Marin 2011-11-17 23:21:15 UTC

*** This bug has been marked as a duplicate of bug 286393 ***
Comment 8 David Faure 2012-01-05 11:26:52 UTC
*** Bug 290484 has been marked as a duplicate of this bug. ***