Bug 425606 - Akonadi server fails with MariaDB 10.5.5
Summary: Akonadi server fails with MariaDB 10.5.5
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: 5.15.0
Platform: Arch Linux Linux
: NOR critical
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-20 17:43 UTC by physkets
Modified: 2020-09-29 10:37 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description physkets 2020-08-20 17:43:56 UTC
SUMMARY

The akonadi server does not start after the distro upgraded its MariaDB package to 10.5.5


OBSERVED RESULT

  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/bin/mysqld"
  org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/user/.local/share/akonadi/mysql.conf", "--datadir=/home/user/.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: "2020-08-20 22:44:34 0 [Note] /usr/bin/mysqld (mysqld 10.5.5-MariaDB) starting as process 19981 ...\n"
  org.kde.pim.akonadiserver: exit code: 1
  org.kde.pim.akonadiserver: process error: "Unknown error"


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Kernel Version: 5.8.1-zen1-1-zen
Comment 1 Taeyeon 2020-08-26 20:38:21 UTC
I am not entirely sure whether this is the same issue, but the usr.bin.akonadiserver (as well as mysqld_akonadi) AppArmor profile is broken with MariaDB 10.5.x.

Apparently, 10.5.x renamed all paths and executables to be mariadb-branded while the mysql versions are now symlinks (I believe the inverse was true up to 10.4.x); which messes up the Akonadi AA profiles pretty thoroughly, since AA works with paths and seems to (sensibly) always follow links for permission checks.

Relevant MariaDB (server) PR: https://github.com/MariaDB/server/pull/1544

This would (at least in my case) result in EACCES when trying to start the database server:
org.kde.pim.akonadiserver: process error: "execvp: Permission denied"

This can be worked around by disabling AA for akonadi (sudo aa-disable /usr/bin/akonadiserver).

This is on Arch Linux with Applications 20.08.0-1, Frameworks 5.73.0-1, Qt 5.15.0-4 and MariaDB 10.5.5-2.
Comment 2 Christophe Marin 2020-09-02 15:15:55 UTC
@Sandro, please see comment#1
Comment 3 Bug Janitor Service 2020-09-29 10:13:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/akonadi/-/merge_requests/34