package mysql-server-5.7 5.7.21-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1746786 reported by Alexander Mirkin on 2018-02-01
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)

Bug Description

accoured doring ubuntu release upgrade from 14 to 16.3

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.21-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 3.8.0-29.42~precise1-generic
Uname: Linux 3.8.0-29-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
Date: Thu Feb 1 13:18:40 2018
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2013-10-24 (1561 days ago)
InstallationMedia: Ubuntu-Server 12.04.3 LTS "Precise Pangolin" - Release amd64 (20130820.2)

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
 max_allowed_packet = 16M
MySQLVarLibDirListing: ['mysql_upgrade_info', 'ib_logfile0', 'mysql', 'facebook', 'ib_logfile1', 'alexdb', 'ibdata1', 'test', 'performance_schema', 'debian-5.7.flag', 'debian-5.5.flag']
ProcCmdline: root=LABEL=DOROOT ro
 dpkg 1.18.4ubuntu1.3
 apt 1.2.24
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.21-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to xenial on 2018-02-01 (0 days ago)

Alexander Mirkin (maddoc12) wrote :
tags: removed: need-duplicate-check

Hi Alexander,
on upgrade the server needs to restart and this fails:

From the log:
invoke-rc.d: initscript mysql, action "start" failed.

There isn't much more to that in the log itself, the following might be interesting:
$ systemctl status mysql

Never the less there is more to be found in your logs, I saw:
2018-02-01T18:18:40.003189Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-02-01T18:18:40.003294Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2018-02-01T18:18:40.003334Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2018-02-01T18:18:40.003365Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-02-01T18:18:40.003456Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-02-01T18:18:40.003480Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-02-01T18:18:40.003496Z 0 [ERROR] Failed to initialize builtin plugins.
2018-02-01T18:18:40.003511Z 0 [ERROR] Aborting

That appears to me as an issue in the config vs the system size.
Maybe also everything is allocated in other applications.
You could try shrinking the buffer and retry the upgrade:
innodb_buffer_pool_size = 1M

In that it seems to me like [1] or actually bug 1312936

Could you look into the memory (and concurrent session config) if they could be reduced for the upgrade. You can afterwards still look if/what consumes your memory, resolve it and increase again.

P.S. There also is this
[ 1134.054457] type=1400 audit(1517509116.605:24): apparmor="DENIED" operation="open" parent=14364 profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=14365 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
But I think it is unrelated (only needed for mysql configuring Numa behavior and fixed in later Ubuntu releases afaik)


Thank you for taking the time to report this bug and helping to make Ubuntu better.

Since it seems likely to me that this is a local configuration problem, rather than a bug in Ubuntu, I'm marking this bug as Incomplete.

If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here:

Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New.

Changed in mysql-5.7 (Ubuntu):
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

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

Changed in mysql-5.7 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers