Bug 508354

Summary: akonadiserver crash in Akonadi::Server::Connection::slotSendHello
Product: [Frameworks and Libraries] Akonadi Reporter: Thomas Rosenberger <thomas.rosenberger>
Component: serverAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: carl
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Log of the crashing process
stack trace

Description Thomas Rosenberger 2025-08-16 16:15:27 UTC
Created attachment 184156 [details]
Log of the crashing process

SUMMARY
When logging into KDE Plasma desktop, Akonadiserver always crashes. This is generating a core dump with each login. When starting Akonadiserver some time later by accessing KMail via Kontact, it starts successfully. But if Kontact is started too early, it also crashes.

STEPS TO REPRODUCE
1. Boot system
2. Log in to KDE Plasma

OBSERVED RESULT
New core dump for Akonadiserver is generated.

EXPECTED RESULT
No crash.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: openSUSE Tumbleweed
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION

The crash happens in the copy ctor of Akonadi::Server::SchemaVersion which gets called from method Akonadi::Server::Connection::slotSendHello.

From the core dump:
(gdb) f 5
#5  Akonadi::Server::SchemaVersion::SchemaVersion (this=0x7f4ac9ffa450, other=...) at /usr/src/debug/akonadi-25.04.3/build/src/server/entities.cpp:99
99      SchemaVersion::SchemaVersion(const SchemaVersion &other)
(gdb) info args
this = 0x7f4ac9ffa450
other = <error reading variable: Cannot access memory at address 0x0>

It looks like SchemaVersion::retrieveAll().at(0); does not return a valid object?

Related log output:
Aug 16 16:24:38 mobile akonadiserver[2968]: org.kde.pim.akonadiserver: Database error: Cannot open database.
Aug 16 16:24:38 mobile akonadiserver[2968]: org.kde.pim.akonadiserver:   Last driver error: "QMYSQL: Unable to connect"
Aug 16 16:24:38 mobile akonadiserver[2968]: org.kde.pim.akonadiserver:   Last database error: "TLS/SSL error: certificate is not yet valid"
Comment 1 Thomas Rosenberger 2025-08-16 16:18:06 UTC
Created attachment 184158 [details]
stack trace