Bug 343651 - kmail crashed after trying to acquire mailbox lock
Summary: kmail crashed after trying to acquire mailbox lock
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 4.14.3
Platform: Gentoo Packages Linux
: NOR grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-02-01 11:49 UTC by Kai Krakow
Modified: 2018-09-25 21:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Krakow 2015-02-01 11:49:39 UTC
Application: kontact (4.14.3)
KDE Platform Version: 4.14.3
Qt Version: 4.8.5
Operating System: Linux 3.18.5-gentoo x86_64
Distribution: "Gentoo Base System release 2.2"

-- Information about the crash:
- What I was doing when the application crashed:

When I try to start Kontact / KMail, it crashes with the message that it couldn't acquire a lock on my mail folders. A similar message appears when I login to my session. The mail delivery agent shows the same message in systray.

I'm running on Gentoo and my last action was to remove nepomuk and soprano (and the rest of the team) from KDE as it was suggested that everything is to be replaced by baloo anyway. I ran the migrator back in 4.13, now I'm using 4.14 for a while and decided to remove those components the Gentoo way (by removing the useflags, running depclean, with stopping nepomuk before and clearing the nepomuk directory afterwards).

-- Backtrace:
Application: Kontact (kontact), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f9c1416e7c0 (LWP 2294))]

