Bug 288268 - imap agents crash when network connection gets closed
Summary: imap agents crash when network connection gets closed
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 4.9
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Kevin Ottens
URL:
Keywords:
: 285117 288515 289052 289767 290773 292607 293165 294401 295001 303381 303386 305691 305936 306040 306819 307658 307673 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-05 14:33 UTC by Milian Wolff
Modified: 2013-05-27 12:21 UTC (History)
31 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.1
Sentry Crash Report:


Attachments
New crash information added by DrKonqi (7.48 KB, text/plain)
2011-12-10 08:42 UTC, Bruno Friedmann
Details
New crash information added by DrKonqi (6.71 KB, text/plain)
2011-12-11 08:53 UTC, Bruno Friedmann
Details
Akonadi imap crash when network goes dropped (6.11 KB, text/plain)
2011-12-14 16:10 UTC, Bruno Friedmann
Details
New crash information added by DrKonqi (6.87 KB, text/plain)
2011-12-19 03:25 UTC, happy
Details
New crash information added by DrKonqi (9.16 KB, text/plain)
2011-12-21 08:58 UTC, Thomas Dreibholz
Details
New crash information added by DrKonqi (9.16 KB, text/plain)
2011-12-21 08:58 UTC, Thomas Dreibholz
Details
New crash information added by DrKonqi (14.77 KB, text/plain)
2011-12-27 15:45 UTC, Anssi Hannula
Details
New crash information added by DrKonqi (3.68 KB, text/plain)
2012-01-07 00:10 UTC, Rudolf Leitgeb
Details
New crash information added by DrKonqi (5.50 KB, text/plain)
2012-01-11 09:37 UTC, christian tacke
Details
New crash information added by DrKonqi (18.95 KB, text/plain)
2012-04-09 17:34 UTC, Rolf Eike Beer
Details
New crash information added by DrKonqi (9.07 KB, text/plain)
2012-05-03 22:35 UTC, Thomas
Details
New crash information added by DrKonqi (5.76 KB, text/plain)
2012-09-05 20:06 UTC, Tomas Trnka
Details
New crash information added by DrKonqi (5.68 KB, text/plain)
2012-09-12 14:06 UTC, bosyber
Details
New crash information added by DrKonqi (10.05 KB, text/plain)
2013-04-01 21:41 UTC, mnd999
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milian Wolff 2011-12-05 14:33:40 UTC
Version:           Git (master)
OS:                Linux

My network connection dropped (packets get lost or timeout) and I wanted to re-connect in wicd. To do that I disconnected first. Once I did this, all my (d)imap agents crashed with a bt similar to the below:

Application: mailstorage@milianw.de of type IMAP E-Mail Server (akonadi_imap_resource), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f35038da760 (LWP 25784))]

Thread 2 (Thread 0x7f34fda5f700 (LWP 26088)):
#0  0x00007f350a15d123 in poll () from /lib/libc.so.6
#1  0x00007f3509349d58 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f350934a219 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f350d74266e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f350d716a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f350d716c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f350d62e13f in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f350e14d7f2 in KIMAP::SessionThread::run (this=0x7f34f8026250) at /home/milian/projects/kde4/kdepimlibs/kimap/sessionthread.cpp:171
#8  0x00007f350d630bc5 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f350d3a6df0 in start_thread () from /lib/libpthread.so.0
#10 0x00007f350a16539d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f35038da760 (LWP 25784)):
[KCrash Handler]
#6  0x00007f350d729e42 in QObject::disconnect(QObject const*, char const*, QObject const*, char const*) () from /usr/lib/libQtCore.so.4
#7  0x000000000045b02a in SessionPool::killSession (this=0x1984080, session=0x19875e0, termination=SessionPool::LogoutSession) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/sessionpool.cpp:177
#8  0x000000000045ad1e in SessionPool::disconnect (this=0x1984080, termination=SessionPool::LogoutSession) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/sessionpool.cpp:119
#9  0x000000000041bf5a in ImapResource::doSetOnline (this=0x1912070, online=false) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/imapresource.cpp:422
#10 0x00007f350dd88524 in Akonadi::AgentBase::setOnline (this=0x1912070, state=false) at /home/milian/projects/kde4/kdepimlibs/akonadi/agentbase.cpp:631
#11 0x00007f350dd87854 in Akonadi::AgentBasePrivate::slotNetworkStatusChange (this=0x188ca30, stat=Solid::Networking::Unconnected) at /home/milian/projects/kde4/kdepimlibs/akonadi/agentbase.cpp:496
#12 0x00007f350dd8975f in Akonadi::AgentBase::qt_metacall (this=0x1912070, _c=QMetaObject::InvokeMetaMethod, _id=18, _a=0x7fff5bef2a90) at /home/milian/projects/.build/kde4/kdepimlibs/akonadi/agentbase.moc:127
#13 0x00007f350de58e97 in Akonadi::ResourceBase::qt_metacall (this=0x1912070, _c=QMetaObject::InvokeMetaMethod, _id=22, _a=0x7fff5bef2a90) at /home/milian/projects/.build/kde4/kdepimlibs/akonadi/moc_resourcebase.cpp:125
#14 0x000000000041cf70 in ImapResource::qt_metacall (this=0x1912070, _c=QMetaObject::InvokeMetaMethod, _id=22, _a=0x7fff5bef2a90) at /home/milian/projects/.build/kde4/kdepim-runtime/resources/imap/imapresource.moc:112
#15 0x00007f350d72a5ea in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#16 0x00007f350bc27cbe in Solid::Networking::Notifier::statusChanged(Solid::Networking::Status) () from /usr/lib/libsolid.so.4
#17 0x00007f350bc283e2 in ?? () from /usr/lib/libsolid.so.4
#18 0x00007f350d72a5ea in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#19 0x00007f350bc89ffe in ?? () from /usr/lib/libsolid.so.4
#20 0x00007f350bc8a065 in ?? () from /usr/lib/libsolid.so.4
#21 0x00007f350da67f89 in ?? () from /usr/lib/libQtDBus.so.4
#22 0x00007f350da715cf in ?? () from /usr/lib/libQtDBus.so.4
#23 0x00007f350d72e18e in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#24 0x00007f350c8d0ae4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#25 0x00007f350c8d5951 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#26 0x00007f350b783bb6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#27 0x00007f350d71789c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#28 0x00007f350d71ac2f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#29 0x00007f350d7421a3 in ?? () from /usr/lib/libQtCore.so.4
#30 0x00007f350934984d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#31 0x00007f350934a048 in ?? () from /usr/lib/libglib-2.0.so.0
#32 0x00007f350934a219 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#33 0x00007f350d742606 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#34 0x00007f350c973eee in ?? () from /usr/lib/libQtGui.so.4
#35 0x00007f350d716a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#36 0x00007f350d716c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#37 0x00007f350d71aeab in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#38 0x00007f350de54a07 in Akonadi::ResourceBase::init (r=0x1912070) at /home/milian/projects/kde4/kdepimlibs/akonadi/resourcebase.cpp:405
#39 0x000000000041e679 in Akonadi::ResourceBase::init<ImapResource> (argc=3, argv=0x7fff5bef3838) at /home/milian/projects/compiled/kde4/include/akonadi/resourcebase.h:188
#40 0x000000000041ce91 in main (argc=3, argv=0x7fff5bef3838) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/imapresource.cpp:600

