Bug 346142

Summary: Kmail crash when accessing an email in an IMAP folder
Product: [Applications] kmail2 Reporter: Robert Fries <robert_fries>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: crash Keywords: drkonqi
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Robert Fries 2015-04-13 16:25:12 UTC
Application: kmail (4.14.6)
KDE Platform Version: 4.14.6
Qt Version: 4.8.6
Operating System: Linux 3.19.3-200.fc21.x86_64 x86_64
Distribution: "Fedora release 21 (Twenty One)"

-- Information about the crash:
- What I was doing when the application crashed:
Clicked on an email in an Imap inbox.  The email I clicked on was shows as the parent of another more recent email.  
- Unusual behavior I noticed:
I tried to restart kmail after the crash and it immediately crashed with a message to the effect that it could not access the collection.  I then ran "akonadict restart" after which I was able to restart kmail and access the email that caused the problem before.

The crash can be reproduced sometimes.

-- Backtrace:
Application: KMail (kmail), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
81	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7f4855b51900 (LWP 25931))]

Thread 5 (Thread 0x7f47e2461700 (LWP 25934)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f4847d30093 in JSC::BlockAllocator::blockFreeingThreadMain (this=0x1186458) at /usr/src/debug/webkit-qtwebkit-23/Source/JavaScriptCore/heap/BlockAllocator.cpp:128
#2  0x00007f4848035636 in WTF::wtfThreadEntryPoint (param=0xbf9e60) at /usr/src/debug/webkit-qtwebkit-23/Source/WTF/wtf/ThreadingPthreads.cpp:196
#3  0x00007f4850ee552a in start_thread (arg=0x7f47e2461700) at pthread_create.c:310
#4  0x00007f484f4ad22d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f47e154d700 (LWP 25937)):
#0  0x00007f484f4a1c8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f484164bb34 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f484164bc4c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f48512af4be in QEventDispatcherGlib::processEvents (this=0x7f47d40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:452
#4  0x00007f485127ecc1 in QEventLoop::processEvents (this=this@entry=0x7f47e154ccd0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f485127f025 in QEventLoop::exec (this=this@entry=0x7f47e154ccd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f4851173b49 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:538
#7  0x00007f48511763af in QThreadPrivate::start (arg=0xf96c70) at thread/qthread_unix.cpp:349
#8  0x00007f4850ee552a in start_thread (arg=0x7f47e154d700) at pthread_create.c:310
#9  0x00007f484f4ad22d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f47d88eb700 (LWP 26630)):
#0  0x00007f484f4a1c8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f484164bb34 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007f484164bc4c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f48512af4be in QEventDispatcherGlib::processEvents (this=0x7f47cc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:452
#4  0x00007f485127ecc1 in QEventLoop::processEvents (this=this@entry=0x7f47d88eac80, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f485127f025 in QEventLoop::exec (this=this@entry=0x7f47d88eac80, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f4851173b49 in QThread::exec (this=this@entry=0x30c7ed0) at thread/qthread.cpp:538
#7  0x00007f485125f623 in QInotifyFileSystemWatcherEngine::run (this=0x30c7ed0) at io/qfilesystemwatcher_inotify.cpp:265
#8  0x00007f48511763af in QThreadPrivate::start (arg=0x30c7ed0) at thread/qthread_unix.cpp:349
#9  0x00007f4850ee552a in start_thread (arg=0x7f47d88eb700) at pthread_create.c:310
#10 0x00007f484f4ad22d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f47d961a700 (LWP 27011)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f48541be49a in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f48544c3f80 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00007f48541be4c9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x00007f4850ee552a in start_thread (arg=0x7f47d961a700) at pthread_create.c:310
#4  0x00007f484f4ad22d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f4855b51900 (LWP 25931)):
[KCrash Handler]
#6  0x00007f484f3e18d7 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#7  0x00007f484f3e353a in __GI_abort () at abort.c:89
#8  0x00007f485116b9b4 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=<optimized out>) at global/qglobal.cpp:2359
#9  0x00007f485116bb49 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x7f485570a670 "Fatal Error: Accessed global static '%s *%s()' after destruction. Defined at %s:%d", ap=ap@entry=0x7fff2bea9890) at global/qglobal.cpp:2405
#10 0x00007f485116c431 in qFatal (msg=msg@entry=0x7f485570a670 "Fatal Error: Accessed global static '%s *%s()' after destruction. Defined at %s:%d") at global/qglobal.cpp:2588
#11 0x00007f485566e08f in operator-> (this=<synthetic pointer>) at /usr/src/debug/kdelibs-4.14.6/kdeui/widgets/kmainwindow.cpp:214
#12 operator* (this=<synthetic pointer>) at /usr/src/debug/kdelibs-4.14.6/kdeui/widgets/kmainwindow.cpp:214
#13 KMainWindow::memberList () at /usr/src/debug/kdelibs-4.14.6/kdeui/widgets/kmainwindow.cpp:1218
#14 0x00007f4854880c78 in KMKernel::dumpDeadLetters (this=<optimized out>) at /usr/src/debug/kdepim-4.14.6/kmail/kmkernel.cpp:1323
#15 0x00007f4854882a87 in kmCrashHandler (sigId=<optimized out>) at /usr/src/debug/kdepim-4.14.6/kmail/kmkernel.cpp:1181
#16 0x00007f4855611270 in KCrash::defaultCrashHandler (sig=6) at /usr/src/debug/kdelibs-4.14.6/kdeui/util/kcrash.cpp:307
#17 <signal handler called>
#18 0x00007f484f3e18d7 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#19 0x00007f484f3e353a in __GI_abort () at abort.c:89
#20 0x00007f485116b9b4 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=<optimized out>) at global/qglobal.cpp:2359
#21 0x00007f485116bb49 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x7f484b3e12e8 "Fatal Error: Accessed global static '%s *%s()' after destruction. Defined at %s:%d", ap=ap@entry=0x7fff2beaa430) at global/qglobal.cpp:2405
#22 0x00007f485116c431 in qFatal (msg=msg@entry=0x7f484b3e12e8 "Fatal Error: Accessed global static '%s *%s()' after destruction. Defined at %s:%d") at global/qglobal.cpp:2588
#23 0x00007f484b324fef in operator-> (this=<optimized out>) at /usr/src/debug/kdepim-4.14.6/mailcommon/kernel/mailkernel.cpp:58
#24 MailCommon::Kernel::self () at /usr/src/debug/kdepim-4.14.6/mailcommon/kernel/mailkernel.cpp:75
#25 0x00007f484b36f883 in MailCommon::FolderCollection::writeConfig (this=this@entry=0x14ad300) at /usr/src/debug/kdepim-4.14.6/mailcommon/folder/foldercollection.cpp:218
#26 0x00007f484b3700a2 in MailCommon::FolderCollection::~FolderCollection (this=0x14ad300, __in_chrg=<optimized out>) at /usr/src/debug/kdepim-4.14.6/mailcommon/folder/foldercollection.cpp:84
#27 0x00007f484b3701af in ~FolderCollection (this=0x14ad300, __in_chrg=<optimized out>) at /usr/src/debug/kdepim-4.14.6/mailcommon/folder/foldercollection.cpp:86
#28 deref (value=0x14ad300, d=0x14b5180) at /usr/include/QtCore/qsharedpointer_impl.h:342
#29 deref (this=<optimized out>) at /usr/include/QtCore/qsharedpointer_impl.h:336
#30 ~ExternalRefCount (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/QtCore/qsharedpointer_impl.h:401
#31 ~QSharedPointer (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/QtCore/qsharedpointer_impl.h:466
#32 QMap<long long, QSharedPointer<MailCommon::FolderCollection> >::freeData (x=0x14b65d0, this=<optimized out>) at /usr/include/QtCore/qmap.h:652
#33 0x00007f484f3e66ea in __cxa_finalize (d=0x7f484b62d780) at cxa_finalize.c:56
#34 0x00007f484b322a93 in __do_global_dtors_aux () from /lib64/libmailcommon.so.4
#35 0x00007fff2beab150 in ?? ()
#36 0x00007f4855a034e7 in _dl_fini () at dl-fini.c:252
Backtrace stopped: frame did not save the PC

The reporter indicates this bug may be a duplicate of or related to bug 337536.

Possible duplicates by query: bug 345399, bug 343954, bug 337536, bug 335778, bug 335225.

Reported using DrKonqi
Comment 1 Denis Kurz 2017-06-23 20:04:47 UTC
This bug has never been confirmed for a KDE PIM version that is based on KDE Frameworks (5.x). Those versions differ significantly from the old 4.x series. Therefore, I plan to close it in around two or three months. In the meantime, it is set to WAITINGFORINFO to give reporters the oportunity to check if it is still valid. As soon as someone confirms it for a recent version (at least 5.1, ideally even more recent), I'll gladly reopen it.

Please understand that we lack the manpower to triage bugs reported for versions almost two years beyond their end of life.
Comment 2 Denis Kurz 2018-01-31 16:53:18 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.1 aka 15.12, preferably more recent), please open a new one unless it already exists. Thank you for all your input.