Bug 375104

Summary: Crash during shutdown: ASSERT: "mDev" in datastream_p_p.h:89
Product: [Frameworks and Libraries] Akonadi Reporter: Denis Kurz <kdenis>
Component: serverAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: dvratil
Priority: NOR    
Version: 5.4.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Denis Kurz 2017-01-15 18:36:13 UTC
I created a new search folder in KMail for all mails in a folder (without subfolders) where the subject contains a certain string. The search gives the correct results, but when I open the search folder afterwards (or any other folder for that matter) and click on a message, it indefinitely says "Retrieving folder contents" in the message viewer widget. "akonadictl stop" then leads to a crash if akonadiserver.

Steps to reproduce:
0. Make sure to restart both KMail and Akonadi
1. Open "Tools -> Find messages", any search criteria, click "Search"; make sure the search folder you choose does not already exist
2. Click "Open search folder" in the search dialog; alternatively, close the search dialog and navigate to the new search folder manually
3. Click any message in the message list widget
4. Stop Akonadi using "akonadictl stop" or "akonadictl restart"

Actual result:
After 3., "Fetching folder contents"
After 4., Akonadi crashes

Expected result:
After 3., message is displayed in the message viewer
After 4., Akonadi stops without crashing

Reproducible:
* always, if I did nothing else before the steps described above (which is the reason for Step 0)
* sometimes, otherwise

This results in a crash no matter the build type (Debug or Release). In Debug mode, I found this line in bash, after all the "Application ... exitted normally" lines:

"ASSERT: "mDev" in file /home/denis/kde/src/akonadi/src/private/datastream_p_p.h, line 89"

The backtrace of the crash according to DrKonqi for the Debug build (Release build doesn't yield any information at all):

Application: akonadiserver (akonadiserver), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f3cc0b237c0 (LWP 30172))]

