Application: akonadi_imap_resource (0.1) KDE Platform Version: 4.5.00 (KDE 4.5.0) Qt Version: 4.6.3 Operating System: Linux 2.6.35 x86_64 Distribution (Platform): Gentoo Packages -- Information about the crash: - What I was doing when the application crashed: * Selected a message in my inbox in KMail2 (4.5.0 SVN) * Pressed 'm' to open the 'Move to folder' dialog * Typed 'SPAM-L' to filter for the 'SPAM-Learn' folder * Selected the 'SPAM-Learn' folder * Confirmed the dialog Approximately 15 seconds later (working on a slow Internet connection), the KDE Crashhandler dialog appeared with the following backtrace. -- Backtrace: Application: Akonadi Resource (akonadi_imap_resource), signal: Segmentation fault [Current thread is 1 (Thread 0x7fc07afb2760 (LWP 897))] Thread 2 (Thread 0x7fc06686f710 (LWP 9032)): #0 0x00007fc07a4c0edb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4 #1 0x00007fc07a49a124 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4 #2 0x00007fc07a49a46f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4 #3 0x00007fc07a3bd5b7 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4 #4 0x00007fc0791b647d in KIMAP::SessionThread::run (this=0xc9a9b0) at /var/tmp/portage/kde-base/kdepimlibs-4.5.0/work/kdepimlibs-4.5.0/kimap/sessionthread.cpp:167 #5 0x00007fc07a3bf8b1 in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4 #6 0x00007fc0765034d7 in start_thread () from /lib/libpthread.so.0 #7 0x00007fc076c4128d in clone () from /lib/libc.so.6 Thread 1 (Thread 0x7fc07afb2760 (LWP 897)): [KCrash Handler] #6 0x00007fc0791bcbc6 in QByteArray (this=0x89c560, response=...) at /usr/include/qt4/QtCore/qbytearray.h:420 #7 KIMAP::Message::Part::toString (this=0x89c560, response=...) at /var/tmp/portage/kde-base/kdepimlibs-4.5.0/work/kdepimlibs-4.5.0/kimap/message_p.h:42 #8 KIMAP::CopyJob::handleResponse (this=0x89c560, response=...) at /var/tmp/portage/kde-base/kdepimlibs-4.5.0/work/kdepimlibs-4.5.0/kimap/copyjob.cpp:127 #9 0x00007fc0791b480c in KIMAP::SessionPrivate::responseReceived (this=0x1849010, response=...) at /var/tmp/portage/kde-base/kdepimlibs-4.5.0/work/kdepimlibs-4.5.0/kimap/session.cpp:253 #10 0x00007fc0791b5577 in KIMAP::Session::qt_metacall (this=0xc5acf0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x9e54c0) at /var/tmp/portage/kde-base/kdepimlibs-4.5.0/work/kdepimlibs-4.5.0_build/kimap/session.moc:106 #11 0x00007fc07a4a9c5e in QObject::event(QEvent*) () from /usr/lib64/qt4/libQtCore.so.4 #12 0x00007fc0798ca486 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4 #13 0x00007fc0798d0f44 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4 #14 0x00007fc077ad7374 in KApplication::notify (this=0x7fff6756a450, receiver=0xc5acf0, event=0x9ebba0) at /var/tmp/portage/kde-base/kdelibs-4.5.0/work/kdelibs-4.5.0/kdeui/kernel/kapplication.cpp:310 #15 0x00007fc07a49b464 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4 #16 0x00007fc07a49d8f0 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/qt4/libQtCore.so.4 #17 0x00007fc07a4c12c3 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/qt4/libQtCore.so.4 #18 0x00007fc0759bb43a in g_main_dispatch (context=0x6899f0) at gmain.c:1960 #19 IA__g_main_context_dispatch (context=0x6899f0) at gmain.c:2513 #20 0x00007fc0759bea61 in g_main_context_iterate (context=0x6899f0, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2591 #21 0x00007fc0759bec1e in IA__g_main_context_iteration (context=0x6899f0, may_block=1) at gmain.c:2654 #22 0x00007fc07a4c0ec4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4 #23 0x00007fc07996bb96 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtGui.so.4 #24 0x00007fc07a49a124 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4 #25 0x00007fc07a49a46f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4 #26 0x00007fc07a49db3e in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4 #27 0x00007fc07ab3a27c in Akonadi::ResourceBase::init (r=0x7da200) at /var/tmp/portage/kde-base/kdepimlibs-4.5.0/work/kdepimlibs-4.5.0/akonadi/resourcebase.cpp:245 #28 0x00000000004165bf in Akonadi::ResourceBase::init<ImapResource> (argc=<value optimized out>, argv=<value optimized out>) at /usr/include/akonadi/resourcebase.h:186 #29 main (argc=<value optimized out>, argv=<value optimized out>) at /var/tmp/portage/kde-base/kdepim-runtime-4.4.92/work/kdepim-runtime-4.4.92/resources/imap/imapresource.cpp:2068 Reported using DrKonqi
I can reproduce this bug. The only way to get rid of the crashes of the IMAP resource, is removing it completely from Akonadi and creating a new one again. It happens always after moving a message in KMail2.
Probably helpful information: The message is moved within folders of the same resource, not from the IMAP resource to another one.
Created attachment 55566 [details] New crash information added by DrKonqi akonadi_imap_resource (0.1) on KDE Platform 4.5.90 (4.6 RC1) using Qt 4.7.0 - What I was doing when the application crashed: Moving a message from the inbox to a subfolder of the same imap resource -- Backtrace (Reduced): #6 0x00007f6d5f1f0b16 in QByteArray (this=0x1bd8200, response=...) at /usr/include/qt4/QtCore/qbytearray.h:421 #7 toString (this=0x1bd8200, response=...) at ../../kimap/message_p.h:42 #8 KIMAP::CopyJob::handleResponse (this=0x1bd8200, response=...) at ../../kimap/copyjob.cpp:127 #9 0x00007f6d5f1e7255 in KIMAP::SessionPrivate::responseReceived (this=0x1abf150, response=...) at ../../kimap/session.cpp:263 #10 0x00007f6d5f1e7fe2 in KIMAP::Session::qt_metacall (this=0x1a8caf0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x1e57250) at ./session.moc:106
Created attachment 58354 [details] New crash information added by DrKonqi akonadi_imap_resource (0.1) on KDE Platform 4.6.1 (4.6.1) using Qt 4.7.0 - What I was doing when the application crashed: Deleting a message into the trash folder on my imap server -- Backtrace (Reduced): #6 0x00007f025d1c8b16 in QByteArray (this=0x2205980, response=...) at /usr/include/qt4/QtCore/qbytearray.h:421 #7 toString (this=0x2205980, response=...) at ../../kimap/message_p.h:42 #8 KIMAP::CopyJob::handleResponse (this=0x2205980, response=...) at ../../kimap/copyjob.cpp:127 #9 0x00007f025d1bf255 in KIMAP::SessionPrivate::responseReceived (this=0x206b370, response=...) at ../../kimap/session.cpp:263 #10 0x00007f025d1bffe2 in KIMAP::Session::qt_metacall (this=0x206b230, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7f02440c8b30) at ./session.moc:106
Valgrinding done by eliasp: ==17404== Invalid read of size 8 ==17404== at 0x68E4F26: KIMAP::CopyJob::handleResponse(KIMAP::Message const&) (qbytearray.h:421) ==17404== by 0x68DC4D7: KIMAP::SessionPrivate::responseReceived(KIMAP::Message const&) (session.cpp:271) ==17404== by 0x68DD260: KIMAP::Session::qt_metacall(QMetaObject::Call, int, void**) (session.moc:113) ==17404== by 0x5623D19: QObject::event(QEvent*) (qobject.cpp:1211) ==17404== by 0x5B04744: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4445) ==17404== by 0x5B092E1: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4324) ==17404== by 0x809721B: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311) ==17404== by 0x56139FD: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:732) ==17404== by 0x56165C3: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.h:215) ==17404== by 0x563BE3D: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (qcoreapplication.h:220) ==17404== by 0xA150CD9: g_main_context_dispatch (gmain.c:2149) ==17404== by 0xA1543A0: g_main_context_iterate (gmain.c:2780) ==17404== Address 0x17c00220 is 8 bytes after a block of size 40 alloc'd ==17404== at 0x4C2622A: malloc (vg_replace_malloc.c:236) ==17404== by 0x55518E8: QListData::detach_grow(int*, int) (qlist.cpp:85) ==17404== by 0x68E0508: QList<KIMAP::Message::Part>::append(KIMAP::Message::Part const&) (qlist.h:664) ==17404== by 0x68DEF1D: KIMAP::SessionThread::readMessage() (qlist.h:321) ==17404== by 0x68DF519: KIMAP::SessionThread::qt_metacall(QMetaObject::Call, int, void**) (sessionthread_p.moc:99) ==17404== by 0x5623D19: QObject::event(QEvent*) (qobject.cpp:1211) ==17404== by 0x5B04744: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4445) ==17404== by 0x5B092E1: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4324) ==17404== by 0x809721B: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311) ==17404== by 0x56139FD: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:732) ==17404== by 0x56165C3: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (qcoreapplication.h:215) ==17404== by 0x563BE3D: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (qcoreapplication.h:220)
sergio provided this patch on #akonadi: diff --git a/kimap/copyjob.cpp b/kimap/copyjob.cpp index f13ce74..de41458 100644 --- a/kimap/copyjob.cpp +++ b/kimap/copyjob.cpp @@ -123,7 +123,7 @@ void CopyJob::handleResponse( const Message &response ) it != response.responseCode.end(); ++it ) { if ( it->toString()=="COPYUID" ) { it = it + 3; - if ( it != response.responseCode.end() ) { + if ( it < response.responseCode.end() ) { d->resultingUids = ImapSet::fromImapSequenceSet( it->toString() ); } break; This patch fixes the issue for me - please review and commit it.
Git commit 4ece14886807bc61a78f82b2919d7d8857e61e53 by Sergio Martins. Committed on 08/04/2011 at 01:57. Pushed by smartins into branch 'master'. Don't segfault. No unittest because i can't reproduce the crash with my imap server, but kevin acked the patch. BUG: 247456 M +1 -1 kimap/copyjob.cpp http://commits.kde.org/kdepimlibs/4ece14886807bc61a78f82b2919d7d8857e61e53
Git commit 078ad4b1980c2ff72816600ee3defff8f3b88de6 by Sergio Martins. Committed on 08/04/2011 at 01:57. Pushed by smartins into branch '4.6'. Don't segfault. No unittest because i can't reproduce the crash with my imap server, but kevin acked the patch. BUG: 247456 (cherry picked from commit 4ece14886807bc61a78f82b2919d7d8857e61e53) M +1 -1 kimap/copyjob.cpp http://commits.kde.org/kdepimlibs/078ad4b1980c2ff72816600ee3defff8f3b88de6