Bug 291902

Summary: Kmail crashed adding new IMAP accont.
Product: [Frameworks and Libraries] Akonadi Reporter: Chris <crglasoe>
Component: IMAP resourceAssignee: Kevin Ottens <ervin>
Status: RESOLVED FIXED    
Severity: crash CC: kdepim-bugs, vkrause
Priority: NOR    
Version: 4.7   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.1

Description Chris 2012-01-18 21:35:43 UTC
Application: akonadi_imap_resource (4.7)
KDE Platform Version: 4.7.4 (4.7.4)
Qt Version: 4.7.4
Operating System: Linux 3.1.0-1.2-desktop x86_64
Distribution: "openSUSE 12.1 (x86_64)"

-- Information about the crash:
have been encountering problems with existing IMAP account.  Set up new account using different name.

The crash can be reproduced every time.

-- Backtrace:
Application: DoxaFin-CRG of type IMAP E-Mail Server (akonadi_imap_resource), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f2e53bd4760 (LWP 11874))]

Thread 3 (Thread 0x7f2e42ec2700 (LWP 11877)):
#0  0x00007f2e4ef5d014 in pthread_mutex_lock () from /lib64/libpthread.so.0
#1  0x00007f2e4dfee98d in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f2e4dfef92d in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f2e4dfeff59 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f2e53098586 in QEventDispatcherGlib::processEvents (this=0x7f2e3c0008c0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007f2e5306ca32 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f2e5306cc2f in QEventLoop::exec (this=0x7f2e42ec1e00, flags=...) at kernel/qeventloop.cpp:201
#7  0x00007f2e52f845df in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#8  0x00007f2e51cf0b93 in KIMAP::SessionThread::run (this=0x85f1b0) at /usr/src/debug/kdepimlibs-4.7.4/kimap/sessionthread.cpp:169
#9  0x00007f2e52f87025 in QThreadPrivate::start (arg=0x85f1b0) at thread/qthread_unix.cpp:331
#10 0x00007f2e4ef5af05 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f2e4f6a563d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f2e41a9a700 (LWP 11910)):
#0  0x00007f2e4ef5e11f in __pthread_mutex_unlock_usercnt () from /lib64/libpthread.so.0
#1  0x00007f2e4dfeeb14 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f2e4dfef92d in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f2e4dfeff59 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f2e53098586 in QEventDispatcherGlib::processEvents (this=0x7f2e380008c0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007f2e5306ca32 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f2e5306cc2f in QEventLoop::exec (this=0x7f2e41a99e00, flags=...) at kernel/qeventloop.cpp:201
#7  0x00007f2e52f845df in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#8  0x00007f2e51cf0b93 in KIMAP::SessionThread::run (this=0x716a10) at /usr/src/debug/kdepimlibs-4.7.4/kimap/sessionthread.cpp:169
#9  0x00007f2e52f87025 in QThreadPrivate::start (arg=0x716a10) at thread/qthread_unix.cpp:331
#10 0x00007f2e4ef5af05 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f2e4f6a563d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f2e53bd4760 (LWP 11874)):
[KCrash Handler]
#6  KMime::Content::hasContent (this=0x0) at /usr/src/debug/kdepimlibs-4.7.4/kmime/kmime_content.cpp:101
#7  0x00007f2e41aa50c7 in Akonadi::SerializerPluginMail::parts (this=<optimized out>, item=...) at /usr/src/debug/kdepim-runtime-4.7.4/plugins/akonadi_serializer_mail.cpp:196
#8  0x00007f2e53725709 in Akonadi::ItemSerializer::parts (item=...) at /usr/src/debug/kdepimlibs-4.7.4/akonadi/itemserializer.cpp:160
#9  0x00007f2e53725769 in Akonadi::Item::loadedPayloadParts (this=<optimized out>) at /usr/src/debug/kdepimlibs-4.7.4/akonadi/item.cpp:195
#10 0x00007f2e53726ad5 in Akonadi::ItemCreateJob::ItemCreateJob (this=0x9f6430, item=..., collection=..., parent=0x9fe5c0) at /usr/src/debug/kdepimlibs-4.7.4/akonadi/itemcreatejob.cpp:59
#11 0x00007f2e53726c46 in Akonadi::ItemSync::Private::createLocalItem (this=0x8f5510, item=...) at /usr/src/debug/kdepimlibs-4.7.4/akonadi/itemsync.cpp:114
#12 0x00007f2e53726d05 in Akonadi::ItemSync::Private::processItems (this=0x8f5510) at /usr/src/debug/kdepimlibs-4.7.4/akonadi/itemsync.cpp:335
#13 0x00007f2e5372706a in Akonadi::ItemSync::Private::execute (this=0x8f5510) at /usr/src/debug/kdepimlibs-4.7.4/akonadi/itemsync.cpp:291
#14 0x00007f2e5372836c in Akonadi::ItemSync::setFullSyncItems (this=0x83ff40, items=<optimized out>) at /usr/src/debug/kdepimlibs-4.7.4/akonadi/itemsync.cpp:153
#15 0x00007f2e53728487 in Akonadi::ResourceBase::itemsRetrieved (this=<optimized out>, items=...) at /usr/src/debug/kdepimlibs-4.7.4/akonadi/resourcebase.cpp:871
#16 0x00000000004536a2 in RetrieveItemsTask::onHeadersReceived (this=0x7f0560, mailBox=<optimized out>, uids=..., sizes=..., flags=..., messages=...) at /usr/src/debug/kdepim-runtime-4.7.4/resources/imap/retrieveitemstask.cpp:361
#17 0x0000000000453ef0 in RetrieveItemsTask::qt_metacall (this=0x7f0560, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fffee57b880) at /usr/src/debug/kdepim-runtime-4.7.4/build/resources/imap/retrieveitemstask.moc:90
#18 0x00007f2e530805aa in QMetaObject::activate (sender=0x806230, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffee57b880) at kernel/qobject.cpp:3287
#19 0x00007f2e51cf25f4 in KIMAP::FetchJob::headersReceived (this=<optimized out>, _t1=<optimized out>, _t2=<optimized out>, _t3=<optimized out>, _t4=<optimized out>, _t5=<optimized out>) at /usr/src/debug/kdepimlibs-4.7.4/build/kimap/fetchjob.moc:101
#20 0x00007f2e51d15648 in KIMAP::FetchJobPrivate::emitPendings (this=0x99ee40) at /usr/src/debug/kdepimlibs-4.7.4/kimap/fetchjob.cpp:57
#21 0x00007f2e51d02c4f in KIMAP::FetchJob::qt_metacall (this=0x806230, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fffee57b9a0) at /usr/src/debug/kdepimlibs-4.7.4/build/kimap/fetchjob.moc:89
#22 0x00007f2e530805aa in QMetaObject::activate (sender=0x99ee90, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3287
#23 0x00007f2e53083e89 in QObject::event (this=0x99ee90, e=<optimized out>) at kernel/qobject.cpp:1190
#24 0x00007f2e5243cc34 in notify_helper (e=0x7fffee57c0a0, receiver=0x99ee90, this=0x6aa580) at kernel/qapplication.cpp:4481
#25 QApplicationPrivate::notify_helper (this=0x6aa580, receiver=0x99ee90, e=0x7fffee57c0a0) at kernel/qapplication.cpp:4453
#26 0x00007f2e52441ac1 in QApplication::notify (this=0x7fffee57c420, receiver=0x99ee90, e=0x7fffee57c0a0) at kernel/qapplication.cpp:4360
#27 0x00007f2e5059b186 in KApplication::notify (this=0x7fffee57c420, receiver=0x99ee90, event=0x7fffee57c0a0) at /usr/src/debug/kdelibs-4.7.4/kdeui/kernel/kapplication.cpp:311
#28 0x00007f2e5306d82c in QCoreApplication::notifyInternal (this=0x7fffee57c420, receiver=0x99ee90, event=0x7fffee57c0a0) at kernel/qcoreapplication.cpp:787
#29 0x00007f2e5309a3a8 in sendEvent (event=0x7fffee57c0a0, receiver=<optimized out>) at kernel/qcoreapplication.h:215
#30 QTimerInfoList::activateTimers (this=0x6adad0) at kernel/qeventdispatcher_unix.cpp:618
#31 0x00007f2e53097bb8 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#32 idleTimerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:231
#33 0x00007f2e4dfef58d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#34 0x00007f2e4dfefd88 in ?? () from /usr/lib64/libglib-2.0.so.0
#35 0x00007f2e4dfeff59 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#36 0x00007f2e5309851f in QEventDispatcherGlib::processEvents (this=0x686560, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#37 0x00007f2e524dff9e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#38 0x00007f2e5306ca32 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#39 0x00007f2e5306cc2f in QEventLoop::exec (this=0x7fffee57c3a0, flags=...) at kernel/qeventloop.cpp:201
#40 0x00007f2e53070df7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#41 0x00007f2e536a3e27 in Akonadi::ResourceBase::init (r=0x795f40) at /usr/src/debug/kdepimlibs-4.7.4/akonadi/resourcebase.cpp:393
#42 0x000000000041bc46 in Akonadi::ResourceBase::init<ImapResource> (argc=<optimized out>, argv=<optimized out>) at /usr/include/akonadi/resourcebase.h:188
#43 0x00007f2e4f5ed23d in __libc_start_main () from /lib64/libc.so.6
#44 0x0000000000416725 in _start () at ../sysdeps/x86_64/elf/start.S:113

