https://bugs.kde.org/show_bug.cgi?id=506582
Bug ID: 506582 Summary: akonadiserver crashed in Akonadi::Server::QueryBuilder::exec Classification: Frameworks and Libraries Product: Akonadi Version First 6.4.2 Reported In: Platform: Fedora RPMs OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: server Assignee: kdepim-b...@kde.org Reporter: matt.fagn...@bell.net CC: c...@carlschwan.eu Target Milestone: --- Created attachment 182944 --> https://bugs.kde.org/attachment.cgi?id=182944&action=edit akonadiserver crash full trace SUMMARY I booted the Fedora Rawhide KDE live image Fedora-KDE-Desktop-Live-Rawhide-20250704.n.0.x86_64.iso on bare metal. Plasma 6.4.2 on Wayland started. I selected the Screen Brightness and Color applet in the System Tray. I reduced the brightness to 20%. I clicked on the Night Light button Enable and Configure. A crash notification from drkonqi showed for akonadiserver. The crash might've happened during the automatic PIM maintenance during Plasma startup. I couldn't get drkonqi to create a complete trace due to some error with insufficient memory. Using coredumpctl gdb, the crash was in Akonadi::Server::QueryBuilder::exec in frame 13. Akonadi::Server::Resource::insert in frames 14 and 15 had a null insertId. Core was generated by `/usr/bin/akonadiserver'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0; [Current thread is 1 (Thread 0x7f8238d06d40 (LWP 3386))] (gdb) bt #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x00007f8239b74cd3 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89 #2 0x00007f8239b1aabe in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26 #3 0x00007f823ac0e031 in KCrash::defaultCrashHandler(int) () from /lib64/libKF6Crash.so.6 #4 <signal handler called> #5 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 #6 0x00007f8239b74cd3 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89 #7 0x00007f8239b1aabe in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #8 0x00007f8239b026d0 in __GI_abort () at abort.c:73 #9 0x00007f8239d321b6 in __gnu_cxx::__verbose_terminate_handler() [clone .cold] () from /lib64/libstdc++.so.6 #10 0x00007f8239d47adc in __cxxabiv1::__terminate(void (*)()) () from /lib64/libstdc++.so.6 #11 0x00007f8239d31d3c in std::terminate() () from /lib64/libstdc++.so.6 #12 0x00007f8239d47d88 in __cxa_throw () from /lib64/libstdc++.so.6 #13 0x000055d8a9c98e75 in Akonadi::Server::QueryBuilder::exec (this=<optimized out>) at /usr/src/debug/akonadi-server-25.04.2-1.fc43.x86_64/src/server/storage/querybuilder.cpp:602 #14 0x000055d8a9d24d59 in Akonadi::Server::Resource::insert(Akonadi::Server::DataStore*, long long*) [clone .constprop.0] (this=this@entry=0x7ffeda03d5b0, store=<optimized out>, insertId=0x0) at /usr/src/debug/akonadi-server-25.04.2-1.fc43.x86_64/redhat-linux-build/src/server/entities.cpp:1054 #15 0x000055d8a9dd9137 in Akonadi::Server::Resource::insert (insertId=0x0, this=0x7ffeda03d5b0) at /usr/src/debug/akonadi-server-25.04.2-1.fc43.x86_64/redhat-linux-build/src/server/entities.cpp:1029 #16 Akonadi::Server::ResourceManager::addResourceInstance (this=0x55d8cbdef4a0, name=..., capabilities=...) at /usr/src/debug/akonadi-server-25.04.2-1.fc43.x86_64/src/server/resourcemanager.cpp:40 #17 0x000055d8a9df379f in ResourceManagerAdaptor::addResourceInstance (this=0x55d8cbdfe390, identifier=..., capabilities=...) at /usr/src/debug/akonadi-server-25.04.2-1.fc43.x86_64/redhat-linux-build/src/server/resourcemanageradaptor.cpp:39 #18 ResourceManagerAdaptor::qt_static_metacall (_c=<optimized out>, _o=0x55d8cbdfe390, _id=0, _a=0x7ffeda03d838) at /usr/src/debug/akonadi-server-25.04.2-1.fc43.x86_64/redhat-linux-build/src/server/moc_resourcemanageradaptor.cpp:100 #19 ResourceManagerAdaptor::qt_static_metacall (_o=0x55d8cbdfe390, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffeda03d838) at /usr/src/debug/akonadi-server-25.04.2-1.fc43.x86_64/redhat-linux-build/src/server/moc_resourcemanageradaptor.cpp:95 #20 ResourceManagerAdaptor::qt_metacall (this=0x55d8cbdfe390, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffeda03d838) at /usr/src/debug/akonadi-server-25.04.2-1.fc43.x86_64/redhat-linux-build/src/server/moc_resourcemanageradaptor.cpp:129 #21 0x00007f823a6bfa9e in QDBusConnectionPrivate::deliverCall (this=this@entry=0x7f82200014a0, object=object@entry=0x55d8cbdfe390, msg=..., metaTypes=..., slotIdx=4) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/dbus/qdbusintegrator.cpp:1007 #22 0x00007f823a6c391d in QDBusConnectionPrivate::activateCall (this=this@entry=0x7f82200014a0, object=0x55d8cbdfe390, flags=..., flags@entry=..., msg=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/dbus/qdbusintegrator.cpp:916 #23 0x00007f823a6c4680 in QDBusConnectionPrivate::activateObject (this=0x7f82200014a0, node=..., msg=..., pathStartPos=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/dbus/qdbusintegrator.cpp:1484 --Type <RET> for more, q to quit, c to continue without paging--c #24 0x00007f823a6c789a in QDBusActivateObjectEvent::placeMetaCall (this=0x7f822000ae00) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/dbus/qdbusintegrator.cpp:1604 #25 0x00007f823a0f762c in QObject::event (this=<optimized out>, e=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/corelib/kernel/qobject.cpp:1431 #26 0x00007f823a09aed8 in doNotify (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/corelib/kernel/qcoreapplication.cpp:1207 #27 QCoreApplication::notify (this=<optimized out>, receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/corelib/kernel/qcoreapplication.cpp:1190 #28 QCoreApplication::notifyInternal2 (receiver=0x55d8cbdef4a0, event=0x7f822000ae00) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/corelib/kernel/qcoreapplication.cpp:1106 #29 0x00007f823a09b19d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/corelib/kernel/qcoreapplication.cpp:1546 #30 0x00007f823a09ed26 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55d8cbdc83a0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/corelib/kernel/qcoreapplication.cpp:1879 #31 0x00007f823a3b116f in postEventSourceDispatch (s=0x55d8cbdc87b0) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:246 #32 0x00007f82380a2130 in g_main_context_dispatch_unlocked.lto_priv () from /lib64/libglib-2.0.so.0 #33 0x00007f82380ab1c8 in g_main_context_iterate_unlocked.isra () from /lib64/libglib-2.0.so.0 #34 0x00007f82380ab373 in g_main_context_iteration () from /lib64/libglib-2.0.so.0 #35 0x00007f823a3b09ad in QEventDispatcherGlib::processEvents (this=0x55d8cbdcc250, flags=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:399 #36 0x00007f823a0a8b03 in QEventLoop::exec (this=this@entry=0x7ffeda03e0b0, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/corelib/global/qflags.h:77 #37 0x00007f823a0a4419 in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.9.1-1.fc43.x86_64/src/corelib/kernel/qcoreapplication.cpp:1449 #38 0x000055d8a9ca64db in AkApplicationBase::exec (this=0x7ffeda03e360) at /usr/src/debug/akonadi-server-25.04.2-1.fc43.x86_64/src/shared/akapplication.cpp:109 #39 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/akonadi-server-25.04.2-1.fc43.x86_64/src/server/main.cpp:65 The attached full trace showed the statement "INSERT INTO ResourceTable (name, isVirtual) VALUES (:0, :1)" in Akonadi::Server::QueryBuilder::exec. The journal had some akonadi errors around the time of the crash including a database deadlock and timeouts. Jul 04 04:08:37 akonadiserver[3386]: org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7f821804c400) ) Jul 04 04:08:37 akonadiserver[3386]: org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7f821804e4e0) ) Jul 04 04:08:37 akonadiserver[3386]: org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7f821804f1d0) ) Jul 04 04:08:37 akonadiserver[3386]: org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7f82180ad6a0) ) Jul 04 04:08:37 akonadiserver[3386]: org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7f82180aeca0) ) Jul 04 04:08:37 akonadiserver[3386]: org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f821804a640) identified as "AgentBaseChangeRecorder - 94140637406880" Jul 04 04:08:37 akonadiserver[3386]: org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f8218048970) identified as "AgentBaseChangeRecorder - 94179746704416" Jul 04 04:08:37 akonadiserver[3386]: org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f82180ad6a0) identified as "akonadi_maildispatcher_agent - 94179750389888" Jul 04 04:08:37 akonadiserver[3386]: org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f82180aeca0) identified as "SpecialCollectionsMonitor - 94179749902352" Jul 04 04:08:38 akonadiserver[3386]: org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7f82180eb140) ) Jul 04 04:08:38 akonadiserver[3386]: org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f821804f1d0) identified as "AgentBaseChangeRecorder - 94696672924032" Jul 04 04:08:38 akonadiserver[3386]: org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f821804c400) identified as "AgentBaseChangeRecorder - 93833315360768" Jul 04 04:08:38 akonadiserver[3386]: org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f82180eb140) identified as "akonadi_birthdays_resource - 93833314846512" Jul 04 04:08:38 akonadiserver[3386]: org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f821804e4e0) identified as "AgentBaseChangeRecorder - 94290501833680" Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: Failed to generate job text for job with following properties: Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: processedFiles = 0, totalFiles = 0 Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: processedItems = 0, totalItems = 0 Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: current file name = "" Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: destination url = QUrl("") Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: label1 = "", value1 = "" Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: label2 = "", value2 = "" Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: Failed to generate job text for job with following properties: Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: processedFiles = 0, totalFiles = 0 Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: processedItems = 0, totalItems = 0 Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: current file name = "" Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: destination url = QUrl("") Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: label1 = "", value1 = "" Jul 04 04:08:38 plasmashell[2593]: org.kde.plasma.notificationmanager: label2 = "", value2 = "" Jul 04 04:08:39 plasmashell[2593]: kf.quickcharts.datasource: ModelSource: Invalid role -1 "data" Jul 04 04:08:39 systemd[1]: setroubleshootd.service: Deactivated successfully. Jul 04 04:08:39 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=setroubleshootd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Jul 04 04:08:39 systemd[1]: setroubleshootd.service: Consumed 1.761s CPU time, 64.5M memory peak. Jul 04 04:08:41 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.4-org.kde.powerdevil.backlighthelper@1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Jul 04 04:08:41 systemd[1]: Started dbus-:1.4-org.kde.powerdevil.backlighthelper@1.service. Jul 04 04:08:41 akonadi_ical_resource[3644]: "No file selected." Jul 04 04:08:43 akonadiserver[3386]: org.kde.pim.akonadiserver: Database error: "DataStore::beginTransaction (SQLITE) name: ADD RESOURCE INSTANCE" Jul 04 04:08:43 akonadiserver[3386]: org.kde.pim.akonadiserver: Last driver error: "" Jul 04 04:08:43 akonadiserver[3386]: org.kde.pim.akonadiserver: Last database error: "" Jul 04 04:08:43 akonadiserver[3386]: org.kde.pim.akonadiserver: QueryBuilder::exec(): database reported transaction timeout, retrying transaction Jul 04 04:08:43 akonadiserver[3386]: org.kde.pim.akonadiserver: "database is locked Unable to fetch row" Jul 04 04:08:43 akonadiserver[3386]: org.kde.pim.akonadiserver: Database error: "DataStore::rollbackTransaction" Jul 04 04:08:43 akonadiserver[3386]: org.kde.pim.akonadiserver: Last driver error: "Unable to rollback transaction" Jul 04 04:08:43 akonadiserver[3386]: org.kde.pim.akonadiserver: Last database error: "cannot rollback - no transaction is active" Jul 04 04:08:44 systemd[2096]: Started app-systemsettings@a5e6764ce2ce41048731d47a693c2f41.service - System Settings - System Settings. Jul 04 04:08:46 systemd[1]: Starting geoclue.service - Location Lookup Service... Jul 04 04:08:46 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=geoclue comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Jul 04 04:08:46 systemd[1]: Started geoclue.service - Location Lookup Service. Jul 04 04:08:46 agent[3023]: Geolocation service not in use Jul 04 04:08:48 akonadiserver[3386]: org.kde.pim.akonadiserver: QueryBuilder::exec(): database reported transaction timeout, retrying transaction Jul 04 04:08:48 audit[3386]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=3386 comm="akonadiserver" exe="/usr/bin/akonadiserver" sig=6 res=1 Jul 04 04:08:48 akonadiserver[3386]: org.kde.pim.akonadiserver: "database is locked Unable to fetch row" Jul 04 04:08:48 kalendarac[3386]: terminate called after throwing an instance of 'Akonadi::Server::DbDeadlockException' Jul 04 04:08:48 kalendarac[3386]: what(): Database deadlock, unsuccessful after multiple retries Jul 04 04:08:48 kalendarac[3386]: Sql error: database is locked Unable to fetch row Jul 04 04:08:48 kalendarac[3386]: Query: INSERT INTO ResourceTable (name, isVirtual) VALUES (:0, :1) Jul 04 04:08:48 kalendarac[3386]: KCrash: Application 'akonadiserver' crashing... crashRecursionCounter = 2 Jul 04 04:08:48 akonadiserver[3386]: org.kde.pim.akonadiserver: Database error: "DataStore::rollbackTransaction" Jul 04 04:08:48 akonadiserver[3386]: org.kde.pim.akonadiserver: Last driver error: "Unable to rollback transaction" Jul 04 04:08:48 akonadiserver[3386]: org.kde.pim.akonadiserver: Last database error: "cannot rollback - no transaction is active" Jul 04 04:08:48 systemd-coredump[3773]: Process 3386 (akonadiserver) of user 1000 terminated abnormally with signal 6/ABRT, processing... Jul 04 04:08:48 audit: BPF prog-id=94 op=LOAD Jul 04 04:08:48 audit: BPF prog-id=95 op=LOAD Jul 04 04:08:48 audit: BPF prog-id=96 op=LOAD Jul 04 04:08:48 systemd[1]: Started systemd-coredump@1-3773-0.service - Process Core Dump (PID 3773/UID 0). Jul 04 04:08:48 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@1-3773-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' The problem happened 1/3 boots with this image. I haven't seen it before. STEPS TO REPRODUCE 1. In a Fedora 42 KDE installation, download Fedora Rawhide KDE live image Fedora-KDE-Desktop-Live-Rawhide-20250704.n.0.x86_64.iso https://koji.fedoraproject.org/koji/buildinfo?buildID=2741011 2. Start Fedora Media Writer 3. Write Fedora-KDE-Desktop-Live-Rawhide-20250704.n.0.x86_64.iso to a USB flash drive with Fedora Media Writer 4. Reboot 5. Boot Fedora-KDE-Desktop-Live-Rawhide-20250704.n.0.x86_64.iso I did the following, but I don't know if they're related to the problem. 6. select the Screen Brightness and Color applet in the System Tray. 7. reduce the brightness to 20%. 8. click on the Night Light button Enable and Configure. OBSERVED RESULT akonadiserver crashed in Akonadi::Server::QueryBuilder::exec EXPECTED RESULT No crash SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora Rawhide/43 KDE Plasma Version: 6.4.2 KDE Frameworks Version: 6.15.0 Qt Version: 6.9.1 KDE Gear: 25.04.2 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.