SUMMARY akonadi_migration_agent (v 24.08.0-1) crashes with terminate called after throwing an instance of 'Akonadi::PayloadException' what(): Akonadi::PayloadException: Wrong Item payload type (requested: sp(2)<KCalendarCore::Incidence*>; present: sp(2)<KMime::Message*>, itemId: 58127) STEPS TO REPRODUCE: No user action required. OBSERVED RESULT akonadi_migration_agent crashes SOFTWARE/OS VERSIONS Linux/KDE Plasma: ArchLinux 6.10.6-arch1-1 KDE Plasma Version: 6.1.4-1 Qt Version: 6.7.2-2 ADDITIONAL INFORMATION This happened after an update from Akonadi 24.05.2-1. I use postgres with akonadi.
The same crash can be seen on one of my machines: akonadi-24.08.1-kf.22.1.x86_64 akonadictl --version akonadictl 6.2.1 (24.08.1) CPE_NAME="cpe:/o:opensuse:leap:15.5" STEPS TO REPRODUCE: # to trigger it again: akonadictl stop akonadictl start OBSERVED RESULT # command line output after `akonadictl start` (excerpt): org.kde.pim.akonadiserver: Subscriber "AgentBaseChangeRecorder - 94832279370608" disconnected org.kde.pim.akonadicontrol: ProcessControl: Application "/usr/bin/akonadi_migration_agent" stopped unexpectedly ( "Der Prozess ist abgestürzt" ) org.kde.pim.akonadicontrol: Application '/usr/bin/akonadi_migration_agent' crashed! 1 restarts left. org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7f57a8167720) ) org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x7f57a8167720) identified as "AgentBaseChangeRecorder - 94482414797728" terminate called after throwing an instance of 'Akonadi::PayloadException' what(): Akonadi::PayloadException: Wrong Item payload type (requested: sp(2)<KCalendarCore::Incidence*>; present: sp(2)<KMime::Message*>, itemId: 437035) org.kde.pim.akonadiserver: Subscriber "AgentBaseChangeRecorder - 94482414797728" disconnected Where itemId: 437035 so far was the newest email in my inbox. (Inspected with akonadiconsole -> Browser) If I delete that email and trigger the run again, it will be the email with then is the newest.
As I am using MariaDB, I guess it will be independent of the database.
A backtrace: Thread 1 (Thread 0x7fa3ede08a80 (LWP 31187) "akonadi_migrati"): #0 0x00007fa3f06a949c in __pthread_kill_implementation () at /lib64/libc.so.6 #1 0x00007fa3f06578c2 in raise () at /lib64/libc.so.6 #2 0x00007fa3f063f64f in abort () at /lib64/libc.so.6 #3 0x00007fa3f0aa84d7 in () at /usr/lib64/libstdc++.so.6 #4 0x00007fa3f0ab7c5c in () at /usr/lib64/libstdc++.so.6 #5 0x00007fa3f0ab7cc7 in () at /usr/lib64/libstdc++.so.6 #6 0x00007fa3f0ab7f28 in () at /usr/lib64/libstdc++.so.6 #7 0x00007fa3f2a828fb in Akonadi::Item::throwPayloadException(int, int) const (this=this@entry=0x7ffd4f5f6a18, spid=spid@entry=2, mtid=mtid@entry=65595) at /usr/src/debug/akonadi-24.08.1-kf.22.1.x86_64/src/core/item.cpp:475 #8 0x00005654317e6a48 in Akonadi::Item::payloadImpl<QSharedPointer<KCalendarCore::Incidence> >() const (this=this@entry=0x7ffd4f5f6a18) at /usr/include/KPim6/AkonadiCore/akonadi/item.h:789 #9 0x00005654317e7823 in Akonadi::Item::payload<QSharedPointer<KCalendarCore::Incidence> >() const (this=0x7ffd4f5f6a18) at /usr/include/KPim6/AkonadiCore/akonadi/item.h:762 #10 MigrationJob::calculateMissingTags(Akonadi::Item const&) const (this=0x565432388bf0, item=...) at /usr/src/debug/kdepim-runtime-24.08.1-kf.361.1.x86_64/migration/icalcategoriestotags/icalcategoriestotagsmigrator.cpp:94 #11 MigrationJob::migrateNextItem() (this=0x565432388bf0) at /usr/src/debug/kdepim-runtime-24.08.1-kf.361.1.x86_64/migration/icalcategoriestotags/icalcategoriestotagsmigrator.cpp:83 #12 0x00007fa3f0fe7930 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffd4f5f6d20, r=0x565432388bf0, this=0x565432388ce0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base-6.7.2-lp156.131.2.x86_64/src/corelib/kernel/qobjectdefs_impl.h:469 #13 doActivate<false>(QObject*, int, void**) (sender=0x565431fd8810, signal_index=6, argv=0x7ffd4f5f6d20) at /usr/src/debug/qt6-base-6.7.2-lp156.131.2.x86_64/src/corelib/kernel/qobject.cpp:4086 #14 0x00007fa3f2992945 in KJob::result(KJob*, KJob::QPrivateSignal) (this=this@entry=0x565431fd8810, _t1=<optimized out>, _t1@entry=0x565431fd8810, _t2=...) at /usr/src/debug/kf6-kcoreaddons-6.6.0-kf.15.1.x86_64/build/src/lib/KF6CoreAddons_autogen/include/moc_kjob.cpp:622 #15 0x00007fa3f299351b in KJob::finishJob(bool) (this=0x565431fd8810, emitResult=<optimized out>) at /usr/src/debug/kf6-kcoreaddons-6.6.0-kf.15.1.x86_64/src/lib/jobs/kjob.cpp:98 #16 0x00007fa3f0fd124b in QObject::event(QEvent*) (this=0x565431fd8810, e=0x565521c8c280) at /usr/src/debug/qt6-base-6.7.2-lp156.131.2.x86_64/src/corelib/kernel/qobject.cpp:1452 #17 0x00007fa3f21c38ee in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt6Widgets.so.6 #18 0x00007fa3f0f8e7c0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x565431fd8810, event=0x565521c8c280) at /usr/src/debug/qt6-base-6.7.2-lp156.131.2.x86_64/src/corelib/kernel/qcoreapplication.cpp:1142 #19 0x00007fa3f0f8e7f9 in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base-6.7.2-lp156.131.2.x86_64/src/corelib/kernel/qcoreapplication.cpp:1583 #20 0x00007fa3f0f8eb20 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x565431fad2d0) at /usr/src/debug/qt6-base-6.7.2-lp156.131.2.x86_64/src/corelib/kernel/qcoreapplication.cpp:1940 #21 0x00007fa3f11c4203 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x565432038d50) at /usr/src/debug/qt6-base-6.7.2-lp156.131.2.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:244 #22 0x00007fa3efd14fac in () at /usr/lib64/libglib-2.0.so.0 --Type <RET> for more, q to quit, c to continue without paging-- #23 0x00007fa3efd16bd0 in () at /usr/lib64/libglib-2.0.so.0 #24 0x00007fa3efd171cc in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0 #25 0x00007fa3f11c26bc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x56543210c630, flags=...) at /usr/src/debug/qt6-base-6.7.2-lp156.131.2.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:394 #26 0x00007fa3f0f99c4b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffd4f5f7150, flags=...) at /usr/src/debug/qt6-base-6.7.2-lp156.131.2.x86_64/src/corelib/global/qflags.h:34 #27 0x00007fa3f0f91fd6 in QCoreApplication::exec() () at /usr/src/debug/qt6-base-6.7.2-lp156.131.2.x86_64/src/corelib/global/qflags.h:74 #28 0x00005654317cf1e5 in Akonadi::AgentBase::init<Akonadi::MigrationAgent>(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/include/KPim6/AkonadiAgentBase/akonadi/agentbase.h:444 #29 0x00007fa3f0640eec in __libc_start_call_main () at /lib64/libc.so.6 #30 0x00007fa3f0640fb5 in __libc_start_main_impl () at /lib64/libc.so.6 #31 0x00005654317ce631 in _start () at ../sysdeps/x86_64/start.S:115
The same bug can be seen on my machine, running rolling release openSuse with KDE. When i run `akonadictl start` i experience the exact same behaviour as can be seen in the comment by Bernhard Reiter. The issue persists since some months by now.
Hi Dan could you look at it please ? Thanks
A possibly relevant merge request was started @ https://invent.kde.org/pim/kdepim-runtime/-/merge_requests/189
Git commit 0409dbfcff10407311e9e090893bd60830c68e7a by Daniel Vrátil. Committed on 12/11/2024 at 15:38. Pushed by dvratil into branch 'release/24.12'. Fix crash in iCal Categories to Tags migrator on payload mismatch In theory a Collection can contain multiple different mime types, so we need to make sure that the Item we have is really an event or todo, otherwise we get PayloadException. FIXED-IN: 24.12.0 M +14 -9 migration/icalcategoriestotags/icalcategoriestotagsmigrator.cpp https://invent.kde.org/pim/kdepim-runtime/-/commit/0409dbfcff10407311e9e090893bd60830c68e7a
I still have crash Core was generated by `/opt/kde-source/kde6-install/bin/akonadi_migration_agent --identifier akonadi_m'. Program terminated with signal SIGABRT, Aborted. #0 0x00007f9f30e9a25c in __pthread_kill_implementation () from /lib64/libc.so.6 [Current thread is 1 (Thread 0x7f9f2cc9dac0 (LWP 87574))] Missing separate debuginfos, use: zypper install libelf1-debuginfo-0.191-2.1.x86_64 (gdb) where #0 0x00007f9f30e9a25c in __pthread_kill_implementation () at /lib64/libc.so.6 #1 0x00007f9f30e414b6 in raise () at /lib64/libc.so.6 #2 0x00007f9f30e2891a in abort () at /lib64/libc.so.6 #3 0x00007f9f312adc4d in ??? () at /lib64/libstdc++.so.6 #4 0x00007f9f312bf28c in ??? () at /lib64/libstdc++.so.6 #5 0x00007f9f312ad7f5 in std::terminate() () at /lib64/libstdc++.so.6 #6 0x00007f9f312bf518 in __cxa_throw () at /lib64/libstdc++.so.6 #7 0x00007f9f33732acd in Akonadi::Item::throwPayloadException (this=0x7ffd8d244bc8, spid=-1, mtid=-1) at /opt/kde-source/pim/akonadi/src/core/item.cpp:469 #8 0x000000000044b25b in Akonadi::Item::payload<QSharedPointer<KCalendarCore::Incidence> > (this=0x7ffd8d244bc8) at /opt/kde-source/kde6-install/include/KPim6/AkonadiCore/akonadi/item.h:759 #9 0x000000000044a779 in MigrationJob::calculateMissingTags (this=0x7f9f08027a80, item=...) at /opt/kde-source/pim/kdepim-runtime/migration/icalcategoriestotags/icalcategoriestotagsmigrator.cpp:103 #10 0x000000000044a566 in MigrationJob::migrateNextItem (this=0x7f9f08027a80) at /opt/kde-source/pim/kdepim-runtime/migration/icalcategoriestotags/icalcategoriestotagsmigrator.cpp:90 #11 0x000000000044ecc8 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MigrationJob::*)()>::call(void (MigrationJob::*)(), MigrationJob*, void**)::{lambda()#1}::operator()() const (__closure=0x7ffd8d244ce0) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:152 #12 0x000000000044f2fb in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MigrationJob::*)()>::call(void (MigrationJob::*)(), MigrationJob*, void**)::{lambda()#1}>(void**, QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MigrationJob::*)()>::call(void (MigrationJob::*)(), MigrationJob*, void**)::{lambda()#1}&&) (args=0x7f9f09436f58, fn=...) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:65 #13 0x000000000044ed2b in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MigrationJob::*)()>::call(void (MigrationJob::*)(), MigrationJob*, void**) (f=(void (MigrationJob::*)(MigrationJob * const)) 0x44a3dc <MigrationJob::migrateNextItem()>, o=0x7f9f08027a80, arg=0x7f9f09436f58) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:151 #14 0x000000000044e334 in QtPrivate::FunctionPointer<void (MigrationJob::*)()>::call<QtPrivate::List<>, void>(void (MigrationJob::*)(), MigrationJob*, void**) (f=(void (MigrationJob::*)(MigrationJob * const)) 0x44a3dc <MigrationJob::migrateNextItem()>, o=0x7f9f08027a80, arg=0x7f9f09436f58) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:199 #15 0x000000000044d819 in QtPrivate::QCallableObject<void (MigrationJob::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x7f9f0802d3c0, r=0x7f9f08027a80, a=0x7f9f09436f58, ret=0x0) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:570 #16 0x00007f9f317f9f67 in QObject::event(QEvent*) () at /lib64/libQt6Core.so.6 #17 0x00007f9f32bdec35 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt6Widgets.so.6 #18 0x00007f9f317acbe8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt6Core.so.6 #19 0x00007f9f317b57d8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib64/libQt6Core.so.6 #20 0x00007f9f31a00c87 in ??? () at /lib64/libQt6Core.so.6 #21 0x00007f9f303f3eb8 in ??? () at /lib64/libglib-2.0.so.0 #22 0x00007f9f303f5ca8 in ??? () at /lib64/libglib-2.0.so.0 #23 0x00007f9f303f64bc in g_main_context_iteration () at /lib64/libglib-2.0.so.0 #24 0x00007f9f319fe043 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6 #25 0x00007f9f317b6602 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6 #26 0x00007f9f317b6aea in QCoreApplication::exec() () at /lib64/libQt6Core.so.6 #27 0x00007f9f340e2803 in Akonadi::AgentBase::init (r=...) at /opt/kde-source/pim/akonadi/src/agentbase/agentbase.cpp:868 #28 0x0000000000412457 in Akonadi::AgentBase::init<Akonadi::MigrationAgent> (argc=3, argv=0x7ffd8d2454c8) at /opt/kde-source/kde6-install/include/KPim6/AkonadiAgentBase/akonadi/agentbase.h:444 #29 0x0000000000411622 in main (argc=3, argv=0x7ffd8d2454c8) at /opt/kde-source/pim/kdepim-runtime/agents/migration/migrationagent.cpp:59
The patch does fix the crash here
I am on KDE Gear 24.12 now (Opensuse Tumbleweed shows Version 24.12.0-1.1) and still see the Akonadi Migration Agent crash messages on startup. Restarting Akonadi via CLI still shows the error: terminate called after throwing an instance of 'Akonadi::PayloadException' ... org.kde.pim.akonadicontrol: Application '/usr/bin/akonadi_migration_agent' crashed too often. Giving up! I've tried running the vacuum command in the hopes of cleaning up something but still no success. Do I have to run something else for cleanup? Otherwise this seems not to be fixed.