Possible duplicates by query: bug 275275.

Reported using DrKonqi
Comment 1 Allen Winter 2012-01-18 22:24:18 UTC
Git commit b1b244400f67688ffd265c8f95e5aed4d124e86e by Allen Winter.
Committed on 18/01/2012 at 23:22.
Pushed by winterz into branch 'master'.

in parts(), add a crash guard against an empty KMime::Message payload
MERGE: 4.8
FIXED-IN: 4.8.1

M  +14   -6    plugins/akonadi_serializer_mail.cpp

http://commits.kde.org/kdepim-runtime/b1b244400f67688ffd265c8f95e5aed4d124e86e
Comment 2 Allen Winter 2012-01-18 22:24:56 UTC
Git commit a6412022df5d22fb0964fa770ae6d3f59bd4f2a2 by Allen Winter.
Committed on 18/01/2012 at 23:22.
Pushed by winterz into branch 'KDE/4.8'.

in parts(), add a crash guard against an empty KMime::Message payload
MERGE: 4.8
FIXED-IN: 4.8.1
(cherry picked from commit b1b244400f67688ffd265c8f95e5aed4d124e86e)

M  +14   -6    plugins/akonadi_serializer_mail.cpp

http://commits.kde.org/kdepim-runtime/a6412022df5d22fb0964fa770ae6d3f59bd4f2a2