Thread 15 (Thread 0x7f3cc080b700 (LWP 30175)):
#0  0x00000037010de4ed in poll () from /lib64/libc.so.6
#1  0x0000003703449fec in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x000000370344a0fc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x0000003ce9299e4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x0000003ce924d48a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x0000003ce90a5194 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#6  0x0000003ceac15445 in QDBusConnectionManager::run() () from /usr/lib64/libQt5DBus.so.5
#7  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#8  0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#9  0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 14 (Thread 0x7f3cbb021700 (LWP 30205)):
#0  0x000000370348dd59 in g_mutex_lock () from /usr/lib64/libglib-2.0.so.0
#1  0x00000037034499fc in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#2  0x0000003703449f90 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#3  0x000000370344a0fc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x0000003ce9299e4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x0000003ce924d48a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#6  0x0000003ce90a5194 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#7  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#8  0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#9  0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 13 (Thread 0x7f3cba820700 (LWP 30206)):
#0  0x0000003700c12823 in __tls_get_addr () from /lib64/ld-linux-x86-64.so.2
#1  0x0000003ce90a86b6 in QThreadData::current(bool) () from /usr/lib64/libQt5Core.so.5
#2  0x0000003ce9299cfa in postEventSourcePrepare(_GSource*, int*) () from /usr/lib64/libQt5Core.so.5
#3  0x000000370344952d in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#4  0x0000003703449f18 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#5  0x000000370344a0fc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#6  0x0000003ce9299e4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#7  0x0000003ce924d48a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#8  0x0000003ce90a5194 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#9  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#10 0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#11 0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 12 (Thread 0x7f3cba01f700 (LWP 30207)):
#0  0x00000037010da4cd in read () from /lib64/libc.so.6
#1  0x000000370348c8f0 in g_wakeup_acknowledge () from /usr/lib64/libglib-2.0.so.0
#2  0x0000003703449a9c in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#3  0x0000003703449f90 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#4  0x000000370344a0fc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x0000003ce9299e4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#6  0x0000003ce924d48a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#7  0x0000003ce90a5194 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#8  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#9  0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#10 0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 11 (Thread 0x7f3cb981e700 (LWP 30208)):
#0  0x0000003ce9298757 in QTimerInfoList::timerWait(timespec&) () from /usr/lib64/libQt5Core.so.5
#1  0x0000003ce9299aec in timerSourcePrepareHelper(GTimerSource*, int*) () from /usr/lib64/libQt5Core.so.5
#2  0x0000003ce9299bc5 in timerSourcePrepare(_GSource*, int*) () from /usr/lib64/libQt5Core.so.5
#3  0x000000370344952d in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#4  0x0000003703449f18 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#5  0x000000370344a0fc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#6  0x0000003ce9299e4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#7  0x0000003ce924d48a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#8  0x0000003ce90a5194 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#9  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#10 0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#11 0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7f3cb901d700 (LWP 30209)):
#0  0x0000003703449f9e in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#1  0x000000370344a0fc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#2  0x0000003ce9299e4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#3  0x0000003ce924d48a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x0000003ce90a5194 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#5  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#6  0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#7  0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7f3cb881c700 (LWP 30210)):
#0  0x000000370180d02f in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x0000003ce90a9d9a in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQt5Core.so.5
#2  0x000000000044fb23 in Akonadi::Server::SearchTaskManager::searchLoop (this=0x10704c0) at /home/denis/kde/src/akonadi/src/server/search/searchtaskmanager.cpp:222
#3  0x0000000000458c2e in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Akonadi::Server::SearchTaskManager::*)()>::call(void (Akonadi::Server::SearchTaskManager::*)(), Akonadi::Server::SearchTaskManager*, void**) (f=(void (Akonadi::Server::SearchTaskManager::*)(Akonadi::Server::SearchTaskManager * const)) 0x44f9f0 <Akonadi::Server::SearchTaskManager::searchLoop()>, o=0x10704c0, arg=0x7f3cb881ba40) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:141
#4  0x0000000000458b27 in QtPrivate::FunctionPointer<void (Akonadi::Server::SearchTaskManager::*)()>::call<QtPrivate::List<>, void>(void (Akonadi::Server::SearchTaskManager::*)(), Akonadi::Server::SearchTaskManager*, void**) (f=(void (Akonadi::Server::SearchTaskManager::*)(Akonadi::Server::SearchTaskManager * const)) 0x44f9f0 <Akonadi::Server::SearchTaskManager::searchLoop()>, o=0x10704c0, arg=0x7f3cb881ba40) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:160
#5  0x00000000004582e3 in QtPrivate::QSlotObject<void (Akonadi::Server::SearchTaskManager::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x1080330, r=0x10704c0, a=0x7f3cb881ba40, ret=0x0) at /usr/include/qt5/QtCore/qobject_impl.h:120
#6  0x0000003ce92817f6 in QSingleShotTimer::timerEvent(QTimerEvent*) () from /usr/lib64/libQt5Core.so.5
#7  0x0000003ce9275d5b in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#8  0x0000003ce924e635 in doNotify(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#9  0x0000003ce924e75a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#10 0x0000003ce92994ce in QTimerInfoList::activateTimers() () from /usr/lib64/libQt5Core.so.5
#11 0x0000003ce92999a1 in timerSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5
#12 0x0000003703449d6d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#13 0x000000370344a050 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#14 0x000000370344a0fc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#15 0x0000003ce9299e37 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#16 0x0000003ce924d48a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#17 0x0000003ce90a5194 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#18 0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#19 0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#20 0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f3cb3fff700 (LWP 30212)):
#0  0x000000370344952d in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#1  0x0000003703449f18 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x000000370344a0fc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x0000003ce9299e4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x0000003ce924d48a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x0000003ce90a5194 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#6  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#7  0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#8  0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f3c95b2c700 (LWP 30249)):
#0  0x000000370180d3d8 in pthread_cond_timedwait () from /lib64/libpthread.so.0
#1  0x0000003ce90a9d78 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQt5Core.so.5
#2  0x0000003ce90a5fd0 in QThreadPoolThread::run() () from /usr/lib64/libQt5Core.so.5
#3  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#4  0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#5  0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f3c3e7fc700 (LWP 30335)):
#0  0x000000370180d3d8 in pthread_cond_timedwait () from /lib64/libpthread.so.0
#1  0x0000003ce90a9d78 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQt5Core.so.5
#2  0x0000003ce90a5fd0 in QThreadPoolThread::run() () from /usr/lib64/libQt5Core.so.5
#3  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#4  0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#5  0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f3c3dffb700 (LWP 30336)):
#0  0x000000370180d3d8 in pthread_cond_timedwait () from /lib64/libpthread.so.0
#1  0x0000003ce90a9d78 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQt5Core.so.5
#2  0x0000003ce90a5fd0 in QThreadPoolThread::run() () from /usr/lib64/libQt5Core.so.5
#3  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#4  0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#5  0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f3c3d7fa700 (LWP 30337)):
#0  0x000000370180d3d8 in pthread_cond_timedwait () from /lib64/libpthread.so.0
#1  0x0000003ce90a9d78 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQt5Core.so.5
#2  0x0000003ce90a5fd0 in QThreadPoolThread::run() () from /usr/lib64/libQt5Core.so.5
#3  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#4  0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#5  0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f3c3cff9700 (LWP 30338)):
#0  0x000000370180d3d8 in pthread_cond_timedwait () from /lib64/libpthread.so.0
#1  0x0000003ce90a9d78 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQt5Core.so.5
#2  0x0000003ce90a5fd0 in QThreadPoolThread::run() () from /usr/lib64/libQt5Core.so.5
#3  0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#4  0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#5  0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f3c1dffb700 (LWP 30416)):
[KCrash Handler]
#6  0x0000003701033107 in raise () from /lib64/libc.so.6
#7  0x000000370103455a in abort () from /lib64/libc.so.6
#8  0x00000000005c7d9d in akMessageHandler (type=QtFatalMsg, context=..., msg=...) at /home/denis/kde/src/akonadi/src/shared/akdebug.cpp:167
#9  0x0000003ce9090a9d in qt_message_print(QtMsgType, QMessageLogContext const&, QString const&) () from /usr/lib64/libQt5Core.so.5
#10 0x0000003ce9090bf4 in qt_message(QtMsgType, QMessageLogContext const&, char const*, __va_list_tag*) () from /usr/lib64/libQt5Core.so.5
#11 0x0000003ce9092511 in QMessageLogger::fatal(char const*, ...) const () from /usr/lib64/libQt5Core.so.5
#12 0x0000003ce908d9fe in qt_assert(char const*, char const*, int) () from /usr/lib64/libQt5Core.so.5
#13 0x00007f3cc110cd34 in Akonadi::Protocol::DataStream::operator<< <unsigned char> (this=0x7f3c1dff9df0, val=151 '\227') at /home/denis/kde/src/akonadi/src/private/datastream_p_p.h:89
#14 0x00007f3cc10f57a5 in Akonadi::Protocol::CommandPrivate::serialize (this=0x7f3c0c0d59c0, stream=...) at /home/denis/kde/src/akonadi/src/private/protocol.cpp:264
#15 0x00007f3cc10f5a51 in Akonadi::Protocol::ResponsePrivate::serialize (this=0x7f3c0c0d59c0, stream=...) at /home/denis/kde/src/akonadi/src/private/protocol.cpp:415
#16 0x00007f3cc10fa611 in Akonadi::Protocol::FetchItemsResponsePrivate::serialize (this=0x7f3c0c0d59c0, stream=...) at /home/denis/kde/src/akonadi/src/private/protocol.cpp:3129
#17 0x00007f3cc10e2ce6 in Akonadi::Protocol::operator<< (stream=..., command=...) at /home/denis/kde/src/akonadi/src/private/protocol.cpp:379
#18 0x00007f3cc10e3227 in Akonadi::Protocol::serialize (device=0x0, command=...) at /home/denis/kde/src/akonadi/src/private/protocol.cpp:608
#19 0x0000000000435f75 in Akonadi::Server::Connection::sendResponse (this=0x10cd280, tag=16, response=...) at /home/denis/kde/src/akonadi/src/server/connection.cpp:403
#20 0x000000000043607e in Akonadi::Server::Connection::sendResponse (this=0x10cd280, response=...) at /home/denis/kde/src/akonadi/src/server/connection.cpp:409
#21 0x0000000000582254 in Akonadi::Server::FetchHelper::fetchItems (this=0x7f3c1dffa5b0) at /home/denis/kde/src/akonadi/src/server/handler/fetchhelper.cpp:604
#22 0x000000000057d30e in Akonadi::Server::Fetch::parseStream (this=0x7f3c0c0b7c40) at /home/denis/kde/src/akonadi/src/server/handler/fetch.cpp:46
#23 0x00000000004347fb in Akonadi::Server::Connection::slotNewData (this=0x10cd280) at /home/denis/kde/src/akonadi/src/server/connection.cpp:246
#24 0x0000000000439030 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Akonadi::Server::Connection::*)()>::call(void (Akonadi::Server::Connection::*)(), Akonadi::Server::Connection*, void**) (f=(void (Akonadi::Server::Connection::*)(Akonadi::Server::Connection * const)) 0x43414a <Akonadi::Server::Connection::slotNewData()>, o=0x10cd280, arg=0x7f3c1dffa950) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:141
#25 0x0000000000438364 in QtPrivate::FunctionPointer<void (Akonadi::Server::Connection::*)()>::call<QtPrivate::List<>, void>(void (Akonadi::Server::Connection::*)(), Akonadi::Server::Connection*, void**) (f=(void (Akonadi::Server::Connection::*)(Akonadi::Server::Connection * const)) 0x43414a <Akonadi::Server::Connection::slotNewData()>, o=0x10cd280, arg=0x7f3c1dffa950) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:160
#26 0x0000000000437c5d in QtPrivate::QSlotObject<void (Akonadi::Server::Connection::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x7f3c0c002e10, r=0x10cd280, a=0x7f3c1dffa950, ret=0x0) at /usr/include/qt5/QtCore/qobject_impl.h:120
#27 0x0000003ce9274e3a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#28 0x0000003ce92747af in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#29 0x0000003ce96d5745 in QAbstractSocketPrivate::emitReadyRead() () from /usr/lib64/libQt5Network.so.5
#30 0x0000003ce96d57f7 in QAbstractSocketPrivate::canReadNotification() () from /usr/lib64/libQt5Network.so.5
#31 0x0000003ce96e0971 in QReadNotifier::event(QEvent*) () from /usr/lib64/libQt5Network.so.5
#32 0x0000003ce924e635 in doNotify(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#33 0x0000003ce924e75a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#34 0x0000003ce929a7df in socketNotifierSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5
#35 0x0000003703449d6d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#36 0x000000370344a050 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#37 0x000000370344a0fc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#38 0x0000003ce9299e4c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#39 0x0000003ce924d48a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#40 0x0000003ce90a5194 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#41 0x0000003ce90a972c in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#42 0x0000003701807444 in start_thread () from /lib64/libpthread.so.0
#43 0x00000037010e75ed in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f3cc0b237c0 (LWP 30172)):
#0  0x000000370180d3d8 in pthread_cond_timedwait () from /lib64/libpthread.so.0
#1  0x0000003ce90a9d78 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQt5Core.so.5
#2  0x0000003ce90a9356 in QThread::wait(unsigned long) () from /usr/lib64/libQt5Core.so.5
#3  0x0000000000568fdb in Akonadi::Server::AkThread::quitThread (this=0x10cd280) at /home/denis/kde/src/akonadi/src/server/akthread.cpp:61
#4  0x0000000000433eb6 in Akonadi::Server::Connection::~Connection (this=0x10cd280, __in_chrg=<optimized out>) at /home/denis/kde/src/akonadi/src/server/connection.cpp:148
#5  0x0000000000433f80 in Akonadi::Server::Connection::~Connection (this=0x10cd280, __in_chrg=<optimized out>) at /home/denis/kde/src/akonadi/src/server/connection.cpp:153
#6  0x000000000043017e in qDeleteAll<QTypedArrayData<Akonadi::Server::Connection*>::const_iterator> (begin=..., end=...) at /usr/include/qt5/QtCore/qalgorithms.h:323
#7  0x000000000042f099 in qDeleteAll<QVector<Akonadi::Server::Connection*> > (c=...) at /usr/include/qt5/QtCore/qalgorithms.h:331
#8  0x000000000042c23e in Akonadi::Server::AkonadiServer::quit (this=0x101dc40) at /home/denis/kde/src/akonadi/src/server/akonadi.cpp:303
#9  0x000000000055adb1 in ServerAdaptor::quit (this=0x1088b50) at /home/denis/kde/build/akonadi/src/server/serveradaptor.cpp:39
#10 0x000000000055ae35 in ServerAdaptor::qt_static_metacall (_o=0x1088b50, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff09356aa0) at /home/denis/kde/build/akonadi/src/server/serveradaptor.moc:86
#11 0x000000000055af84 in ServerAdaptor::qt_metacall (this=0x1088b50, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff09356aa0) at /home/denis/kde/build/akonadi/src/server/serveradaptor.moc:120
#12 0x0000003ceac224e3 in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) () from /usr/lib64/libQt5DBus.so.5
#13 0x0000003ceac26d26 in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) () from /usr/lib64/libQt5DBus.so.5
#14 0x0000003ceac275da in QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) () from /usr/lib64/libQt5DBus.so.5
#15 0x0000003ceac29fee in QDBusActivateObjectEvent::placeMetaCall(QObject*) () from /usr/lib64/libQt5DBus.so.5
#16 0x0000003ce9275d9a in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#17 0x0000003ce924e635 in doNotify(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#18 0x0000003ce924e75a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#19 0x0000003ce9250b33 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#20 0x0000003ce9299dc3 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5
#21 0x0000003703449d6d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#22 0x000000370344a050 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#23 0x000000370344a0fc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#24 0x0000003ce9299e37 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#25 0x0000003ce924d48a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#26 0x0000003ce9254fcc in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#27 0x00000000005c7763 in AkApplicationBase::exec (this=0x7fff09357210) at /home/denis/kde/src/akonadi/src/shared/akapplication.cpp:123
#28 0x00000000004295b2 in main (argc=1, argv=0x7fff09357378) at /home/denis/kde/src/akonadi/src/server/main.cpp:67
Comment 1 Denis Kurz 2017-01-15 18:38:06 UTC
If this is important: After restarting Akonadi, the new search folder is still there, and I'm able to view the messages it contains.
Comment 2 Daniel Vrátil 2017-02-23 19:02:50 UTC

*** This bug has been marked as a duplicate of bug 374734 ***