[kdepim] [Bug 490307] akonadi_migration_agent triggers payload exception

Milian Wolff bugzilla_noreply at kde.org
Sat Feb 22 12:04:08 GMT 2025


https://bugs.kde.org/show_bug.cgi?id=490307

Milian Wolff <mail at milianw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/pim/
                   |                            |kdepim-runtime/-/commit/a05
                   |                            |49553ee03d8bba1223713a08edb
                   |                            |6a4a6029d3
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #12 from Milian Wolff <mail at milianw.de> ---
Git commit a0549553ee03d8bba1223713a08edb6a4a6029d3 by Milian Wolff.
Committed on 21/02/2025 at 21:25.
Pushed by carlschwan into branch 'master'.

Don't access payload when it's not available

Otherwise, doing so would raise an exception and prevent
migration from succeeding:

```
Thread 1 "akonadi_migrati" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo at entry=6,
no_tid=no_tid at entry=0) at pthread_kill.c:44
44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO
(ret) : 0;
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>,
signo=signo at entry=6, no_tid=no_tid at entry=0) at pthread_kill.c:44
#1  0x00007ffff62a56d3 in __pthread_kill_internal (threadid=<optimized out>,
signo=6) at pthread_kill.c:89
#2  0x00007ffff624bba0 in __GI_raise (sig=sig at entry=6) at
../sysdeps/posix/raise.c:26
#3  0x00007ffff6233582 in __GI_abort () at abort.c:73
#4  0x00007ffff5897b2c in __gnu_cxx::__verbose_terminate_handler () at
/usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
#5  0x00007ffff58ae3ba in __cxxabiv1::__terminate (handler=<optimized out>) at
/usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48
#6  0x00007ffff589752a in std::terminate () at
/usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:58
#7  0x00007ffff58ae676 in __cxxabiv1::__cxa_throw (obj=<optimized out>,
tinfo=0x7ffff7c1f878 <typeinfo for Akonadi::PayloadException>,
    dest=0x7ffff7ac74b0 <Akonadi::PayloadException::~PayloadException()>) at
/usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:98
#8  0x00007ffff7a68f22 in Akonadi::Item::throwPayloadException (this=<optimized
out>, spid=-1, mtid=<optimized out>)
    at /usr/src/debug/akonadi/akonadi-24.12.2/src/core/item.cpp:469
#9  0x00005555555d45ee in
Akonadi::Item::payload<QSharedPointer<KCalendarCore::Incidence> >
(this=0x7fffffffbab8)
    at /usr/include/KPim6/AkonadiCore/akonadi/item.h:759
#10 0x00005555555d3983 in MigrationJob::calculateMissingTags
(this=0x7fffa29ba920, item=...)
    at
/home/milian/projects/kde/src/kdepim-runtime/migration/icalcategoriestotags/icalcategoriestotagsmigrator.cpp:103
#11 0x00005555555d3747 in MigrationJob::migrateNextItem (this=0x7fffa29ba920
```

Previously, I kept running into this crash every time akonadi started.
The crash prevented the migration from finishing. With this patch
here, I finally was able to migrate everything and the error doesn't
occur anymore!

In my case, this may be related to lots of warnings I see on the CLI:

```
    Unable to deserialize payload part: "RFC822" in item 16873 collection -14
    Failed to parse incidence! Item id =  16866 Storage collection id  161
parentCollectionId =  -14
    parse error from icalcomponent_new_from_string. string=
    Unable to deserialize payload part: "ENVELOPE" in item 16874 collection -14
    Unable to deserialize payload part: "HEAD" in item 16874 collection -14
```

The first kind of message is repeated in similar times quite often.
I have saved the full log output, but it contains private data and
thus cannot be shared in full in the public. But if other developers
want to know more, feel free to reach out to me!

M  +4    -0    migration/icalcategoriestotags/icalcategoriestotagsmigrator.cpp

https://invent.kde.org/pim/kdepim-runtime/-/commit/a0549553ee03d8bba1223713a08edb6a4a6029d3

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list