a different bt showed this:

Thread 1 (Thread 0x7ff8aac7a760 (LWP 25783)):
[KCrash Handler]
#6  0x0000000000000000 in ?? ()
#7  0x00007ff8b4ac9e44 in QObject::disconnect(QObject const*, char const*, QObject const*, char const*) () from /usr/lib/libQtCore.so.4

Reproducible: Always

Steps to Reproduce:
disconnect inet connection in wicd

Actual Results:  
imap agents crash

Expected Results:  
no crash

build everything from git doay
Comment 1 Christophe Marin 2011-12-09 09:56:05 UTC
*** Bug 288515 has been marked as a duplicate of this bug. ***
Comment 2 Bruno Friedmann 2011-12-10 08:42:40 UTC
Created attachment 66583 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.4 (4.7.4) "release 11" using Qt 4.8.0

- What I was doing when the application crashed: I've kontact closed, but mail agent in systray running. the switch linking my lappy to the router goes done, and the network connection was cut during 15/30 secondes.
After ~10 secondes the cut, all the akonadi imap agents crash.

I think it would be cool if the network status if globally down, that those agent get automatically an offline state, with only one warning. With the sound warning on failure with 12 imap account, this start to be a real symphony :D

-- Backtrace (Reduced):
#6  0x00007f9ab9fb3612 in QObject::disconnect (sender=0x73fac0, signal=0x90a389 "connectionLost()", receiver=0x70e1c0, method=0xa29d69 "onEarlyConnectionLost()") at kernel/qobject.cpp:2899
#7  0x0000000000454cb1 in SessionPool::killSession (this=0x70e1c0, session=0x73fac0, termination=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-git/resources/imap/sessionpool.cpp:177
#8  0x0000000000455275 in SessionPool::disconnect (this=0x70e1c0, termination=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-git/resources/imap/sessionpool.cpp:119
#9  0x0000000000417c63 in ImapResource::doSetOnline (this=0x8b6640, online=false) at /usr/src/debug/kdepim-runtime-git/resources/imap/imapresource.cpp:422
#10 0x00007f9aba5fef48 in Akonadi::AgentBase::setOnline (this=0x8b6640, state=false) at /usr/src/debug/kdepimlibs-git/akonadi/agentbase.cpp:631
Comment 3 Bruno Friedmann 2011-12-11 08:53:52 UTC
Created attachment 66613 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.4 (4.7.4) "release 13" using Qt 4.8.0

- What I was doing when the application crashed:
The routeur goes down, so the imap server was inaccessible. The pool connection show a lot of warning. Trying to put kmail in "work offline" mode drive to this crash.

Reproductible : always

-- Backtrace (Reduced):
#6  0x00007f9f76590612 in QObject::disconnect (sender=0x712470, signal=0x776009 "connectionLost()", receiver=0x76a3c0, method=0x90f359 "onEarlyConnectionLost()") at kernel/qobject.cpp:2899
#7  0x0000000000454cb1 in SessionPool::killSession (this=0x76a3c0, session=0x712470, termination=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-git/resources/imap/sessionpool.cpp:177
#8  0x0000000000455275 in SessionPool::disconnect (this=0x76a3c0, termination=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-git/resources/imap/sessionpool.cpp:119
#9  0x0000000000417c63 in ImapResource::doSetOnline (this=0x8c0c90, online=false) at /usr/src/debug/kdepim-runtime-git/resources/imap/imapresource.cpp:422
#10 0x00007f9f76bdc978 in Akonadi::AgentBase::setOnline (this=0x8c0c90, state=false) at /usr/src/debug/kdepimlibs-git/akonadi/agentbase.cpp:631
Comment 4 Allen Winter 2011-12-11 15:38:15 UTC
Milian,

would you try commenting-out the last session->deleteLater() in SessionPool::onConnectionLost(). 

you'll find this in kdepim-runtime/resources/imap/sessionpool.cpp

see if this helps. so far for me I don't see any crashes in sessionpool after testing for 3-4 days
Comment 5 Milian Wolff 2011-12-13 11:53:33 UTC
just did the same thing like first comment, and the agents crashed again. the backtrace is different now though:

Application: milian.wolff@kdab.com of type IMAP E-Mail Server (akonadi_imap_resource), signal: Aborted
[Current thread is 1 (Thread 0x7f5e1eda4760 (LWP 1208))]