Thread 3 (Thread 0x7f9c100a3700 (LWP 2295)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00000037dfb26a7a in WTF::TCMalloc_PageHeap::scavengerThread() () from /usr/lib64/qt4/libQtWebKit.so.4
#2  0x00000037dfb26ab9 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /usr/lib64/qt4/libQtWebKit.so.4
#3  0x000000399be080b3 in start_thread (arg=0x7f9c100a3700) at pthread_create.c:309
#4  0x000000399b6e8d2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f9c0f78a700 (LWP 2296)):
#0  0x00000031c0a46039 in g_source_iter_next (iter=iter@entry=0x7f9c0f789c70, source=source@entry=0x7f9c0f789c68) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:913
#1  0x00000031c0a4820b in g_main_context_prepare (context=context@entry=0x7f9c080009a0, priority=priority@entry=0x7f9c0f789ce8) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3330
#2  0x00000031c0a48ae3 in g_main_context_iterate (context=context@entry=0x7f9c080009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3714
#3  0x00000031c0a48ccc in g_main_context_iteration (context=0x7f9c080009a0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3795
#4  0x00000031c17aac8e in QEventDispatcherGlib::processEvents (this=0x7f9c080008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:452
#5  0x00000031c177c2df in QEventLoop::processEvents (this=this@entry=0x7f9c0f789e20, flags=...) at kernel/qeventloop.cpp:149
#6  0x00000031c177c5d5 in QEventLoop::exec (this=this@entry=0x7f9c0f789e20, flags=...) at kernel/qeventloop.cpp:204
#7  0x00000031c1678b2f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:536
#8  0x00000031c167b26f in QThreadPrivate::start (arg=0x2241400) at thread/qthread_unix.cpp:338
#9  0x000000399be080b3 in start_thread (arg=0x7f9c0f78a700) at pthread_create.c:309
#10 0x000000399b6e8d2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f9c1416e7c0 (LWP 2294)):
[KCrash Handler]
#6  0x000000399b635307 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x000000399b636648 in __GI_abort () at abort.c:89
#8  0x00000031c1670b24 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=<optimized out>) at global/qglobal.cpp:2323
#9  0x00000031c1670ca9 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=0x3e25319af8 "Fatal Error: Accessed global static '%s *%s()' after destruction. Defined at %s:%d", ap=ap@entry=0x7fff64d85f48) at global/qglobal.cpp:2369
#10 0x00000031c167152c in qFatal (msg=<optimized out>) at global/qglobal.cpp:2552
#11 0x0000003e25268657 in operator-> (this=<optimized out>) at /var/tmp/portage/kde-base/kmail-4.14.3/work/kmail-4.14.3/mailcommon/kernel/mailkernel.cpp:57
#12 MailCommon::Kernel::self () at /var/tmp/portage/kde-base/kmail-4.14.3/work/kmail-4.14.3/mailcommon/kernel/mailkernel.cpp:73
#13 0x0000003e252af6c0 in MailCommon::FolderCollection::writeConfig (this=this@entry=0x3f029e0) at /var/tmp/portage/kde-base/kmail-4.14.3/work/kmail-4.14.3/mailcommon/folder/foldercollection.cpp:218
#14 0x0000003e252aff12 in MailCommon::FolderCollection::~FolderCollection (this=0x3f029e0, __in_chrg=<optimized out>) at /var/tmp/portage/kde-base/kmail-4.14.3/work/kmail-4.14.3/mailcommon/folder/foldercollection.cpp:84
#15 0x0000003e252aff99 in MailCommon::FolderCollection::~FolderCollection (this=0x3f029e0, __in_chrg=<optimized out>) at /var/tmp/portage/kde-base/kmail-4.14.3/work/kmail-4.14.3/mailcommon/folder/foldercollection.cpp:86
#16 0x0000003e252ae7a4 in deref (value=0x3f029e0, d=0x3ef2850) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:342
#17 deref (this=<optimized out>) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:336
#18 ~ExternalRefCount (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:401
#19 ~QSharedPointer (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:466
#20 QMap<long long, QSharedPointer<MailCommon::FolderCollection> >::freeData (x=0x3cb3640, this=<optimized out>) at /usr/include/qt4/QtCore/qmap.h:652
#21 0x000000399b637d29 in __run_exit_handlers (status=1, listp=0x399b9a25a8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#22 0x000000399b637d75 in __GI_exit (status=<optimized out>) at exit.c:104
#23 0x0000003e25268d47 in MailCommon::Kernel::emergencyExit (this=this@entry=0x2770360, reason=...) at /var/tmp/portage/kde-base/kmail-4.14.3/work/kmail-4.14.3/mailcommon/kernel/mailkernel.cpp:230
#24 0x0000003e25269347 in MailCommon::Kernel::createDefaultCollectionDone (this=0x2770360, job=0x27acd20) at /var/tmp/portage/kde-base/kmail-4.14.3/work/kmail-4.14.3/mailcommon/kernel/mailkernel.cpp:182
#25 0x00000031c179178a in QMetaObject::activate (sender=sender@entry=0x27acd20, m=m@entry=0x7f9c159175c0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff64d86530) at kernel/qobject.cpp:3547
#26 0x00007f9c155885e2 in KJob::result (this=this@entry=0x27acd20, _t1=_t1@entry=0x27acd20) at /var/tmp/portage/kde-base/kdelibs-4.14.3-r1/work/kdelibs-4.14.3_build/kdecore/kjob.moc:207
#27 0x00007f9c15588620 in KJob::emitResult (this=0x27acd20) at /var/tmp/portage/kde-base/kdelibs-4.14.3-r1/work/kdelibs-4.14.3/kdecore/jobs/kjob.cpp:318
#28 0x00000037e07c20f9 in Akonadi::SpecialCollectionsRequestJobPrivate::lockResult (this=0x276e9b0, job=0x39c14b0) at /var/tmp/portage/kde-base/kdepimlibs-4.14.3/work/kdepimlibs-4.14.3/akonadi/specialcollectionsrequestjob.cpp:121
#29 0x00000031c179178a in QMetaObject::activate (sender=sender@entry=0x39c14b0, m=m@entry=0x7f9c159175c0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff64d86700) at kernel/qobject.cpp:3547
#30 0x00007f9c155885e2 in KJob::result (this=this@entry=0x39c14b0, _t1=_t1@entry=0x39c14b0) at /var/tmp/portage/kde-base/kdelibs-4.14.3-r1/work/kdelibs-4.14.3_build/kdecore/kjob.moc:207
#31 0x00007f9c15588620 in KJob::emitResult (this=0x39c14b0) at /var/tmp/portage/kde-base/kdelibs-4.14.3-r1/work/kdelibs-4.14.3/kdecore/jobs/kjob.cpp:318
#32 0x00000037e07bb653 in Akonadi::GetLockJob::Private::timeout (this=0x3c35c60) at /var/tmp/portage/kde-base/kdepimlibs-4.14.3/work/kdepimlibs-4.14.3/akonadi/specialcollectionshelperjobs.cpp:618
#33 0x00000031c179178a in QMetaObject::activate (sender=0x381bbf0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3547
#34 0x00000031c1795a21 in QObject::event (this=0x381bbf0, e=<optimized out>) at kernel/qobject.cpp:1156
#35 0x00000036039df32c in QApplicationPrivate::notify_helper (this=this@entry=0x208f820, receiver=receiver@entry=0x381bbf0, e=e@entry=0x7fff64d86ec0) at kernel/qapplication.cpp:4562
#36 0x00000036039e1cb2 in QApplication::notify (this=this@entry=0x7fff64d87230, receiver=receiver@entry=0x381bbf0, e=e@entry=0x7fff64d86ec0) at kernel/qapplication.cpp:4423
#37 0x00007f9c15b6940a in KApplication::notify (this=0x7fff64d87230, receiver=0x381bbf0, event=0x7fff64d86ec0) at /var/tmp/portage/kde-base/kdelibs-4.14.3-r1/work/kdelibs-4.14.3/kdeui/kernel/kapplication.cpp:311
#38 0x00000031c177d6ad in QCoreApplication::notifyInternal (this=0x7fff64d87230, receiver=0x381bbf0, event=0x7fff64d86ec0) at kernel/qcoreapplication.cpp:949
#39 0x00000031c17ad843 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#40 QTimerInfoList::activateTimers (this=0x208fc80) at kernel/qeventdispatcher_unix.cpp:621
#41 0x00000031c17aaae9 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:193
#42 idleTimerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:240
#43 0x00000031c0a489e4 in g_main_dispatch (context=0x208fb60) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3064
#44 g_main_context_dispatch (context=context@entry=0x208fb60) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3663
#45 0x00000031c0a48c28 in g_main_context_iterate (context=context@entry=0x208fb60, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3734
#46 0x00000031c0a48ccc in g_main_context_iteration (context=0x208fb60, may_block=1) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3795
#47 0x00000031c17aac6e in QEventDispatcherGlib::processEvents (this=0x204ebc0, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#48 0x0000003603a7fefe in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#49 0x00000031c177c2df in QEventLoop::processEvents (this=this@entry=0x7fff64d87130, flags=...) at kernel/qeventloop.cpp:149
#50 0x00000031c177c5d5 in QEventLoop::exec (this=this@entry=0x7fff64d87130, flags=...) at kernel/qeventloop.cpp:204
#51 0x00000031c1781899 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#52 0x00000036039ddc7c in QApplication::exec () at kernel/qapplication.cpp:3823
#53 0x00000000004035f2 in main (argc=1, argv=0x7fff64d87378) at /var/tmp/portage/kde-base/kontact-4.14.3/work/kontact-4.14.3/kontact/src/main.cpp:219

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

Possible duplicates by query: bug 335225, bug 335224, bug 330850.

An https://bugs.kde.org/ berichten

Reproducible: Always

Steps to Reproduce:
1. Run without soprano / virtuoso / nepomuk installed
2. Run KMail or Kontact
3. Try to view an email

Actual Results:  
Kontact crashed with a message being not able to acquire a lock.

Expected Results:  
Email should be shown.

After login, the kde mail delivery agent shows the same message.
Comment 1 Martin Steigerwald 2015-04-12 10:57:09 UTC
Thank you for your detailed bug report, Kai. Can you enable full debug with kdebugdialog and then start Kontact / KMail from command line and include relevant output? Thank you, Martin
Comment 2 Martin Steigerwald 2015-04-12 11:49:42 UTC
Setting to waiting for information after I received bugzilla rights to do that.
Comment 3 Kai Krakow 2015-04-16 08:41:04 UTC
Apparently the problem currently does no longer occur. I removed some superfluous akonadi resources, probably left-overs from earlier migrations in previous KDE versions, some were simply empty and non-function, others threw erratic errors about missing or duplicate resources. I'm not sure, but that may have fixed the issue. I wonder why and when those resources have been created or obsoleted by akonadi - I never created those. Akonadi's naming scheme is also not very helpful to find out about this.

Currently I'm having a new problem instead: I can no longer suspend schedules from my calendars. I get notified over and over again every few seconds to minutes (very spammy), even for events years back. I had to completely disable the calendar notifier for that reason. At least this doesn't seem to affect kmail/kontact's functionality. Maybe it's related, I'm not sure (could be a result of a locking problem, too, I think).

I'll get back to this when I start using kontact again: with its current behavior, kontact is quite useless for me and I've resorted back to using web mail and web calendar and/or Android for my resources (GMail, IMAP-Exchange).
Comment 4 Andrew Crouthamel 2018-09-25 21:48:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!