Kubuntu 17.04, akonadi-backend-mysql provides incomplete AppArmor profile preventing productive usage of akonadi

Bug #1698632 reported by Bernd Strieder
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Kubuntu PPA
Expired
Undecided
Unassigned

Bug Description

In Kubunutu 17.04 and also latest Kubuntu staging packages, in a fresh home directory akonadi fails to be started, very quickly with mysterious error messages in ./.local/share/akonadi/akonadiserver.error.old:

Database process exited unexpectedly during initial connection!executable: "/usr/sbin/mysqld-akonadi"arguments: ("--defaults-file=/pool1/home/bernd/.local/share/akonadi/mysql.conf", "--datadir=/pool1/home/bernd/.local/share/akonadi/db_data/", "--socket=/tmp/akonadi-bernd.bZGZo6/mysql.socket")stdout: ""stderr: "mysqld: [ERROR] Could not open required defaults file: /pool1/home/bernd/.local/share/akonadi/mysql.conf\nmysqld: [ERROR] Fatal error in defaults handling. Program aborted!\n"exit code: 1process error: "Unknown error"Failed to remove runtime connection config file

Running this command in strace one can observe that read access to /proc/self/status is rejected short before the failure, only googling this finally suggested AppArmor might be invovled.

This can be fixed by putting the relevant AppArmor profile to complain mode:

sudo aa-complain usr.sbin.mysqld-akonadi

But that is not a proper fix for the issue, the profile should be fixed to save John Doe user to have to deal with AppArmor.

Revision history for this message
Simon Quigley (tsimonq2) wrote :

Thank you for taking the time to report this bug and helping to make Kubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in Kubuntu since that time you reported the bug and your problem may have been fixed with some of the updates. It would help us a lot if you could test it on a currently supported Kubuntu version. If you test it and it is still an issue, kindly upload the updated logs by running only once:
apport-collect 1698632

and any other logs that are relevant for this particular issue.

Changed in kubuntu-ppa:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Kubuntu PPA because there has been no activity for 60 days.]

Changed in kubuntu-ppa:
status: Incomplete → Expired
Revision history for this message
JPT (j-p-t) wrote :

A Problem like this should be solved by

Edit /etc/apparmor.d/tunable/home and add your new home, for example:

@{HOMEDIRS}=/home/ /somewhere/home/

aa-complain should be a temporary workaround only.

This problem is caused by /home not being on the root filesystem. So it is not limited to akonadi and there are tons of similar bugs filed. apparmor needs to somehow know if systemdirs like /tmp /var /home are moved.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.