Bug 245135 - IMAP resource hangs after internet connection cycles
Summary: IMAP resource hangs after internet connection cycles
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 1.3.50
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kevin Ottens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-19 15:06 UTC by Leo Franchi
Modified: 2010-08-03 12:17 UTC (History)
3 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 Leo Franchi 2010-07-19 15:06:31 UTC
Version:           1.3.50 (using Devel) 
OS:                Linux

My computer is on a flaky wireless connection, that tends to go down for a few seconds every so often. When this happens, the imap resource hangs, and kmail also hangs as well. Here is the debug output:


[/home/leo/kde/bin/akonadi_imap_resource] akonadi_imap_resource_0(14431)/libakonadi Akonadi::ItemSync::setFullSyncItems: Received:  1 In total:  105  Wanted:  -1
[/home/leo/kde/bin/akonadi_imap_resource] akonadi_imap_resource_0(14431)/libakonadi Akonadi::ItemSync::setFullSyncItems: Received:  1 In total:  106  Wanted:  -1
[/home/leo/kde/bin/akonadi_imap_resource] akonadi_imap_resource_0(14431)/libakonadi Akonadi::ItemSync::setFullSyncItems: Received:  2 In total:  108  Wanted:  -1
[/home/leo/kde/bin/akonadi_imap_resource] akonadi_imap_resource_0(14431)/libakonadi Akonadi::ItemSync::setFullSyncItems: Received:  5 In total:  113  Wanted:  -1
[/home/leo/kde/bin/akonadi_imap_resource] akonadi_imap_resource_0(14431)/libakonadi Akonadi::ItemSync::setFullSyncItems: Received:  2 In total:  115  Wanted:  -1
[/home/leo/kde/bin/akonadi_imap_resource] akonadi_imap_resource_0(14431) ImapResource::doSetOnline: online= false network.status= 0
[/home/leo/kde/bin/akonadi_imap_resource] akonadi_imap_resource_0(14431) ImapResource::doSetOnline: online= true network.status= 0


and then attaching to the imap resource processes with gdb, here is the stack trace:


(gdb) bt
#0  0x00007f4edecef40c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f4edef99d75 in QWaitConditionPrivate::wait (this=0x103fed0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  0x00007f4edef99b1d in QWaitCondition::wait (this=0x103fe20, mutex=0x103fe00, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f4edef99502 in QThread::wait (this=0x103fd10, time=18446744073709551615) at thread/qthread_unix.cpp:660
#4  0x00007f4edd8bfe44 in ~SessionThread (this=0x103fd10, __in_chrg=<value optimized out>) at /home/leo/kde/src/kdepimlibs/kimap/sessionthread.cpp:52
#5  0x00007f4edd8bff30 in ~SessionThread (this=0x103fd10, __in_chrg=<value optimized out>) at /home/leo/kde/src/kdepimlibs/kimap/sessionthread.cpp:53
#6  0x00007f4edd8bbc59 in ~Session (this=0xf41840, __in_chrg=<value optimized out>) at /home/leo/kde/src/kdepimlibs/kimap/session.cpp:67
#7  0x00007f4edd8bbcb8 in ~Session (this=0xf41840, __in_chrg=<value optimized out>) at /home/leo/kde/src/kdepimlibs/kimap/session.cpp:68
#8  0x00007f4edf0bd458 in qDeleteInEventHandler (o=0xf41840) at kernel/qobject.cpp:3980
#9  0x00007f4edf0b7ea1 in QObject::event (this=0xf41840, e=0x1404af0) at kernel/qobject.cpp:1194
#10 0x00007f4ede065532 in QApplicationPrivate::notify_helper (this=0xee3a10, receiver=0xf41840, e=0x1404af0) at kernel/qapplication.cpp:4392
#11 0x00007f4ede062c5c in QApplication::notify (this=0x7fff8d6131e0, receiver=0xf41840, e=0x1404af0) at kernel/qapplication.cpp:3794
#12 0x00007f4edc06abfd in KApplication::notify (this=0x7fff8d6131e0, receiver=0xf41840, event=0x1404af0) at /home/leo/kde/src/kdelibs/kdeui/kernel/kapplication.cpp:309
#13 0x00007f4edf0a1b03 in QCoreApplication::notifyInternal (this=0x7fff8d6131e0, receiver=0xf41840, event=0x1404af0) at kernel/qcoreapplication.cpp:732
#14 0x00007f4edf0a5157 in QCoreApplication::sendEvent (receiver=0xf41840, event=0x1404af0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#15 0x00007f4edf0a2cbd in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0xea3720) at kernel/qcoreapplication.cpp:1370
#16 0x00007f4edf0a28df in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1266
#17 0x00007f4edf0d615d in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#18 0x00007f4edf0d51fe in postEventSourceDispatch (s=0xee7610) at kernel/qeventdispatcher_glib.cpp:277
#19 0x00007f4ed99f4b33 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0x00007f4ed99f5310 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#21 0x00007f4ed99f55ad in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#22 0x00007f4edf0d5a05 in QEventDispatcherGlib::processEvents (this=0xea2dd0, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#23 0x00007f4ede12b89a in QGuiEventDispatcherGlib::processEvents (this=0xea2dd0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#24 0x00007f4edf09fa9a in QEventLoop::processEvents (this=0x7fff8d613150, flags=...) at kernel/qeventloop.cpp:149
#25 0x00007f4edf09fbee in QEventLoop::exec (this=0x7fff8d613150, flags=...) at kernel/qeventloop.cpp:197
#26 0x00007f4edf0a21c2 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#27 0x00007f4ede0627d4 in QApplication::exec () at kernel/qapplication.cpp:3668
#28 0x00007f4edf7d96e0 in Akonadi::ResourceBase::init (r=0xff0960) at /home/leo/kde/src/kdepimlibs/akonadi/resourcebase.cpp:245
#29 0x000000000042ba53 in Akonadi::ResourceBase::init<ImapResource> (argc=3, argv=0x7fff8d613338) at /home/leo/kde/include/akonadi/resourcebase.h:186
#30 0x00000000004250a8 in main (argc=3, argv=0x7fff8d613338) at /home/leo/kde/src/kdepim/runtime/resources/imap/imapresource.cpp:2027
(gdb) 


Reproducible: Sometimes
Comment 1 Leo Franchi 2010-07-19 15:26:00 UTC
another bt from attaching from gdb:

(gdb) bt
#0  0x00007f3270b0040c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3270da9392 in QMutexPrivate::wait (this=0x1ba28c0, timeout=-1) at thread/qmutex_unix.cpp:84
#2  0x00007f3270da42df in QMutex::lock (this=0x1ba2540) at thread/qmutex.cpp:204
#3  0x00007f326f6d2413 in QMutexLocker (this=0x7fffb65d7250, m=0x1ba2540) at /home/leo/qt/4.7/include/QtCore/qmutex.h:102
#4  0x00007f326f6d160e in KIMAP::SessionThread::closeSocket (this=0x1ba2500) at /home/leo/kde/src/kdepimlibs/kimap/sessionthread.cpp:121
#5  0x00007f326f6ce68c in KIMAP::SessionPrivate::socketDisconnected (this=0x1ba2210) at /home/leo/kde/src/kdepimlibs/kimap/session.cpp:331
#6  0x00007f326f6cebba in KIMAP::SessionPrivate::onSocketTimeout (this=0x1ba2210) at /home/leo/kde/src/kdepimlibs/kimap/session.cpp:424
#7  0x00007f326f6cefab in KIMAP::SessionPrivate::qt_metacall (this=0x1ba2210, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fffb65d7390) at /home/leo/kde/build/kdepimlibs/kimap/session_p.moc:82
#8  0x00007f3270eb9ff5 in QMetaObject::metacall (object=0x1ba2210, cl=QMetaObject::InvokeMetaMethod, idx=6, argv=0x7fffb65d7390) at kernel/qmetaobject.cpp:237
#9  0x00007f3270ecd067 in QMetaObject::activate (sender=0x1ba22a8, m=0x7f32712178e0, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3269
#10 0x00007f3270f243a9 in QTimer::timeout (this=0x1ba22a8) at .moc/debug-shared/moc_qtimer.cpp:134
#11 0x00007f3270ed55d9 in QTimer::timerEvent (this=0x1ba22a8, e=0x7fffb65d7d90) at kernel/qtimer.cpp:271
#12 0x00007f3270ec8e45 in QObject::event (this=0x1ba22a8, e=0x7fffb65d7d90) at kernel/qobject.cpp:1175
#13 0x00007f326fe76532 in QApplicationPrivate::notify_helper (this=0x19a1a10, receiver=0x1ba22a8, e=0x7fffb65d7d90) at kernel/qapplication.cpp:4392
#14 0x00007f326fe73c5c in QApplication::notify (this=0x7fffb65d81a0, receiver=0x1ba22a8, e=0x7fffb65d7d90) at kernel/qapplication.cpp:3794
#15 0x00007f326de7bbfd in KApplication::notify (this=0x7fffb65d81a0, receiver=0x1ba22a8, event=0x7fffb65d7d90) at /home/leo/kde/src/kdelibs/kdeui/kernel/kapplication.cpp:309
#16 0x00007f3270eb2b03 in QCoreApplication::notifyInternal (this=0x7fffb65d81a0, receiver=0x1ba22a8, event=0x7fffb65d7d90) at kernel/qcoreapplication.cpp:732
#17 0x00007f3270eb6157 in QCoreApplication::sendEvent (receiver=0x1ba22a8, event=0x7fffb65d7d90) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#18 0x00007f3270ee9a01 in QTimerInfoList::activateTimers (this=0x19a5770) at kernel/qeventdispatcher_unix.cpp:602
#19 0x00007f3270ee6020 in timerSourceDispatch (source=0x19a5710) at kernel/qeventdispatcher_glib.cpp:184
#20 0x00007f3270ee6107 in idleTimerSourceDispatch (source=0x19a57d0) at kernel/qeventdispatcher_glib.cpp:231
#21 0x00007f326b805b33 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0x00007f326b806310 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#23 0x00007f326b8065ad in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#24 0x00007f3270ee6a05 in QEventDispatcherGlib::processEvents (this=0x1960dd0, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#25 0x00007f326ff3c89a in QGuiEventDispatcherGlib::processEvents (this=0x1960dd0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#26 0x00007f3270eb0a9a in QEventLoop::processEvents (this=0x7fffb65d8110, flags=...) at kernel/qeventloop.cpp:149
#27 0x00007f3270eb0bee in QEventLoop::exec (this=0x7fffb65d8110, flags=...) at kernel/qeventloop.cpp:197
#28 0x00007f3270eb31c2 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#29 0x00007f326fe737d4 in QApplication::exec () at kernel/qapplication.cpp:3668
#30 0x00007f32715ea6e0 in Akonadi::ResourceBase::init (r=0x1ae7520) at /home/leo/kde/src/kdepimlibs/akonadi/resourcebase.cpp:245
#31 0x000000000042ba53 in Akonadi::ResourceBase::init<ImapResource> (argc=3, argv=0x7fffb65d82f8) at /home/leo/kde/include/akonadi/resourcebase.h:186
#32 0x00000000004250a8 in main (argc=3, argv=0x7fffb65d82f8) at /home/leo/kde/src/kdepim/runtime/resources/imap/imapresource.cpp:2027
Comment 2 Leo Franchi 2010-07-20 22:36:19 UTC
Kevin's patch seems to fix this crash. On my flaky connection it no longer crashes periodically.
Comment 3 Kevin Ottens 2010-08-03 12:17:27 UTC
Said patch got committed as r1154892. Forgot to add the "BUG:" part in the commit log.