Bug 279130

Summary: KMail crashes when moving messages between folders
Product: [Frameworks and Libraries] Akonadi Reporter: Ben Cooksley <bcooksley>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: crash CC: florian-evers, Hrdlickovi
Priority: NOR    
Version: 4.8   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ben Cooksley 2011-08-02 07:22:42 UTC
Application: kmail (4.8 pre)
KDE Platform Version: 4.7.40 (4.7.40 (KDE 4.8 >= 20110623) (Compiled from sources)
Qt Version: 4.7.4
Operating System: Linux 2.6.34.7-0.7-desktop i686
Distribution: "openSUSE 11.3 (i586)"

-- Information about the crash:
- What I was doing when the application crashed:
Whilst moving approximately 50 messages from one folder to another in a seperate resource/collection, the following crash occurs.  The move is from the default "Local folders" resource - maildir based, to a specially created mbox resource.

The crash can be reproduced every time.

-- Backtrace:
Application: KMail (kmail), signal: Segmentation fault
[Current thread is 1 (Thread 0xb1d5f710 (LWP 30776))]

Thread 5 (Thread 0xb014fb70 (LWP 30785)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb5013125 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb3911142 in WTF::TCMalloc_PageHeap::scavengerThread() () from /opt/trunk-kde/qt/lib/libQtWebKit.so.4
#3  0xb391084d in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /opt/trunk-kde/qt/lib/libQtWebKit.so.4
#4  0xb500eb25 in start_thread () from /lib/libpthread.so.0
#5  0xb4e3846e in clone () from /lib/libc.so.6

Thread 4 (Thread 0xaf82eb70 (LWP 30786)):
#0  0xb280822b in clock_gettime () from /lib/librt.so.1
#1  0xb51255df in do_gettime (sec=0xaf82dff8, frac=0xaf82dff0) at /home/ben/kdesvn/qt-copy/src/corelib/tools/qelapsedtimer_unix.cpp:123
#2  0xb5125662 in qt_gettime () at /home/ben/kdesvn/qt-copy/src/corelib/tools/qelapsedtimer_unix.cpp:140
#3  0xb5204693 in QTimerInfoList::updateCurrentTime (this=0x830fe0c) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventdispatcher_unix.cpp:339
#4  0xb52049f9 in QTimerInfoList::timerWait (this=0x830fe0c, tm=...) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventdispatcher_unix.cpp:442
#5  0xb5201ab5 in timerSourcePrepareHelper (src=0x830fdd8, timeout=0xaf82e13c) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:136
#6  0xb5201cd0 in idleTimerSourcePrepare (source=0x830fe40, timeout=0xaf82e13c) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:214
#7  0xb29d70c0 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#8  0xb29d7f22 in ?? () from /usr/lib/libglib-2.0.so.0
#9  0xb29d860e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#10 0xb5202600 in QEventDispatcherGlib::processEvents (this=0x82dd380, flags=...) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:424
#11 0xb51cbb1d in QEventLoop::processEvents (this=0xaf82e2c8, flags=...) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventloop.cpp:149
#12 0xb51cbc61 in QEventLoop::exec (this=0xaf82e2c8, flags=...) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventloop.cpp:201
#13 0xb50c16e7 in QThread::exec (this=0x8147250) at /home/ben/kdesvn/qt-copy/src/corelib/thread/qthread.cpp:498
#14 0xb50c1867 in QThread::run (this=0x8147250) at /home/ben/kdesvn/qt-copy/src/corelib/thread/qthread.cpp:565
#15 0xb50c3e30 in QThreadPrivate::start (arg=0x8147250) at /home/ben/kdesvn/qt-copy/src/corelib/thread/qthread_unix.cpp:331
#16 0xb500eb25 in start_thread () from /lib/libpthread.so.0
#17 0xb4e3846e in clone () from /lib/libc.so.6

Thread 3 (Thread 0xaeabfb70 (LWP 30883)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb5013452 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb50c516f in QWaitConditionPrivate::wait (this=0x837fb58, time=30000) at /home/ben/kdesvn/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:86
#3  0xb50c4f8d in QWaitCondition::wait (this=0x837fabc, mutex=0x837fab8, time=30000) at /home/ben/kdesvn/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:160
#4  0xb50b471e in QThreadPoolThread::run (this=0x8386f70) at /home/ben/kdesvn/qt-copy/src/corelib/concurrent/qthreadpool.cpp:140
#5  0xb50c3e30 in QThreadPrivate::start (arg=0x8386f70) at /home/ben/kdesvn/qt-copy/src/corelib/thread/qthread_unix.cpp:331
#6  0xb500eb25 in start_thread () from /lib/libpthread.so.0
#7  0xb4e3846e in clone () from /lib/libc.so.6

Thread 2 (Thread 0xae20eb70 (LWP 30886)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb5013452 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb50c516f in QWaitConditionPrivate::wait (this=0x84b8f28, time=30000) at /home/ben/kdesvn/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:86
#3  0xb50c4f8d in QWaitCondition::wait (this=0x84bf9fc, mutex=0x84bf9f8, time=30000) at /home/ben/kdesvn/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:160
#4  0xb50b471e in QThreadPoolThread::run (this=0x84f4a18) at /home/ben/kdesvn/qt-copy/src/corelib/concurrent/qthreadpool.cpp:140
#5  0xb50c3e30 in QThreadPrivate::start (arg=0x84f4a18) at /home/ben/kdesvn/qt-copy/src/corelib/thread/qthread_unix.cpp:331
#6  0xb500eb25 in start_thread () from /lib/libpthread.so.0
#7  0xb4e3846e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb1d5f710 (LWP 30776)):
[KCrash Handler]
#7  ref (one=..., other=<value optimized out>) at /opt/trunk-kde/qt/include/QtCore/qatomic_i386.h:120
#8  QSharedDataPointer (one=..., other=<value optimized out>) at /opt/trunk-kde/qt/include/QtCore/qshareddata.h:93
#9  assignEntityPrivate (one=..., other=<value optimized out>) at /home/ben/kdesvn/kdepimlibs/akonadi/entity.cpp:49
#10 0xb65c5e4a in Akonadi::Entity::Entity (this=0x860d0a0, other=@0x8545830) at /home/ben/kdesvn/kdepimlibs/akonadi/entity.cpp:56
#11 0xb666dcb4 in Akonadi::Item::Item (this=0x860d0a0, other=@0x8545830) at /home/ben/kdesvn/kdepimlibs/akonadi/item.cpp:127
#12 0xb65c9ca3 in node_copy (this=0xbfb801e8, alloc=3) at /opt/trunk-kde/qt/include/QtCore/qlist.h:386
#13 QList<Akonadi::Item>::detach_helper (this=0xbfb801e8, alloc=3) at /opt/trunk-kde/qt/include/QtCore/qlist.h:698
#14 0xb65c9d7a in QList<Akonadi::Item>::detach_helper (this=0xbfb801e8) at /opt/trunk-kde/qt/include/QtCore/qlist.h:712
#15 0xb6678bcf in detach (_objects=..., command=...) at /opt/trunk-kde/qt/include/QtCore/qlist.h:126
#16 end (_objects=..., command=...) at /opt/trunk-kde/qt/include/QtCore/qlist.h:257
#17 Akonadi::ProtocolHelper::entitySetToByteArray<Akonadi::Item> (_objects=..., command=...) at /home/ben/kdesvn/kdepimlibs/akonadi/protocolhelper_p.h:130
#18 0xb667a2d2 in Akonadi::ItemFetchJobPrivate::startFetchJob (this=0x856ffc0) at /home/ben/kdesvn/kdepimlibs/akonadi/itemfetchjob.cpp:98
#19 0xb667a4d3 in Akonadi::ItemFetchJob::doStart (this=0x853df38) at /home/ben/kdesvn/kdepimlibs/akonadi/itemfetchjob.cpp:166
#20 0xb668bf92 in Akonadi::JobPrivate::startQueued (this=0x856ffc0) at /home/ben/kdesvn/kdepimlibs/akonadi/job.cpp:153
#21 0xb66c0db3 in Akonadi::SessionPrivate::startJob (this=0x81cbe70, job=0x853df38) at /home/ben/kdesvn/kdepimlibs/akonadi/session.cpp:267
#22 0xb66c421b in Akonadi::SessionPrivate::doStartNext (this=0x81cbe70) at /home/ben/kdesvn/kdepimlibs/akonadi/session.cpp:256
#23 0xb66c42d6 in Akonadi::Session::qt_metacall (this=0x8084708, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x855d728) at /home/ben/kdesvn/build/kdepimlibs/akonadi/session.moc:97
#24 0xb51d54d2 in QMetaObject::metacall (object=0x8084708, cl=QMetaObject::InvokeMetaMethod, idx=10, argv=0x855d728) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qmetaobject.cpp:237
#25 0xb51e3715 in QMetaCallEvent::placeMetaCall (this=0x8616eb0, object=0x8084708) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:535
#26 0xb51e47eb in QObject::event (this=0x8084708, e=0x8616eb0) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qobject.cpp:1217
#27 0xb5725c8a in QApplicationPrivate::notify_helper (this=0x808a3d8, receiver=0x8084708, e=0x8616eb0) at /home/ben/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:4481
#28 0xb5723586 in QApplication::notify (this=0xbfb80dfc, receiver=0x8084708, e=0x8616eb0) at /home/ben/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:3881
#29 0xb76c578a in KApplication::notify (this=0xbfb80dfc, receiver=0x8084708, event=0x8616eb0) at /home/ben/kdesvn/kdelibs/kdeui/kernel/kapplication.cpp:311
#30 0xb51cddbf in QCoreApplication::notifyInternal (this=0xbfb80dfc, receiver=0x8084708, event=0x8616eb0) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:787
#31 0xb57178b5 in QCoreApplication::sendEvent (receiver=0x8084708, event=0x8616eb0) at ../../include/QtCore/../../../../qt-copy/src/corelib/kernel/qcoreapplication.h:215
#32 0xb51cee58 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8055dc8) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:1428
#33 0xb51ceb15 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:1321
#34 0xb57e3d88 in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../../../qt-copy/src/corelib/kernel/qcoreapplication.h:220
#35 0xb5201e1a in postEventSourceDispatch (s=0x808bfa0) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:277
#36 0xb29d7b49 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#37 0xb29d8350 in ?? () from /usr/lib/libglib-2.0.so.0
#38 0xb29d860e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#39 0xb52025e0 in QEventDispatcherGlib::processEvents (this=0x8083118, flags=...) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:422
#40 0xb57eef40 in QGuiEventDispatcherGlib::processEvents (this=0x8083118, flags=...) at /home/ben/kdesvn/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#41 0xb51cbb1d in QEventLoop::processEvents (this=0xbfb80d1c, flags=...) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventloop.cpp:149
#42 0xb51cbc61 in QEventLoop::exec (this=0xbfb80d1c, flags=...) at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qeventloop.cpp:201
#43 0xb51ce4aa in QCoreApplication::exec () at /home/ben/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:1064
#44 0xb57231b8 in QApplication::exec () at /home/ben/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:3755
#45 0x0804aa17 in main (argc=-1249627980, argv=0xb5843162) at /home/ben/kdesvn/kdepim/kmail/main.cpp:145

Possible duplicates by query: bug 278645, bug 277797, bug 275933, bug 275893, bug 272440.

Reported using DrKonqi
Comment 1 Florian Evers 2011-08-02 15:53:06 UTC
I have the same problem here on multiple boxes (Gentoo Linux, x86 and amd64). Moving messages between folders crashes kmail. This happens with mbox-to-mbox moves as well as when moving from mbox to kolab.
Comment 2 Tarpast 2012-04-06 13:17:15 UTC
I confirm this bug. Kmail crash after moving messages form one folder to another. Once it si OK, but twice it crash.
OpenSuse 11.4, x86, KDE 4.8.2
Comment 3 Denis Kurz 2016-09-24 20:37:29 UTC
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?

If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 4 Denis Kurz 2017-01-07 22:23:02 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.