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

Bug #1673861 reported by Brian Richardson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Mysql error prevents ubuntu server upgrade

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.17-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 3.13.0-112.159-generic 3.13.11-ckt39
Uname: Linux 3.13.0-112-generic i686
ApportVersion: 2.20.1-0ubuntu2.5
AptOrdering:
 mysql-server-5.7: Configure
 mysql-server: Configure
 NULL: ConfigurePending
Architecture: i386
Date: Fri Mar 17 14:55:46 2017
DpkgHistoryLog: Start-Date: 2017-03-17 14:55:41
ErrorMessage: subprocess installed post-installation script returned error exit status 1
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLConf.etc.mysql.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['debian-5.5.flag', 'debian-5.7.flag', 'mysql', 'ib_logfile1', 'performance_schema', 'ib_logfile0', 'ibdata1', 'mysql_upgrade_info']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-3.13.0-112-generic root=UUID=42cf89ab-58bf-4a70-820c-19856795642b ro console=ttyS0 console=tty0
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.19
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.17-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to xenial on 2017-03-17 (0 days ago)

Revision history for this message
Brian Richardson (stonehand13) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
thank you for your bug report and your help to make Ubuntu better.
In the Log I have found:
2017-03-17T18:47:56.048534Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-03-17T18:47:56.049259Z 0 [ERROR] InnoDB: mmap(136151040 bytes) failed; errno 12
2017-03-17T18:47:56.049290Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-03-17T18:47:56.049317Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-03-17T18:47:56.049343Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-03-17T18:47:56.049358Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-03-17T18:47:56.049370Z 0 [ERROR] Failed to initialize plugins.
2017-03-17T18:47:56.049379Z 0 [ERROR] Aborting

From this time on there are a few more like these, but the repedition might just be due to you retrying to upgrade the mysql package.

The MYSQL-Server is restarted on upgrade and the log indicates that this restart seems to fail.
The last good startup was at "170317 14:32:20 [Note] /usr/sbin/mysqld: ready for connections." with the old version "5.5.54".

Now 128 MB does not seem too much, yet I wanted to ask to be sure if this system is very small or in general memory constrained?
I see int the dmesg that it is a 256MB System, maybe it is just too low of a limit to run the newer mysql server with your configuration?

We usually try to work through an installation with 256MB, but I'm not so sure if that is true with "bigger" extra software like mysql. In your case it seems to want 50% of your memory, with the kernel having another ~15%.

Maybe you could either give the system more memory or consider shrinking the buffer pool size, be aware that this gets you lower than the buffer pool chunk, so you need to adapt that as well.
https://dev.mysql.com/doc/refman/5.7/en/innodb-buffer-pool-resize.html
There are certain other tweaks that can be tried to shrink the needs, like [1].

Common options also often include adding swap [2], decrease the need of mysql via more in [2] or in [3]. The same is in [4], I think you totally see where this is going.

[1]: http://serverfault.com/questions/789244/innodb-not-really-out-of-memory/790301#790301
[2]: https://www.digitalocean.com/community/questions/mysql-server-keeps-stopping-unexpectedly
[3]: http://askubuntu.com/questions/457923/why-did-installation-of-mysql-5-6-on-ubuntu-14-04-fail/457932#457932
[4]: http://www.webtrafficexchange.com/solved-mysql-crash-fatal-error-cannot-allocate-memory-buffer-pool

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

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: http://www.ubuntu.com/support/community

Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. 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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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