Thread 3 (Thread 0x7f5e1972a700 (LWP 2464)):
#0  0x00007f5e25627123 in poll () from /lib/libc.so.6
#1  0x00007f5e24813d58 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f5e24814219 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f5e28c0c606 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f5e28be0a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f5e28be0c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f5e28af813f in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f5e296177f2 in KIMAP::SessionThread::run (this=0xc87d50) at /home/milian/projects/kde4/kdepimlibs/kimap/sessionthread.cpp:171
#8  0x00007f5e28afabc5 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f5e28870df0 in start_thread () from /lib/libpthread.so.0
#10 0x00007f5e2562f39d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f5e13fff700 (LWP 2468)):
#0  0x00007f5e25627123 in poll () from /lib/libc.so.6
#1  0x00007f5e24813d58 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f5e24814219 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f5e28c0c606 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f5e28be0a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f5e28be0c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f5e28af813f in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f5e296177f2 in KIMAP::SessionThread::run (this=0xf9c480) at /home/milian/projects/kde4/kdepimlibs/kimap/sessionthread.cpp:171
#8  0x00007f5e28afabc5 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f5e28870df0 in start_thread () from /lib/libpthread.so.0
#10 0x00007f5e2562f39d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f5e1eda4760 (LWP 1208)):
[KCrash Handler]
#6  0x00007f5e2558f965 in raise () from /lib/libc.so.6
#7  0x00007f5e25590ddb in abort () from /lib/libc.so.6
#8  0x00007f5e28af14f4 in qt_message_output(QtMsgType, char const*) () from /usr/lib/libQtCore.so.4
#9  0x00007f5e28af16af in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007f5e28af1854 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#11 0x00007f5e2932014c in Akonadi::ResourceBase::collectionsRetrieved (this=0x9e6d70, collections=...) at /home/milian/projects/kde4/kdepimlibs/akonadi/resourcebase.cpp:575
#12 0x0000000000420d8f in ResourceState::collectionsRetrieved (this=0xb318f0, collections=...) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/resourcestate.cpp:351
#13 0x000000000044bba1 in ResourceTask::collectionsRetrieved (this=0xa934c0, collections=...) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/resourcetask.cpp:263
#14 0x0000000000453545 in RetrieveCollectionsTask::onMailBoxesReceiveDone (this=0xa934c0, job=0xa939d0) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/retrievecollectionstask.cpp:194
#15 0x000000000045384a in RetrieveCollectionsTask::qt_metacall (this=0xa934c0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fffaef7c450) at /home/milian/projects/.build/kde4/kdepim-runtime/resources/imap/retrievecollectionstask.moc:82
#16 0x00007f5e28bf45ea in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#17 0x00007f5e261c3742 in KJob::result(KJob*) () from /usr/lib/libkdecore.so.5
#18 0x00007f5e261c3780 in KJob::emitResult() () from /usr/lib/libkdecore.so.5
#19 0x00007f5e295fb52e in KIMAP::Job::handleErrorReplies (this=0xa939d0, response=...) at /home/milian/projects/kde4/kdepimlibs/kimap/job.cpp:86
#20 0x00007f5e296069f8 in KIMAP::ListJob::handleResponse (this=0xa939d0, response=...) at /home/milian/projects/kde4/kdepimlibs/kimap/listjob.cpp:178
#21 0x00007f5e29613641 in KIMAP::SessionPrivate::responseReceived (this=0xc0df20, response=...) at /home/milian/projects/kde4/kdepimlibs/kimap/session.cpp:271
#22 0x00007f5e2961477e in KIMAP::Session::qt_metacall (this=0xc243a0, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xca0d40) at /home/milian/projects/.build/kde4/kdepimlibs/kimap/session.moc:113
#23 0x00007f5e28bf818e in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#24 0x00007f5e27d9aae4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#25 0x00007f5e27d9f951 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#26 0x00007f5e26c4dbb6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#27 0x00007f5e28be189c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#28 0x00007f5e28be4c2f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#29 0x00007f5e28c0c1a3 in ?? () from /usr/lib/libQtCore.so.4
#30 0x00007f5e2481384d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#31 0x00007f5e24814048 in ?? () from /usr/lib/libglib-2.0.so.0
#32 0x00007f5e24814219 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#33 0x00007f5e28c0c606 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#34 0x00007f5e27e3deee in ?? () from /usr/lib/libQtGui.so.4
#35 0x00007f5e28be0a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#36 0x00007f5e28be0c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#37 0x00007f5e28be4eab in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#38 0x00007f5e2931ea2f in Akonadi::ResourceBase::init (r=0x9e6d70) at /home/milian/projects/kde4/kdepimlibs/akonadi/resourcebase.cpp:405
#39 0x000000000041e679 in Akonadi::ResourceBase::init<ImapResource> (argc=3, argv=0x7fffaef7d1a8) at /home/milian/projects/compiled/kde4/include/akonadi/resourcebase.h:188
#40 0x000000000041ce91 in main (argc=3, argv=0x7fffaef7d1a8) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/imapresource.cpp:600
Comment 6 Allen Winter 2011-12-13 14:47:21 UTC
this crash shows that the connectionlost signal isn't getting through when your network is lost. 

this sounds like some type of interaction with Solid to me.  
maybe wicd doesn't play nice with Solid??

anyway, seems like we are narrowing down the problem
Comment 7 Allen Winter 2011-12-13 14:49:29 UTC
sorry, that was stupid.  kimap has no dependency on Solid -- it does all the network status tracking itself by looking at the socket status.
Comment 8 Bruno Friedmann 2011-12-14 16:10:37 UTC
Created attachment 66744 [details]
Akonadi imap crash when network goes dropped

A new backtrace this morning, when I've no more network available
Comment 9 Bruno Friedmann 2011-12-14 16:11:14 UTC
to Allen : not sure you get the case, but it's seems that akonadi crash when it should just goes offline, and sending ONE notify about its status.
Comment 10 Christophe Marin 2011-12-17 12:52:50 UTC
*** Bug 289052 has been marked as a duplicate of this bug. ***
Comment 11 happy 2011-12-19 03:25:09 UTC
Created attachment 66892 [details]
New crash information added by DrKonqi

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

- What I was doing when the application crashed:

