Bug 492788 - Akonadi crashes during indexing new messages
Summary: Akonadi crashes during indexing new messages
Status: REPORTED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2024-09-08 07:48 UTC by stakanov.s
Modified: 2024-10-02 12:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/65066/events/8cf0d702e564439d8b2a54f58d49edb3/


Attachments
New crash information added by DrKonqi (141.14 KB, text/plain)
2024-09-08 07:49 UTC, stakanov.s
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stakanov.s 2024-09-08 07:48:59 UTC
Application: akonadiserver (6.2.0 (24.08.0))

Qt Version: 6.7.2
Frameworks Version: 6.5.0
Operating System: Linux 6.10.7-1-default x86_64
Windowing System: X11
Distribution: openSUSE Tumbleweed
DrKonqi: 6.1.4 [CoredumpBackend]

-- Information about the crash:
Akonadi crashes and restarts by itself. The bug is somewhat annoying because the crashes are extremely frequent. There are no apparent duplications or any dataloss but sometimes akonadi does not manage to start so user may not be aware that an idling system is without notification of new mail.
Frequency of this crash is two to 4 times a day, especially shortly after the system startup in the morning. Having reached this frequency the problem seems to stop. Possibly involved could be the automatic archiving process that is expected to run in this time frame. Eventually one time a day the archiving process does manage to archive, so I do not know if it restarts or if it runs problem free. In all cases you can observe a relationship with the indexing process of the database.

The reporter is unsure if this crash is reproducible.

-- Backtrace (Reduced):
#7  (anonymous namespace)::Cache::query (queryStatement=..., this=0x7f1ba8002170) at /usr/src/debug/akonadi-24.08.0/src/server/storage/querycache.cpp:50
#8  Akonadi::Server::QueryCache::query (queryStatement=...) at /usr/src/debug/akonadi-24.08.0/src/server/storage/querycache.cpp:97
#9  Akonadi::Server::QueryBuilder::exec (this=0x7f1c015fe930) at /usr/src/debug/akonadi-24.08.0/src/server/storage/querybuilder.cpp:515
#10 0x0000557e92e55a4e in Akonadi::Server::ItemFetchHelper::buildFlagQuery (this=this@entry=0x7f1c015ff3d0, itemQuery=...) at /usr/src/debug/akonadi-24.08.0/src/server/handler/itemfetchhelper.cpp:213
#11 0x0000557e92e5a733 in Akonadi::Server::ItemFetchHelper::fetchItems(std::function<void (Akonadi::Protocol::FetchItemsResponse&&)>&&) (this=this@entry=0x7f1c015ff3d0, itemCallback=...) at /usr/src/debug/akonadi-24.08.0/src/server/handler/itemfetchhelper.cpp:417


Reported using DrKonqi
Comment 1 stakanov.s 2024-09-08 07:49:00 UTC
Created attachment 173431 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 TraceyC 2024-09-12 14:57:17 UTC
Searchable backtrace


