Bug 510914

Summary: Tablespace flags are invalid in datafile
Product: [Applications] kmail2 Reporter: Tom Chiverton <bugs.kde.org>
Component: generalAssignee: kdepim bugs <pim-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: nicolas.fella, winter
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Tom Chiverton 2025-10-22 11:30:25 UTC
( version from Kubuntu Questing doesn't appear in list ; dpkg -l|grep kmail
ii  kmail                                               4:25.08.2-0ubuntu1~ubuntu25.10~ppa1          amd64        full featured graphical email client
)

SUMMARY
Fails to start under Plasma 6.5.0 : Tablespace flags are invalid in datafile logged in ~/.local/share/akonadi/db_data/mysql.err

STEPS TO REPRODUCE
1. start kmail 

OBSERVED RESULT
kmail opens after several minutes displaying inoperable GUI saying a required component failed to start

Logs in Konsole:
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: database server stopped unexpectedly
org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld"
org.kde.pim.akonadiserver: arguments: QList("--defaults-file=/home/falken/.local/share/akonadi/mysql.conf", "--datadir=/home/falken/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/mysql.socket", "--pid-file=/run/user/1000/akonadi/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: ""
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
org.kde.pim.akonadiserver: See "/home/falken/.local/share/akonadi/db_data/mysql.err" for more details
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
org.kde.pim.pimcommonactivities: Plasma activities is not running:  1
org.kde.pim.akonadicore: Job error:  "" for collection: QList()
org.kde.pim.akonadicore: Job error:  "" for collection: QList()
org.kde.pim.messagelist: Failed to load tags  ""
org.kde.pim.kmail: ""
org.kde.pim.mailcommon: failed to retrieve tags  ""

# cat ~/.local/share/akonadi/db_data/mysql.err
2025-10-22T11:23:48.334771Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2025-10-22T11:23:48.505309Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2025-10-22T11:23:48.505344Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.6-0ubuntu3) starting as process 5087
2025-10-22T11:23:48.507057Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2025-10-22T11:23:48.507061Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8mb3_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2025-10-22T11:23:48.510911Z 0 [Warning] [MY-013907] [InnoDB] Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to compute innodb_redo_log_capacity=134217728. Please use innodb_redo_log_capacity instead.
2025-10-22T11:23:48.511853Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2025-10-22T11:23:48.531927Z 1 [ERROR] [MY-012224] [InnoDB] Tablespace flags are invalid in datafile: ./ibdata1, Space ID:0, Flags: 21. Please refer to http://dev.mysql.com/doc/refman/8.4/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2025-10-22T11:23:48.531954Z 1 [ERROR] [MY-012237] [InnoDB] Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
2025-10-22T11:23:48.531965Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Data structure corruption.
2025-10-22T11:23:49.031681Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2025-10-22T11:23:49.031909Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2025-10-22T11:23:49.031938Z 0 [ERROR] [MY-010119] [Server] Aborting
2025-10-22T11:23:49.032897Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.6-0ubuntu3)  (Ubuntu).
2025-10-22T11:23:49.032925Z 0 [System] [MY-015016] [Server] MySQL Server - end.
Comment 1 Tom Chiverton 2025-10-22 11:35:51 UTC
After `sudo apt install mariadb-server-core`

Which did
```
Installing:
  mariadb-server-core

REMOVING:
  default-mysql-server-core  mysql-server-core
```

kmail starts again.

So I assume there is a busted depdancy defined somewhere, as kmail now requires MariaDB and should conflict with `mysql-server-core` ?
Comment 2 Allen Winter 2025-10-25 13:04:43 UTC
this would be a kubuntu packaging problem and not something a kde developer can fix for you.