Mobile Broadband connection dropped out - got lots of notification dialog boxes about server problems so I quite KMail and then this crash occured (for _all_ of my GMail accounts there was a seg fault)

-- Backtrace (Reduced):
#7  0x008ee1f1 in QObject::disconnect (sender=0xb4712d98, signal=0x80aba94 "2connectionLost()", receiver=0x9921468, method=0x80aba7b "1onEarlyConnectionLost()") at kernel/qobject.cpp:2728
#8  0x08099257 in SessionPool::killSession (this=0x9921468, session=0xb4712d98, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:177
#9  0x08099880 in SessionPool::disconnect (this=0x9921468, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:119
#10 0x0805a07b in ImapResource::doSetOnline (this=0x9938958, online=false) at ../../../resources/imap/imapresource.cpp:421
#11 0x0016dd25 in Akonadi::AgentBase::setOnline(bool) () from /usr/lib/libakonadi-kde.so.4
Comment 12 Thomas Dreibholz 2011-12-21 08:58:35 UTC
Created attachment 66966 [details]
New crash information added by DrKonqi

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

- What I was doing when the application crashed:

resuming the laptop from "suspend to RAM". Before suspending the laptop, it had a mobile Internet connection (by WLAN).

-- Backtrace (Reduced):
#7  0x00007f6e5e419714 in QObject::disconnect (sender=0x2ad20d0, signal=0x2837999 "connectionLost()", receiver=0x264d220, method=0x2740c29 "onEarlyConnectionLost()") at kernel/qobject.cpp:2728
#8  0x0000000000453931 in SessionPool::killSession (this=0x264d220, session=0x2ad20d0, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:177
#9  0x0000000000453ef5 in SessionPool::disconnect (this=0x264d220, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:119
#10 0x00000000004168c3 in ImapResource::doSetOnline (this=0x26a3340, online=false) at ../../../resources/imap/imapresource.cpp:421
#11 0x00007f6e5ea31ee8 in Akonadi::AgentBase::setOnline (this=0x26a3340, state=false) at ../../akonadi/agentbase.cpp:630
Comment 13 Thomas Dreibholz 2011-12-21 08:58:35 UTC
Created attachment 66965 [details]
New crash information added by DrKonqi

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

- What I was doing when the application crashed:

resuming the laptop from "suspend to RAM". Before suspending the laptop, it had a mobile Internet connection (by WLAN).

-- Backtrace (Reduced):
#7  0x00007f6e5e419714 in QObject::disconnect (sender=0x2ad20d0, signal=0x2837999 "connectionLost()", receiver=0x264d220, method=0x2740c29 "onEarlyConnectionLost()") at kernel/qobject.cpp:2728
#8  0x0000000000453931 in SessionPool::killSession (this=0x264d220, session=0x2ad20d0, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:177
#9  0x0000000000453ef5 in SessionPool::disconnect (this=0x264d220, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:119
#10 0x00000000004168c3 in ImapResource::doSetOnline (this=0x26a3340, online=false) at ../../../resources/imap/imapresource.cpp:421
#11 0x00007f6e5ea31ee8 in Akonadi::AgentBase::setOnline (this=0x26a3340, state=false) at ../../akonadi/agentbase.cpp:630
Comment 14 Christophe Marin 2011-12-25 13:13:22 UTC
*** Bug 289767 has been marked as a duplicate of this bug. ***
Comment 15 Anssi Hannula 2011-12-27 15:45:15 UTC
Created attachment 67161 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.7) on KDE Platform 4.7.95 (4.8 RC1 (4.7.95) using Qt 4.7.4

- What I was doing when the application crashed:

Nothing, the program was in the background. Note that in my case the network connection didn't actually drop, but looking at the backtrace it seems the IMAP connection got closed due to some other reason, thus triggering this bug.

This happens reproducably every 30-150mins or so (I haven't timed it).

-- Backtrace (Reduced):
#7  0x00007ffd079fe7b4 in QObject::disconnect (sender=0x10c5b10, signal=0xe12c59 "connectionLost()", receiver=0xf4b610, method=0x1106189 "onEarlyConnectionLost()") at kernel/qobject.cpp:2728
#8  0x0000000000453d31 in SessionPool::killSession (this=0xf4b610, session=0x10c5b10, termination=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-4.7.95/resources/imap/sessionpool.cpp:177
#9  0x00000000004542e5 in SessionPool::disconnect (this=0xf4b610, termination=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-4.7.95/resources/imap/sessionpool.cpp:119
#10 0x0000000000416c23 in ImapResource::doSetOnline (this=0xeb50e0, online=false) at /usr/src/debug/kdepim-runtime-4.7.95/resources/imap/imapresource.cpp:422
#11 0x00007ffd0801d718 in Akonadi::AgentBase::setOnline (this=0xeb50e0, state=false) at /usr/src/debug/kdepimlibs-4.7.95/akonadi/agentbase.cpp:631
Comment 16 David Faure 2012-01-05 11:17:37 UTC
Git commit 462d1ba23899dda3bc9d0abf6b0937754bf6c258 by David Faure.
Committed on 05/01/2012 at 12:01.
Pushed by dfaure into branch 'master'.

Fix crashes due to deleted Session pointers being kept around.

And fix LogoutJob never going through in the idle session, because the IdleJob
runs forever. The idle job has to be stopped, first.

Tested with kDebugs and using 'RMB / Toggle online/offline'

Both fixes suggested by Kévin when discussing the issue with him.
Related: bug 258271
FIXED-IN: 4.8

M  +3    -0    resources/imap/imapidlemanager.cpp
M  +2    -0    resources/imap/sessionpool.cpp

http://commits.kde.org/kdepim-runtime/462d1ba23899dda3bc9d0abf6b0937754bf6c258
Comment 17 David Faure 2012-01-05 11:31:30 UTC
*** Bug 285117 has been marked as a duplicate of this bug. ***
Comment 18 Christophe Marin 2012-01-06 10:06:02 UTC
*** Bug 290773 has been marked as a duplicate of this bug. ***
Comment 19 Rudolf Leitgeb 2012-01-07 00:10:25 UTC
Created attachment 67526 [details]
New crash information added by DrKonqi

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

- What I was doing when the application crashed:

closed kmail. This crash happens if and only if for some reason the IMAP connection was dysfunctional at the time kmail was closed, my network was fully operational at the time.

-- Backtrace (Reduced):
#7  0x00007f593b11f714 in QObject::disconnect (sender=0x169e2a0, signal=0x1480869 "connectionLost()", receiver=0x1482aa0, method=0x1480999 "onEarlyConnectionLost()") at kernel/qobject.cpp:2728
#8  0x0000000000453931 in SessionPool::killSession (this=0x1482aa0, session=0x169e2a0, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:177
#9  0x0000000000453ef5 in SessionPool::disconnect (this=0x1482aa0, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:119
#10 0x0000000000453ff7 in SessionPool::~SessionPool (this=0x1482aa0, __in_chrg=<optimized out>) at ../../../resources/imap/sessionpool.cpp:56
#11 0x00000000004540e9 in SessionPool::~SessionPool (this=0x1482aa0, __in_chrg=<optimized out>) at ../../../resources/imap/sessionpool.cpp:57
Comment 20 Milian Wolff 2012-01-10 15:09:06 UTC
reopening, I still get this crash everytime I resume from suspend. kdepim stuff and akonadi are compiled from todays' git. The BT stays the same:

Application: mailstorage@milianw.de of type IMAP E-Mail Server (akonadi_imap_resource), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f4ce87a0780 (LWP 18634))]