Thread 1 (Thread 0x7f1c016006c0 (LWP 4667)):
[KCrash Handler]
#4  0x00007f1c30cd247e in std::__detail::_List_node_base::_M_unhook() () from /lib64/libstdc++.so.6
#5  0x0000557e92ef7a14 in std::__cxx11::list<(anonymous namespace)::Cache::Node, std::allocator<(anonymous namespace)::Cache::Node> >::_M_erase (__position=..., this=0x7f1ba8002170) at /usr/include/c++/13/bits/stl_list.h:2016
#6  std::__cxx11::list<(anonymous namespace)::Cache::Node, std::allocator<(anonymous namespace)::Cache::Node> >::erase (__position=..., this=0x7f1ba8002170) at /usr/include/c++/13/bits/list.tcc:158
#7  (anonymous namespace)::Cache::query (queryStatement=..., this=0x7f1ba8002170) at /usr/src/debug/akonadi-24.08.0/src/server/storage/querycache.cpp:50
#8  Akonadi::Server::QueryCache::query (queryStatement=...) at /usr/src/debug/akonadi-24.08.0/src/server/storage/querycache.cpp:97
#9  Akonadi::Server::QueryBuilder::exec (this=0x7f1c015fe930) at /usr/src/debug/akonadi-24.08.0/src/server/storage/querybuilder.cpp:515
#10 0x0000557e92e55a4e in Akonadi::Server::ItemFetchHelper::buildFlagQuery (this=this@entry=0x7f1c015ff3d0, itemQuery=...) at /usr/src/debug/akonadi-24.08.0/src/server/handler/itemfetchhelper.cpp:213
#11 0x0000557e92e5a733 in Akonadi::Server::ItemFetchHelper::fetchItems(std::function<void (Akonadi::Protocol::FetchItemsResponse&&)>&&) (this=this@entry=0x7f1c015ff3d0, itemCallback=...) at /usr/src/debug/akonadi-24.08.0/src/server/handler/itemfetchhelper.cpp:417
#12 0x0000557e92e5b746 in Akonadi::Server::ItemFetchHandler::parseStream (this=0x7f1ba80e8950) at /usr/src/debug/akonadi-24.08.0/src/server/handler/itemfetchhandler.cpp:38
#13 0x0000557e92e2c2ca in Akonadi::Server::Connection::parseStream (this=this@entry=0x557ebacf49f0, cmd=...) at /usr/include/c++/13/bits/unique_ptr.h:199
#14 0x0000557e92e30260 in operator() (__closure=0x7f1c015ff6b0) at /usr/src/debug/akonadi-24.08.0/src/server/storage/dbdeadlockcatcher.h:32
#15 Akonadi::Server::DbDeadlockCatcher::callFunc<Akonadi::Server::Connection::handleIncomingData()::<lambda()>&> (this=<synthetic pointer>, recursionCounter=0, func=...) at /usr/src/debug/akonadi-24.08.0/src/server/storage/dbdeadlockcatcher.h:35
#16 Akonadi::Server::DbDeadlockCatcher::DbDeadlockCatcher<Akonadi::Server::Connection::handleIncomingData()::<lambda()> > (func=..., this=<synthetic pointer>) at /usr/src/debug/akonadi-24.08.0/src/server/storage/dbdeadlockcatcher.h:26
#17 Akonadi::Server::Connection::handleIncomingData (this=0x557ebacf49f0) at /usr/src/debug/akonadi-24.08.0/src/server/connection.cpp:254
#18 0x00007f1c311d1e1b in QObject::event (this=0x557ebacf49f0, e=0x7f1ba8002c50) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:1452
#19 0x00007f1c3118ec0f in doNotify (event=<optimized out>, receiver=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1243
#20 QCoreApplication::notify (event=<optimized out>, receiver=<optimized out>, this=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1226
#21 QCoreApplication::notifyInternal2 (receiver=0x557ebacf49f0, event=0x7f1ba8002c50) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1142
#22 0x00007f1c3118ec69 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1583
#23 0x00007f1c3118ef90 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x557ebacf4e00) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1940
#24 0x00007f1c313c2fe3 in postEventSourceDispatch (s=0x7f1ba8000f20) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#25 0x00007f1c30710fb8 in ?? () from /lib64/libglib-2.0.so.0
#26 0x00007f1c30712d38 in ?? () from /lib64/libglib-2.0.so.0
#27 0x00007f1c307133ec in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#28 0x00007f1c313c1adc in QEventDispatcherGlib::processEvents (this=0x7f1ba8000b70, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#29 0x00007f1c311993db in QEventLoop::exec (this=0x7f1c015ffae0, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/global/qflags.h:34
#30 0x00007f1c31274a64 in QThread::exec (this=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/global/qflags.h:74
#31 0x00007f1c312ed139 in operator() (__closure=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/thread/qthread_unix.cpp:326
#32 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=...) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/thread/qthread_unix.cpp:262
#33 QThreadPrivate::start (arg=0x557ebacf4c80) at /usr/src/debug/qtbase-everywhere-src-6.7.2/src/corelib/thread/qthread_unix.cpp:285
#34 0x00007f1c30892e22 in start_thread () from /lib64/libc.so.6
#35 0x00007f1c3091433c in __clone3 () from /lib64/libc.so.6
Comment 3 Lívio Cipriano 2024-10-02 12:45:33 UTC
Comment on attachment 173431 [details]
New crash information added by DrKonqi

I've the same bug, but I already arrived to the conclusion that akonadi crashes not due to messages but it can't handle the email folder structure. In may case KMail hides folders that are present in the file system.

In my case, I reproduce the bug the following way. 1) Copy a KMail Maildirs Folder Structure in your file system with copy or other command line to a new location. 2) Import that new structure into your running KMail . In my case I had a structure with 109 MailDir folders at the same level an akonadi started crashing and restarting during the import, given messages that could not confirm the existence of the destination folder of the imported message(s). 3) Copy ALL the file messages of the Folder Structure to a single MailDir. 4) Import that single MailDir to your running Kmail. In My case I tried with 30.000 email messages, no error.