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

Bug #1653900 reported by Gary
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Was busy with a do-release-upgrade when this happened

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.16-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 3.13.0-27.50-generic 3.13.11
Uname: Linux 3.13.0-27-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.4
Architecture: amd64
Date: Wed Jan 4 07:30:22 2017
ErrorMessage: subprocess installed post-installation script returned error exit status 137
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: ['mysql_upgrade_info', 'ib_logfile1', 'debian-5.7.flag', 'mysql', 'performance_schema', 'debian-5.5.flag', 'ibdata1', 'ib_logfile0', 'elaquintnails']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-3.13.0-27-generic root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyS0
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.15ubuntu0.2
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.16-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 137
UpgradeStatus: Upgraded to xenial on 2017-01-04 (0 days ago)

Revision history for this message
Gary (gary-quinn) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Gary,
thank you for your report and your help to make Ubuntu better.

From the log:
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 16: 32700 Killed mysqld --user=mysql --init-file="$1" --socket="$tmpdir/mysqld.sock" --pid-file="$tmpdir/mysqld.pid" > /dev/null 2>&1
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 137

There are issues in the mysql error log:
  I see that already exists "ERROR: 1050 Table 'plugin' already exists"
  But that is a known issue (https://bugs.mysql.com/bug.php?id=80642) and the postinst handles that with a || true

The code path is also used to set a PW if set via debconf (not in your upgrade case I'd think).

And finally to alter the user after auth_socket plugin is installed.
I'd assume that the code got killed while executing those:
      USE mysql;"
      ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket';"
      # Bug: http://bugs.mysql.com/bug.php?id=80632
      UPDATE user SET password_expired='N', account_locked='N' WHERE user='root';"
      FLUSH PRIVILEGES;"
      SHUTDOWN;"
      run_init_sql "$initfile" <- runs the commands above.

But the mysql log has only valid shutdowns later on.
So the question is what killed the call to mysql in your case.

I beg a pardon, do you have any other data what happened while upgrading.
Did other than that your do-release-upgrade finish and if so is mysql now properly working.
Is a new upgrade (or install --reinstall) of mysql-server-5.7 working for you now?

Changed in mysql-5.7 (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel Black (daniel-black) wrote :

fixed 5.7.12 according to https://bugs.mysql.com/bug.php?id=79999

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.