Thread 3 (Thread 0x7f4ce3161700 (LWP 18739)):
#0  0x00007f4cee215f05 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#1  0x00007f4cee216bed in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f4cee217219 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f4cf2960166 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f4cf292fe92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f4cf29300e7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f4cf2830d47 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f4cf339b5ab in KIMAP::SessionThread::run (this=0x10ff910) at /home/milian/projects/kde4/kdepimlibs/kimap/sessionthread.cpp:178
#8  0x00007f4cf2833d6b in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f4cf25a2e7a in start_thread () from /lib/libpthread.so.0
#10 0x00007f4cef288bad in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f4ce2960700 (LWP 19016)):
#0  0x00007f4cef2808b3 in poll () from /lib/libc.so.6
#1  0x00007f4cee216d58 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f4cee217219 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f4cf2960166 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f4cf292fe92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f4cf29300e7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f4cf2830d47 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f4cf339b5ab in KIMAP::SessionThread::run (this=0x1369fb0) at /home/milian/projects/kde4/kdepimlibs/kimap/sessionthread.cpp:178
#8  0x00007f4cf2833d6b in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f4cf25a2e7a in start_thread () from /lib/libpthread.so.0
#10 0x00007f4cef288bad in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f4ce87a0780 (LWP 18634)):
[KCrash Handler]
#6  0x00007f4cf29447d2 in QObject::disconnect(QObject const*, char const*, QObject const*, char const*) () from /usr/lib/libQtCore.so.4
#7  0x000000000045bdca in SessionPool::killSession (this=0x10cc330, session=0x1133470, termination=SessionPool::LogoutSession) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/sessionpool.cpp:177
#8  0x000000000045babe in SessionPool::disconnect (this=0x10cc330, termination=SessionPool::LogoutSession) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/sessionpool.cpp:119
#9  0x000000000041c2aa in ImapResource::doSetOnline (this=0x103bf70, online=false) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/imapresource.cpp:422
#10 0x00007f4cf2fcf248 in Akonadi::AgentBase::setOnline (this=0x103bf70, state=false) at /home/milian/projects/kde4/kdepimlibs/akonadi/agentbase.cpp:631
#11 0x00007f4cf2fce578 in Akonadi::AgentBasePrivate::slotNetworkStatusChange (this=0x1050eb0, stat=Solid::Networking::Unconnected) at /home/milian/projects/kde4/kdepimlibs/akonadi/agentbase.cpp:496
#12 0x00007f4cf2fd03e8 in Akonadi::AgentBase::qt_static_metacall (_o=0x103bf70, _c=QMetaObject::InvokeMetaMethod, _id=18, _a=0x7ffff5c22690) at /home/milian/projects/.build/kde4/kdepimlibs/akonadi/agentbase.moc:102
#13 0x00007f4cf2944f51 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#14 0x00007f4cf0dcfa0e in Solid::Networking::Notifier::statusChanged(Solid::Networking::Status) () from /usr/lib/libsolid.so.4
#15 0x00007f4cf2944f51 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#16 0x00007f4cf0e3231e in ?? () from /usr/lib/libsolid.so.4
#17 0x00007f4cf0e3236e in ?? () from /usr/lib/libsolid.so.4
#18 0x00007f4cf0e327ef in ?? () from /usr/lib/libsolid.so.4
#19 0x00007f4cf2cab37b in ?? () from /usr/lib/libQtDBus.so.4
#20 0x00007f4cf294a116 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#21 0x00007f4cf1a9f854 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#22 0x00007f4cf1aa46d3 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#23 0x00007f4cf06e3ef6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#24 0x00007f4cf29310ac in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#25 0x00007f4cf293494a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#26 0x00007f4cf295fcd3 in ?? () from /usr/lib/libQtCore.so.4
#27 0x00007f4cee21684d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#28 0x00007f4cee217048 in ?? () from /usr/lib/libglib-2.0.so.0
#29 0x00007f4cee217219 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#30 0x00007f4cf29600ff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#31 0x00007f4cf1b42f1e in ?? () from /usr/lib/libQtGui.so.4
#32 0x00007f4cf292fe92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0x00007f4cf29300e7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#34 0x00007f4cf2934c45 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#35 0x00007f4cf309d4fb in Akonadi::ResourceBase::init (r=0x103bf70) at /home/milian/projects/kde4/kdepimlibs/akonadi/resourcebase.cpp:405
#36 0x000000000041e99c in Akonadi::ResourceBase::init<ImapResource> (argc=3, argv=0x7ffff5c23698) at /home/milian/projects/compiled/kde4/include/akonadi/resourcebase.h:188
#37 0x000000000041d1e1 in main (argc=3, argv=0x7ffff5c23698) at /home/milian/projects/kde4/kdepim-runtime/resources/imap/imapresource.cpp:600
Comment 21 christian tacke 2012-01-11 09:37:36 UTC
Created attachment 67691 [details]
New crash information added by DrKonqi

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

- What I was doing when the application crashed:
After suspend to ram my mail agents told me continusly that it was disconnected though I had a working WLAN connection again. On logging off one agent crashed - which was spamming notifications a lot before.

-- Backtrace (Reduced):
#6  0x0000003642b8c552 in QObject::disconnect (sender=0x1bbc3c0, signal=0x1b7f249 "connectionLost()", receiver=0x1b644b0, method=0x1c2a929 "onEarlyConnectionLost()") at kernel/qobject.cpp:2891
#7  0x0000000000452ca1 in SessionPool::killSession (this=0x1b644b0, session=0x1bbc3c0, termination=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-4.7.4/resources/imap/sessionpool.cpp:177
#8  0x0000000000453265 in SessionPool::disconnect (this=0x1b644b0, termination=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-4.7.4/resources/imap/sessionpool.cpp:119
#9  0x0000000000453367 in SessionPool::~SessionPool (this=0x1b644b0, __in_chrg=<optimized out>) at /usr/src/debug/kdepim-runtime-4.7.4/resources/imap/sessionpool.cpp:56
#10 0x0000000000453459 in SessionPool::~SessionPool (this=0x1b644b0, __in_chrg=<optimized out>) at /usr/src/debug/kdepim-runtime-4.7.4/resources/imap/sessionpool.cpp:57
Comment 22 David Faure 2012-01-12 12:00:50 UTC
I'm currently testing this patch, which I think should fix this:

http://www.davidfaure.fr/kde/loginjob.diff

(Well, I'll know tomorrow if it worked, it happens to me after suspend/resume)
Comment 23 David Faure 2012-01-17 22:11:20 UTC
Git commit 5c236f931e0e55b56ecf1e02d606614d31c01f44 by David Faure.
Committed on 12/01/2012 at 12:54.
Pushed by dfaure into branch 'KDE/4.8'.

Set an error code when we lost connection.

Otherwise the imap resource assumes we could log in, and stores the session
that just got deleted, leading to crashes further down the road.

M  +2    -0    kimap/loginjob.cpp
M  +4    -0    kimap/loginjob.h

http://commits.kde.org/kdepimlibs/5c236f931e0e55b56ecf1e02d606614d31c01f44
Comment 24 David Faure 2012-01-17 22:13:44 UTC
Git commit 757f464e5de7f992d0bfcb90dc97d4ea40df47d5 by David Faure.
Committed on 17/01/2012 at 23:02.
Pushed by dfaure into branch 'KDE/4.8'.

Rework handling of connection failures, to fix crashes.

Testcase: unplugging my network cable, waiting for timeouts, plugging it
back again later, check mail.

* Port from deprecated connectionLost to stateChanged, which has the major
benefit of not confusing "failure to connect" with "we lost our connection"
(due to KIMAP::Session emitting both signals for compat reasons).

* Failure to connect is now handled in the result slot for the LoginJob,
rather than via the connectionFailed signal, since the first one is called
anyway.

* Make sure we emit connectDone on error, even if m_initialConnectDone is true,
so that the resource sets itself to offline (rather than it attempting the
same task over and over again!).

* Don't set the resource status to Broken when it's simply offline
(login failure due to "could not connect" is handled separately now)

* Make sure not to pop up a password dialog when couldn't connect; this
is different from "we could connect but the server refused login".

Requires kdepimlibs commit acdb0f7e50 for ERR_COULD_NOT_CONNECT.

FIXED-IN: 4.8

M  +5    -0    resources/imap/imapresource.cpp
M  +27   -35   resources/imap/sessionpool.cpp
M  +5    -4    resources/imap/sessionpool.h
M  +33   -0    resources/imap/tests/imaptestbase.h
M  +29   -0    resources/imap/tests/testsessionpool.cpp

http://commits.kde.org/kdepim-runtime/757f464e5de7f992d0bfcb90dc97d4ea40df47d5
Comment 25 David Faure 2012-01-17 22:25:56 UTC
Git commit 6d6476e80ccc3d058d0e56bab52ab8430315ba15 by David Faure.
Committed on 17/01/2012 at 23:02.
Pushed by dfaure into branch 'master'.

Rework handling of connection failures, to fix crashes.

Testcase: unplugging my network cable, waiting for timeouts, plugging it
back again later, check mail.

* Port from deprecated connectionLost to stateChanged, which has the major
benefit of not confusing "failure to connect" with "we lost our connection"
(due to KIMAP::Session emitting both signals for compat reasons).

* Failure to connect is now handled in the result slot for the LoginJob,
rather than via the connectionFailed signal, since the first one is called
anyway.

* Make sure we emit connectDone on error, even if m_initialConnectDone is true,
so that the resource sets itself to offline (rather than it attempting the
same task over and over again!).

* Don't set the resource status to Broken when it's simply offline
(login failure due to "could not connect" is handled separately now)

* Make sure not to pop up a password dialog when couldn't connect; this
is different from "we could connect but the server refused login".

Requires kdepimlibs commit acdb0f7e50 for ERR_COULD_NOT_CONNECT.

FIXED-IN: 4.8
(cherry picked from commit 757f464e5de7f992d0bfcb90dc97d4ea40df47d5)

M  +5    -0    resources/imap/imapresource.cpp
M  +27   -35   resources/imap/sessionpool.cpp
M  +5    -4    resources/imap/sessionpool.h
M  +33   -0    resources/imap/tests/imaptestbase.h
M  +29   -0    resources/imap/tests/testsessionpool.cpp

http://commits.kde.org/kdepim-runtime/6d6476e80ccc3d058d0e56bab52ab8430315ba15
Comment 26 Christophe Marin 2012-02-03 13:04:11 UTC
*** Bug 293165 has been marked as a duplicate of this bug. ***
Comment 27 Rolf Eike Beer 2012-04-09 17:34:15 UTC
Created attachment 70266 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.8) on KDE Platform 4.8.2 (4.8.2) "release 490" using Qt 4.8.1

