Bug 493393 - akonadi-db-migrator segfaults attempting to migrate to SQLite
Summary: akonadi-db-migrator segfaults attempting to migrate to SQLite
Status: REPORTED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Migration (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-20 05:57 UTC by Andrew Hutchings
Modified: 2025-01-07 09:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Hutchings 2024-09-20 05:57:40 UTC
SUMMARY
When attempting to migrate to SQLite in Fedora 40, akonadi-db-migrator segfaults.

STEPS TO REPRODUCE
1. akonadi-db-migrator --newengine sqlite

OBSERVED RESULT
org.kde.pim.akonadiserver: mysqld for Akonadi is already running, trying to connect to it.
akonadi.collectionattributetable                   OK
akonadi.collectionmimetyperelation                 OK
akonadi.collectionpimitemrelation                  OK
akonadi.collectiontable                            OK
akonadi.flagtable                                  OK
akonadi.mimetypetable                              OK
akonadi.parttable                                  OK
akonadi.parttypetable                              OK
akonadi.pimitemflagrelation                        OK
akonadi.pimitemtable                               OK
akonadi.pimitemtagrelation                         OK
akonadi.relationtable                              OK
akonadi.relationtypetable                          OK
akonadi.resourcetable                              OK
akonadi.schemaversiontable                         OK
akonadi.tagattributetable                          OK
akonadi.tagremoteidresourcerelationtable           OK
akonadi.tagtable                                   OK
akonadi.tagtypetable                               OK
This installation of MariaDB is already upgraded to 10.11.6-MariaDB.
There is no need to run mysql_upgrade again for 10.11.8-MariaDB.
You can use --force if you still want to run mysql_upgrade
org.kde.pim.akonadiserver: Running DB initializer
org.kde.pim.akonadiserver: DB initializer done
org.kde.pim.akonadiserver: Running DB initializer
[1]    233034 segmentation fault (core dumped)  akonadi-db-migrator --newengine sqlite


SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Fedora 40
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION

GDB info:

Akonadi::Server::DbInitializer::run (this=0x7fffe003a900) at /usr/src/debug/akonadi-server-24.08.0-1.fc40.x86_64/src/server/storage/dbinitializer.cpp:82                                
82              SchemaVersion version = SchemaVersion::retrieveAll(store).at(0);
(gdb) bt
#0  Akonadi::Server::DbInitializer::run (this=0x7fffe003a900) at /usr/src/debug/akonadi-server-24.08.0-1.fc40.x86_64/src/server/storage/dbinitializer.cpp:82
#1  0x00005555555bd7ba in Akonadi::Server::DataStore::init (this=0x7fffe0045190) at /usr/include/qt6/QtCore/qsharedpointer_impl.h:274
#2  0x00005555555a712a in (anonymous namespace)::prepareDatabase (config=config@entry=0x7fffe00089d0)
    at /usr/src/debug/akonadi-server-24.08.0-1.fc40.x86_64/src/server/dbmigrator/dbmigrator.cpp:194
#3  0x00005555555ac340 in Akonadi::Server::DbMigrator::runMigrationThread (this=0x7fffffffd7a0)
    at /usr/src/debug/akonadi-server-24.08.0-1.fc40.x86_64/src/server/dbmigrator/dbmigrator.cpp:533
#4  operator() (__closure=0x5555557523a8) at /usr/src/debug/akonadi-server-24.08.0-1.fc40.x86_64/src/server/dbmigrator/dbmigrator.cpp:452
#5  0x00005555555ae95d in std::__invoke_impl<void, Akonadi::Server::DbMigrator::startMigration()::<lambda()> > (__f=<optimized out>) at /usr/include/c++/14/bits/invoke.h:61
#6  std::__invoke<Akonadi::Server::DbMigrator::startMigration()::<lambda()> > (__fn=<optimized out>) at /usr/include/c++/14/bits/invoke.h:96
#7  std::invoke<Akonadi::Server::DbMigrator::startMigration()::<lambda()> > (__fn=<optimized out>) at /usr/include/c++/14/functional:120
#8  operator()<> (__closure=<optimized out>) at /usr/include/qt6/QtCore/qthread.h:125
#9  std::__invoke_impl<void, QThread::create<Akonadi::Server::DbMigrator::startMigration()::<lambda()> >(Akonadi::Server::DbMigrator::startMigration()::<lambda()>&&)::<lambda(auto:53&& ...)> > (__f=<optimized out>) at /usr/include/c++/14/bits/invoke.h:61
#10 std::__invoke<QThread::create<Akonadi::Server::DbMigrator::startMigration()::<lambda()> >(Akonadi::Server::DbMigrator::startMigration()::<lambda()>&&)::<lambda(auto:53&& ...)> >
    (__fn=<optimized out>) at /usr/include/c++/14/bits/invoke.h:96
#11 std::thread::_Invoker<std::tuple<QThread::create<Akonadi::Server::DbMigrator::startMigration()::<lambda()> >(Akonadi::Server::DbMigrator::startMigration()::<lambda()>&&)::<lambda(auto:53&& ...)> > >::_M_invoke<0> (this=<optimized out>) at /usr/include/c++/14/bits/std_thread.h:301
#12 std::thread::_Invoker<std::tuple<QThread::create<Akonadi::Server::DbMigrator::startMigration()::<lambda()> >(Akonadi::Server::DbMigrator::startMigration()::<lambda()>&&)::<lambda(auto:53&& ...)> > >::operator() (this=<optimized out>) at /usr/include/c++/14/bits/std_thread.h:308
#13 std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<QThread::create<Akonadi::Server::DbMigrator::startMigration()::<lambda()> >(Akonadi::Server::DbMigrator::startMigration()::<lambda()>&&)::<lambda(auto:53&& ...)> > >, void>::operator()
    (this=0x7fffe57ffa60) at /usr/include/c++/14/future:1439
#14 std::__invoke_impl<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<QThread::create<Akonadi::Server::DbMigrator::startMigration()::<lambda()> >(Akonadi::Server::DbMigrator::startMigration()::<lambda()>&&)::<lambda(auto:53&& ...)> > >, void>&> (__f=...) at /usr/include/c++/14/bits/invoke.h:61
#15 std::__invoke_r<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<QThread::create<Akonadi::Server::DbMigrator::startMigration()::<lambda()> >(Akonadi::Server::DbMigrator::startMigration()::<lambda()>&&)::<lambda(auto:53&& ...)> > >, void>&> (__fn=...) at /usr/include/c++/14/bits/invoke.h:114
#16 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>(), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<QThread::create<Akonadi::Server::DbMigrator::startMigration()::<lambda()> >(Akonadi::Server::DbMigrator::startMigration()::<lambda()>&&)::<lambda(auto:53&& ...)> > >, void> >::_M_invoke(const std::_Any_data &) (__functor=...)
    at /usr/include/c++/14/bits/std_function.h:291
#17 0x00005555555a49b6 in std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>::operator() (this=<optimized out>)
    at /usr/include/c++/14/bits/std_function.h:591
#18 std::__future_base::_State_baseV2::_M_do_set (this=0x555555752380, __f=<optimized out>, __did_set=0x7fffe57ffa17) at /usr/include/c++/14/future:596
#19 0x00007ffff6caba4b in __pthread_once_slow (once_control=0x555555752398, init_routine=0x7ffff6ee5f60 <std::__once_proxy()>) at pthread_once.c:116
#20 0x00007ffff6cabab9 in ___pthread_once (once_control=<optimized out>, init_routine=<optimized out>) at pthread_once.c:143
#21 0x00005555555aeb38 in __gthread_once (__once=0x555555752398, __func=<optimized out>) at /usr/include/c++/14/x86_64-redhat-linux/bits/gthr-default.h:713
#22 std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()>*, bool*>
    (__once=..., __f=@0x7fffe57ffa30: (void (std::__future_base::_State_baseV2::*)(std::__future_base::_State_baseV2 * const, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()> *, bool *)) 0x5555555a4980 <std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>) at /usr/include/c++/14/mutex:916
#23 std::__future_base::_State_baseV2::_M_set_result (this=0x555555752380, __res=..., __ignore_failure=true) at /usr/include/c++/14/future:435
#24 std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<QThread::create<Akonadi::Server::DbMigrator::startMigration()::<lambda()> >(Akonadi::Server::DbMigrator::startMigration()::<lambda()>&&)::<lambda(auto:53&& ...)> > >, void>::_M_complete_async(void) (this=0x555555752380) at /usr/include/c++/14/future:1712
#25 0x00007ffff74b8417 in std::__future_base::_State_baseV2::wait (this=0x555555752380) at /usr/include/c++/14/future:357
#26 std::__basic_future<void>::_M_get_result (this=0x5555557523f0) at /usr/include/c++/14/future:748
#27 std::future<void>::get (this=0x5555557523f0) at /usr/include/c++/14/future:920
#28 QThreadCreateThread::run (this=0x5555557523e0) at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/thread/qthread.cpp:1234
#29 0x00007ffff755473c in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/thread/qthread_unix.cpp:326
#30 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/thread/qthread_unix.cpp:262
#31 QThreadPrivate::start (arg=0x5555557523e0) at /usr/src/debug/qt6-qtbase-6.7.2-6.fc40.x86_64/src/corelib/thread/qthread_unix.cpp:285
#32 0x00007ffff6ca66d7 in start_thread (arg=<optimized out>) at pthread_create.c:447
#33 0x00007ffff6d2a60c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78