mysql server crashes during install/update: Error: Unable to shut down server with process id X
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-8.0 (Ubuntu) |
Fix Released
|
High
|
Lena Voytek | ||
Focal |
Fix Released
|
High
|
Lena Voytek | ||
Hirsute |
Won't Fix
|
High
|
Lena Voytek | ||
Impish |
Fix Released
|
High
|
Lena Voytek | ||
Jammy |
Fix Released
|
High
|
Lena Voytek |
Bug Description
[Impact]
When mysql is installed or updated, the post-install process will temporarily run mysqld to confirm everything is working correctly. Sometimes the shutdown process for mysqld takes longer than 1 min 6 seconds, often due to older hardware, in which case apport is triggered.
Adding this fix will allow slower systems to install mysql successfully without reporting any errors.
This is fixed by extending the shutdown timer to 3 minutes. This time was chosen based on the shutdown times of the systems from which the associated errors were reported. The average shutdown time was 1 minute 31 seconds, with a max of 2 minutes 42 seconds, excluding one outlier of 59 min 40 seconds.
This fix was released in Jammy in version 8.0.28-0ubuntu4.
[Test Plan]
# lxc launch images:
# lxc exec test-failure bash
# apt update && apt dist-upgrade -y
# apt install software-
- These PPAs reduce the shutdown timer to consistently reproduce the error shown in this bug
# add-apt-repository ppa:lvoytek/
# apt install -y mysql-server
- The following error will show up during install
mysqld is running as pid X
Error: Unable to shut down server with process id X
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
[Where problems could occur]
If there are any hidden issues that only arise a minute or more after a mysql shutdown is requested, then they would have the possibility of arising with the increased timeout.
The longer timeout can also increase install and update times which may cause issues for apt.
[Original Description]
Every time I open up my system, it shows me to report a problem.
ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: mysql-server-8.0 8.0.21-
ProcVersionSign
Uname: Linux 5.4.0-49-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Sat Oct 10 11:14:24 2020
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2019-11-23 (321 days ago)
InstallationMedia: Ubuntu 18.04.3 LTS "Bionic Beaver" - Release amd64 (20190805)
Logs.var.
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
ProcCmdline: BOOT_IMAGE=
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4
RelatedPackageV
dpkg 1.19.7ubuntu3
apt 2.0.3
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.21-
UpgradeStatus: Upgraded to focal on 2020-10-10 (0 days ago)
modified.
mtime.conffile.
Related branches
- Bryce Harrington (community): Approve
- Utkarsh Gupta (community): Needs Information
- Canonical Server: Pending requested
- Canonical Server Core Reviewers: Pending requested
-
Diff: 59 lines (+18/-5)2 files modifieddebian/changelog (+10/-0)
debian/mysql-server-8.0.postinst (+8/-5)
- Bryce Harrington (community): Approve
- Canonical Server Core Reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 43 lines (+12/-2)2 files modifieddebian/changelog (+7/-0)
debian/mysql-server-8.0.postinst (+5/-2)
- Bryce Harrington (community): Approve
- Utkarsh Gupta (community): Approve
- Canonical Server: Pending requested
- Canonical Server Core Reviewers: Pending requested
-
Diff: 59 lines (+18/-5)2 files modifieddebian/changelog (+10/-0)
debian/mysql-server-8.0.postinst (+8/-5)
tags: | removed: need-duplicate-check |
summary: |
package mysql-server-8.0 8.0.21-0ubuntu0.20.04.4 failed to - install/upgrade: installed mysql-server-8.0 package post-installation - script subprocess returned error exit status 1 + install/upgrade: can't create lock file /var/run/mysqld/mysqlx.sock.lock + (service startup timeout?) |
Changed in mysql-8.0 (Ubuntu): | |
status: | Expired → Confirmed |
Changed in mysql-8.0 (Ubuntu): | |
importance: | Undecided → High |
Changed in mysql-8.0 (Ubuntu): | |
assignee: | nobody → Lena Voytek (lvoytek) |
Changed in mysql-8.0 (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in mysql-8.0 (Ubuntu Impish): | |
assignee: | nobody → Lena Voytek (lvoytek) |
Changed in mysql-8.0 (Ubuntu Hirsute): | |
assignee: | nobody → Lena Voytek (lvoytek) |
Changed in mysql-8.0 (Ubuntu Focal): | |
assignee: | nobody → Lena Voytek (lvoytek) |
Changed in mysql-8.0 (Ubuntu Bionic): | |
assignee: | nobody → Lena Voytek (lvoytek) |
no longer affects: | mysql-8.0 (Ubuntu Bionic) |
Changed in mysql-8.0 (Ubuntu Focal): | |
status: | New → In Progress |
Changed in mysql-8.0 (Ubuntu Hirsute): | |
status: | New → In Progress |
Changed in mysql-8.0 (Ubuntu Impish): | |
status: | New → In Progress |
Changed in mysql-8.0 (Ubuntu Focal): | |
importance: | Undecided → High |
Changed in mysql-8.0 (Ubuntu Hirsute): | |
importance: | Undecided → High |
Changed in mysql-8.0 (Ubuntu Impish): | |
importance: | Undecided → High |
Changed in mysql-8.0 (Ubuntu Hirsute): | |
status: | In Progress → Won't Fix |
description: | updated |
summary: |
- package mysql-server-8.0 8.0.21-0ubuntu0.20.04.4 failed to - install/upgrade: can't create lock file /var/run/mysqld/mysqlx.sock.lock - (service startup timeout?) + mysql server crashes during install/update: Error: Unable to shut down + server with process id X |
description: | updated |
Changed in mysql-8.0 (Ubuntu Jammy): | |
status: | Fix Released → In Progress |
description: | updated |
description: | updated |
Hi,
from your logs:
Error: Unable to shut down server with process id 21763
2020-10- 10T05:35: 05.369830Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible' 10T05:35: 05.370488Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/ mysqld/ mysqlx. sock' failed, can't create lock file /var/run/ mysqld/ mysqlx. sock.lock'
2020-10-
It reminds me of a different transient issue that occurred to some users in the past.
Is this issue reproducible or does it go away on a retry of the package upgrade?
P.S. the reason it is shown "every time" might be due to an upgrade tried "every time". In that case chances are that a local config change made it unable to start but a service restart is required for an upgrade. Was there any config change that could explain that?