I got this crash using KDE SC 4.8.2 when resuming from suspend to disk.

-- Backtrace (Reduced):
#6  0xb73d0291 in QObject::disconnect (sender=0x81f0988, signal=0x80ae284 "2stateChanged(KIMAP::Session::State,KIMAP::Session::State)", receiver=0x821a260, method=0x80ae240 "1onSessionStateChanged(KIMAP::Session::State,KIMAP::Session::State)") at kernel/qobject.cpp:2900
#7  0x0809b67d in SessionPool::killSession (this=0x821a260, session=0x81f0988, termination=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-4.8.2/resources/imap/sessionpool.cpp:176
#8  0x0809ba7c in SessionPool::disconnect (this=0x821a260, termination=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-4.8.2/resources/imap/sessionpool.cpp:117
#9  0x0805d033 in ImapResource::doSetOnline (this=0x81da158, online=false) at /usr/src/debug/kdepim-runtime-4.8.2/resources/imap/imapresource.cpp:427
#10 0xb76039a3 in Akonadi::AgentBase::setOnline (this=0x81da158, state=false) at /usr/src/debug/kdepimlibs-4.8.2/akonadi/agentbase.cpp:631
Comment 28 Thomas 2012-05-03 22:35:34 UTC
Created attachment 70843 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.8) on KDE Platform 4.8.2 (4.8.2) using Qt 4.8.1

- What I was doing when the application crashed:
same happens when having very small bandwith (mobile internet) as imap probably wants to switch to offline

-- Backtrace (Reduced):
#6  0x00007f9a4992d4ad in indexOfMethodRelative<4> (normalizeStringData=false, method=0x28bcb89 "stateChanged(KIMAP::Session::State,KIMAP::Session::State)", baseObject=0x7fffa8af8fd0) at kernel/qmetaobject.cpp:525
#7  QMetaObjectPrivate::indexOfSignalRelative (baseObject=0x7fffa8af8fd0, signal=0x28bcb89 "stateChanged(KIMAP::Session::State,KIMAP::Session::State)", normalizeStringData=false) at kernel/qmetaobject.cpp:628
#8  0x00007f9a49939b37 in QObject::disconnect (sender=0x2683de0, signal=0x28bcb89 "stateChanged(KIMAP::Session::State,KIMAP::Session::State)", receiver=0x2531180, method=0x28e3269 "onSessionStateChanged(KIMAP::Session::State,KIMAP::Session::State)") at kernel/qobject.cpp:2895
#9  0x0000000000454365 in SessionPool::killSession (this=0x2531180, session=0x2683de0, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:176
#10 0x0000000000454d67 in SessionPool::cancelSessionCreation (this=0x2531180, session=0x2683de0, errorCode=4, errorMessage=...) at ../../../resources/imap/sessionpool.cpp:233
Comment 29 Myriam Schweingruber 2012-09-02 06:53:03 UTC
*** Bug 294401 has been marked as a duplicate of this bug. ***
Comment 30 Myriam Schweingruber 2012-09-02 06:54:10 UTC
*** Bug 292607 has been marked as a duplicate of this bug. ***
Comment 31 Myriam Schweingruber 2012-09-02 06:55:16 UTC
*** Bug 303386 has been marked as a duplicate of this bug. ***
Comment 32 Myriam Schweingruber 2012-09-02 06:56:06 UTC
*** Bug 306040 has been marked as a duplicate of this bug. ***
Comment 33 Myriam Schweingruber 2012-09-02 06:56:43 UTC
*** Bug 305936 has been marked as a duplicate of this bug. ***
Comment 34 Myriam Schweingruber 2012-09-02 06:57:11 UTC
*** Bug 303381 has been marked as a duplicate of this bug. ***
Comment 35 Myriam Schweingruber 2012-09-02 06:57:53 UTC
*** Bug 295001 has been marked as a duplicate of this bug. ***
Comment 36 Myriam Schweingruber 2012-09-02 06:59:26 UTC
*** Bug 305691 has been marked as a duplicate of this bug. ***
Comment 37 Tomas Trnka 2012-09-05 20:06:55 UTC
Created attachment 73680 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.8) on KDE Platform 4.8.5 (4.8.5) using Qt 4.8.2

- What I was doing when the application crashed:

Perfectly reproducible crash due to server rejecting STARTTLS (because of server overload) - a dialog asking whether to open settings, try again or cancel appears. If "cancel" is clicked, IMAP resource immediately crashes and is marked Broken. Just after that, it is respawned and the whole story happens again, and again…

-- Backtrace (Reduced):
#7  0x0000003a10f8c4d1 in QObject::disconnect (sender=0x171aec0, signal=0x16ea2c9 "stateChanged(KIMAP::Session::State,KIMAP::Session::State)", receiver=0x16da130, method=0x17b7cf9 "onSessionStateChanged(KIMAP::Session::State,KIMAP::Session::State)") at kernel/qobject.cpp:2891
#8  0x0000000000452765 in SessionPool::killSession (this=this@entry=0x16da130, session=session@entry=0x171aec0, termination=termination@entry=SessionPool::LogoutSession) at /usr/src/debug/kdepim-runtime-4.8.5/resources/imap/sessionpool.cpp:176
#9  0x0000000000453191 in SessionPool::cancelSessionCreation (this=this@entry=0x16da130, session=0x171aec0, errorCode=errorCode@entry=4, errorMessage=...) at /usr/src/debug/kdepim-runtime-4.8.5/resources/imap/sessionpool.cpp:233
#10 0x00000000004544d5 in SessionPool::onPasswordRequestDone (this=0x16da130, resultType=<optimized out>, password=...) at /usr/src/debug/kdepim-runtime-4.8.5/resources/imap/sessionpool.cpp:308
#11 0x0000000000455097 in SessionPool::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/kdepim-runtime-4.8.5/x86_64-redhat-linux-gnu/resources/imap/sessionpool.moc:93
Comment 38 bosyber 2012-09-12 14:06:28 UTC
Created attachment 73860 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.9) on KDE Platform 4.9.1 using Qt 4.8.3

