package mariadb-server-10.1 1:10.1.41-0ubuntu0.18.04.1 failed to install/upgrade: installed mariadb-server-10.1 package post-installation script subprocess returned error exit status 127

Bug #1840055 reported by Mathieu L BOUCHARD
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mariadb-10.1 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

no idea, just an automated bug report that didn't tell me what the actual problem is.

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: mariadb-server-10.1 1:10.1.41-0ubuntu0.18.04.1
ProcVersionSignature: Ubuntu 4.15.0-55.60-generic 4.15.18
Uname: Linux 4.15.0-55-generic x86_64
NonfreeKernelModules: mt76xx mt7630e
.etc.apparmor.d.usr.sbin.mysqld: /usr/sbin/mysqld { }
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
Date: Tue Aug 13 11:18:12 2019
DuplicateSignature:
 package:mariadb-server-10.1:1:10.1.41-0ubuntu0.18.04.1
 Setting up mariadb-server-10.1 (1:10.1.41-0ubuntu0.18.04.1) ...
 dpkg: error processing package mariadb-server-10.1 (--configure):
  installed mariadb-server-10.1 package post-installation script subprocess returned error exit status 127
ErrorMessage: installed mariadb-server-10.1 package post-installation script subprocess returned error exit status 127
InstallationDate: Installed on 2016-02-08 (1282 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
Logs.var.log.daemon.log:

Logs.var.log.mysql.error.log:
MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLVarLibDirListing: ['mysql_upgrade_info', 'ib_logfile0', 'ib_logfile1', 'multi-master.info', 'ibdata1', 'aria_log.00000001', 'debian-10.1.flag', 'performance_schema', 'mysql', 'aria_log_control', 'bioapt']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.15.0-55-generic root=UUID=6e93328c-e2f2-406c-843c-122c758dbb2a ro quiet splash vt.handoff=1
Python3Details: /usr/bin/python3.6, Python 3.6.8, python3-minimal, 3.6.7-1~18.04
PythonDetails: /usr/bin/python2.7, Python 2.7.15+, python-minimal, 2.7.15~rc1-1
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu2.1
 apt 1.6.11
SourcePackage: mariadb-10.1
Title: package mariadb-server-10.1 1:10.1.41-0ubuntu0.18.04.1 failed to install/upgrade: installed mariadb-server-10.1 package post-installation script subprocess returned error exit status 127
UpgradeStatus: Upgraded to bionic on 2018-11-01 (285 days ago)
modified.conffile..etc.apparmor.d.usr.sbin.mysqld: [modified]
mtime.conffile..etc.apparmor.d.usr.sbin.mysqld: 2019-07-10T01:22:38.693495

Revision history for this message
Mathieu L BOUCHARD (matju) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Theo Nolte (theo-nolte) wrote :

I had exactly the same problem. Changing "ProtectHome=true" to "ProtectHome=false" in the Unit-File fixed it for me. systemd was trying to unmount /home, which was not possible because of a lot of bind mounts on /home.

Revision history for this message
Mathieu L BOUCHARD (matju) wrote : Re: [Bug 1840055] Re: package mariadb-server-10.1 1:10.1.41-0ubuntu0.18.04.1 failed to install/upgrade: installed mariadb-server-10.1 package post-installation script subprocess returned error exit status 127
Download full text (3.8 KiB)

A database server living exclusively in /var has no business touching
anything in /home, and has even less business umounting it. But I can't
confirm this from just running the dpkg command, as all it tells me is
"127" even when I run it with option "-D77777". /var/log/apt/history.log is
even worse, as it doesn't even mention the "127" nor the subprocess
failing, just "dpkg" returning "1". I don't see any mention of "home" in
any file of /etc/mysql/ recursively. I'll try ProtectHome=false only once I
get a satisfying error message... but then, it's because I don't rely on
mariadb/mysql on this box.

Le mer. 14 août 2019 à 12:00, Theo Nolte <email address hidden> a
écrit :

> I had exactly the same problem. Changing "ProtectHome=true" to
> "ProtectHome=false" in the Unit-File fixed it for me. systemd was trying
> to unmount /home, which was not possible because of a lot of bind mounts
> on /home.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1840055
>
> Title:
> package mariadb-server-10.1 1:10.1.41-0ubuntu0.18.04.1 failed to
> install/upgrade: installed mariadb-server-10.1 package post-
> installation script subprocess returned error exit status 127
>
> Status in mariadb-10.1 package in Ubuntu:
> New
>
> Bug description:
> no idea, just an automated bug report that didn't tell me what the
> actual problem is.
>
> ProblemType: Package
> DistroRelease: Ubuntu 18.04
> Package: mariadb-server-10.1 1:10.1.41-0ubuntu0.18.04.1
> ProcVersionSignature: Ubuntu 4.15.0-55.60-generic 4.15.18
> Uname: Linux 4.15.0-55-generic x86_64
> NonfreeKernelModules: mt76xx mt7630e
> .etc.apparmor.d.usr.sbin.mysqld: /usr/sbin/mysqld { }
> ApportVersion: 2.20.9-0ubuntu7.7
> Architecture: amd64
> Date: Tue Aug 13 11:18:12 2019
> DuplicateSignature:
> package:mariadb-server-10.1:1:10.1.41-0ubuntu0.18.04.1
> Setting up mariadb-server-10.1 (1:10.1.41-0ubuntu0.18.04.1) ...
> dpkg: error processing package mariadb-server-10.1 (--configure):
> installed mariadb-server-10.1 package post-installation script
> subprocess returned error exit status 127
> ErrorMessage: installed mariadb-server-10.1 package post-installation
> script subprocess returned error exit status 127
> InstallationDate: Installed on 2016-02-08 (1282 days ago)
> InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64
> (20151021)
> Logs.var.log.daemon.log:
>
> Logs.var.log.mysql.error.log:
> MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
> MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
> [mysqldump]
> quick
> quote-names
> max_allowed_packet = 16M
> MySQLVarLibDirListing: ['mysql_upgrade_info', 'ib_logfile0',
> 'ib_logfile1', 'multi-master.info', 'ibdata1', 'aria_log.00000001',
> 'debian-10.1.flag', 'performance_schema', 'mysql', 'aria_log_control',
> 'bioapt']
> ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.15.0-55-generic
> root=UUID=6e93328c-e2f2-406c-843c-122c758dbb2a ro quiet splash vt.handoff=1
> Python3Details: /usr/bin/python3.6, Python 3.6.8, python3-minimal,
> 3.6.7-1~18.04
> PythonDetails: /usr/bin/python2.7, Python 2.7.15+, python-mi...

Read more...

Revision history for this message
Mathieu L BOUCHARD (matju) wrote :

A database server living exclusively in /var has no business touching anything in /home, and has even less business umounting it. But I can't confirm this from just running the dpkg command, as all it tells me is "127" even when I run it with option "-D77777". /var/log/apt/history.log is even worse, as it doesn't even mention the "127" nor the subprocess failing, just "dpkg" returning "1". I don't see any mention of "home" in any file of /etc/mysql/ recursively. I'll try ProtectHome=false only once I get a satisfying error message... but then, it's because I don't rely on mariadb/mysql on this box.

Revision history for this message
Faustin (fauust) wrote :

Hi Mathieu,
thank you for your report and for your help making Ubuntu better.

It is difficult to understand your problem because you do not provide the steps that would permit me to try to reproduce it.

But I can see in the 'Dmesg.txt' log the following lines:
[594512.788195] audit: type=1400 audit(1565709492.804:91): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/etc/ld.so.cache" pid=21185 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[594512.788226] audit: type=1400 audit(1565709492.804:92): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/lib/x86_64-linux-gnu/libaio.so.1.0.1" pid=21185 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[594512.793206] audit: type=1400 audit(1565709492.808:93): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/etc/ld.so.cache" pid=21190 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[594512.793230] audit: type=1400 audit(1565709492.808:94): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/lib/x86_64-linux-gnu/libaio.so.1.0.1" pid=21190 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

This may be the reason of your problem.

May I suggest you to try this (see my first comment):
https://mariadb.com/kb/en/library/the-community-mariadb-troubles-only-running-after-reboot-times-out-when-try/

Regards,
Faustin

Changed in mariadb-10.1 (Ubuntu):
status: New → Incomplete
Revision history for this message
Faustin (fauust) wrote :

@theo, the ProtectHome directive of systemd is a sandboxing feature that permits to protect home directory and if you put your datadir (normally /var/lib/mysql) into the /home directory, then you should disable this sandboxing feature to allow mariadb to start.

But @Mathieu is right and I don't see any relation with the current problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mariadb-10.1 (Ubuntu) because there has been no activity for 60 days.]

Changed in mariadb-10.1 (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Mathieu L BOUCHARD (matju) wrote :
Download full text (5.2 KiB)

Faustin, the problem happened when just doing a daily suggested software
update (some new updates show up, i click upgrade). AFAIK I am using
default settings for MariaDB and AppArmor (I don't think I've ever touched
AppArmor settings on any machine ever). A default install of MariaDB
shouldn't need any tricks just for a daily upgrade to run correctly. I
could try purging the package and reinstall it from scratch but I don't
know whether the problem will come back and I might have to install an
older version just to simulate...

Sorry, I never really finished this email. In the end I uninstalled mariadb
because I decided to use
something else for my project (for different reasons).

Le mar. 20 août 2019 à 15:50, Faustin <email address hidden> a écrit :

> Hi Mathieu,
> thank you for your report and for your help making Ubuntu better.
>
> It is difficult to understand your problem because you do not provide
> the steps that would permit me to try to reproduce it.
>
> But I can see in the 'Dmesg.txt' log the following lines:
> [594512.788195] audit: type=1400 audit(1565709492.804:91):
> apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld"
> name="/etc/ld.so.cache" pid=21185 comm="mysqld" requested_mask="r"
> denied_mask="r" fsuid=0 ouid=0
> [594512.788226] audit: type=1400 audit(1565709492.804:92):
> apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld"
> name="/lib/x86_64-linux-gnu/libaio.so.1.0.1" pid=21185 comm="mysqld"
> requested_mask="r" denied_mask="r" fsuid=0 ouid=0
> [594512.793206] audit: type=1400 audit(1565709492.808:93):
> apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld"
> name="/etc/ld.so.cache" pid=21190 comm="mysqld" requested_mask="r"
> denied_mask="r" fsuid=0 ouid=0
> [594512.793230] audit: type=1400 audit(1565709492.808:94):
> apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld"
> name="/lib/x86_64-linux-gnu/libaio.so.1.0.1" pid=21190 comm="mysqld"
> requested_mask="r" denied_mask="r" fsuid=0 ouid=0
>
> This may be the reason of your problem.
>
> May I suggest you to try this (see my first comment):
>
> https://mariadb.com/kb/en/library/the-community-mariadb-troubles-only-running-after-reboot-times-out-when-try/
>
> Regards,
> Faustin
>
> ** Changed in: mariadb-10.1 (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1840055
>
> Title:
> package mariadb-server-10.1 1:10.1.41-0ubuntu0.18.04.1 failed to
> install/upgrade: installed mariadb-server-10.1 package post-
> installation script subprocess returned error exit status 127
>
> Status in mariadb-10.1 package in Ubuntu:
> Incomplete
>
> Bug description:
> no idea, just an automated bug report that didn't tell me what the
> actual problem is.
>
> ProblemType: Package
> DistroRelease: Ubuntu 18.04
> Package: mariadb-server-10.1 1:10.1.41-0ubuntu0.18.04.1
> ProcVersionSignature: Ubuntu 4.15.0-55.60-generic 4.15.18
> Uname: Linux 4.15.0-55-generic x86_64
> NonfreeKernelModules: mt76xx mt7630e
> .etc.apparmor.d.usr.sbin.mysqld: /usr/sbin/mysqld { }
> ApportVersion: 2.20.9-0ubuntu7.7
> Arch...

Read more...

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.