- What I was doing when the application crashed:

Changing password for account and attempting to connect. Note that the site is hosted by banan.cz but is names logist-iq.eu - this usually gest a warning about the certificate, it doesn't always work to whitelist the certificate.

-- Backtrace (Reduced):
#7  0x00007fc2c97c09b7 in QObject::disconnect(QObject const*, char const*, QObject const*, char const*) () from /opt/project-neon/lib/libQtCore.so.4
#8  0x000000000045cff8 in SessionPool::killSession (this=0x1f1d8b0, session=0x1f35ca0, termination=SessionPool::LogoutSession) at /build/buildd/project-neon-kdepim-runtime-2+git20120911+r7756/resources/imap/sessionpool.cpp:176
#9  0x000000000045d386 in SessionPool::cancelSessionCreation (this=0x1f1d8b0, session=0x1f35ca0, errorCode=2, errorMessage=...) at /build/buildd/project-neon-kdepim-runtime-2+git20120911+r7756/resources/imap/sessionpool.cpp:233
#10 0x000000000045d8f9 in SessionPool::onPasswordRequestDone (this=0x1f1d8b0, resultType=1, password=...) at /build/buildd/project-neon-kdepim-runtime-2+git20120911+r7756/resources/imap/sessionpool.cpp:295
#11 0x000000000045ee08 in SessionPool::qt_static_metacall (_o=0x1f1d8b0, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fff55e622c0) at /build/buildd/project-neon-kdepim-runtime-2+git20120911+r7756/obj-x86_64-linux-gnu/resources/imap/sessionpool.moc:94
Comment 39 Jekyll Wu 2012-09-15 07:19:45 UTC
*** Bug 306819 has been marked as a duplicate of this bug. ***
Comment 40 Myriam Schweingruber 2012-10-03 22:43:33 UTC
*** Bug 307673 has been marked as a duplicate of this bug. ***
Comment 41 Myriam Schweingruber 2012-10-03 23:19:39 UTC
*** Bug 307658 has been marked as a duplicate of this bug. ***
Comment 42 Maarten Bezemer 2013-01-09 09:18:29 UTC
When I told KMail to go offline (File -> Work Offline), because the progress was stuck at 0%, I got this crash (same bt).

KDE/Kontact: 4.9.3, Qt 4.8.3, Akonadi 1.8.1, Kubuntu 12.10
Comment 43 David Faure 2013-02-17 21:02:27 UTC
Git commit d82e4917f7286984bce16c2fa36ea4e9f6a24453 by David Faure.
Committed on 17/02/2013 at 21:54.
Pushed by dfaure into branch 'KDE/4.10'.

Fix crash due to dangling session pointer in m_pendingInitialSession.

This happens after disconnect() kills all sessions (e.g. due to losing
internet connection while the password dialog is up, or explicit toggling
of offline/online status, or due to the "SSL not supported").
Related: bug 312480, bug 310072, bug 308888, bug 312057, bug 309357, bug 308207, bug 312535, bug 311014, bug 309346, bug 307780
FIXED-IN: 4.10.1

M  +1    -0    resources/imap/sessionpool.cpp

http://commits.kde.org/kdepim-runtime/d82e4917f7286984bce16c2fa36ea4e9f6a24453
Comment 44 mnd999 2013-04-01 21:41:25 UTC
Created attachment 78563 [details]
New crash information added by DrKonqi

akonadi_imap_resource (4.10) on KDE Platform 4.10.1 using Qt 4.8.4

- What I was doing when the application crashed:

IMAP had for some reason gone into offline mode. The only way to prise it out was with akonadiconsole but that just seemed to cause this crash (in 4.10.1 where it's supposed to be fixed).

- Unusual behavior I noticed:

IMAP went offline and could not be persuaded to come online again from KMail.

-- Backtrace (Reduced):
#7  0x00007f55218dce51 in QObject::disconnect (sender=0x17bc7f0, signal=0x1d12a19 "stateChanged(KIMAP::Session::State,KIMAP::Session::State)", receiver=0x1910250, method=0x19b6cc9 "onSessionStateChanged(KIMAP::Session::State,KIMAP::Session::State)") at kernel/qobject.cpp:2887
#8  0x0000000000454c15 in SessionPool::killSession (this=this@entry=0x1910250, session=0x17bc7f0, termination=termination@entry=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:177
#9  0x0000000000454ff5 in SessionPool::disconnect (this=0x1910250, termination=SessionPool::LogoutSession) at ../../../resources/imap/sessionpool.cpp:117
#10 0x000000000041aec3 in ImapResource::doSetOnline (this=0x18f0300, online=<optimized out>) at ../../../resources/imap/imapresource.cpp:490
#11 0x00007f5521f23b59 in Akonadi::AgentBase::setOnlineInternal (this=this@entry=0x18f0300, state=state@entry=false) at ../../akonadi/agentbase.cpp:659
Comment 45 Sven Eden 2013-04-08 13:01:52 UTC
Unfortunately this "fix" in 4.10.1 means, that whenever the slightest problem on the net occurs, my IMAP accounts produce four notifications:

<Name>: Connection lost
KMail: Connection lost
<Name>: killed
<Name>: killed

Then I have to restart the whole of akonadi or I have to restart the agent in akonadi console multiple times until it gets back online. 

Happens whenever: Downloading one E-Mail.

Before 4.10.1 this did not happen.
Comment 46 David Faure 2013-05-27 12:21:51 UTC
That sounds like a crash, i.e. possibly another bug, better report it separately, and with a backtrace.