init: post-start can cause respawn to hang
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
Triaged
|
Medium
|
Unassigned | ||
mysql-5.1 (Ubuntu) |
Invalid
|
High
|
Unassigned | ||
Lucid |
Invalid
|
Undecided
|
Unassigned | ||
Natty |
Invalid
|
High
|
Unassigned | ||
Oneiric |
Invalid
|
High
|
Unassigned | ||
Precise |
Invalid
|
High
|
Unassigned | ||
mysql-5.5 (Ubuntu) |
Fix Released
|
High
|
Clint Byrum | ||
Lucid |
Invalid
|
Undecided
|
Unassigned | ||
Natty |
Invalid
|
Undecided
|
Unassigned | ||
Oneiric |
Invalid
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
High
|
Clint Byrum | ||
mysql-dfsg-5.1 (Ubuntu) |
Invalid
|
High
|
Unassigned | ||
Lucid |
Won't Fix
|
High
|
Unassigned | ||
Natty |
Invalid
|
Undecided
|
Unassigned | ||
Oneiric |
Invalid
|
Undecided
|
Unassigned | ||
Precise |
Invalid
|
High
|
Unassigned | ||
upstart (Ubuntu) |
Triaged
|
Medium
|
James Hunt | ||
Lucid |
Won't Fix
|
Undecided
|
Unassigned | ||
Natty |
Won't Fix
|
Undecided
|
Unassigned | ||
Oneiric |
Won't Fix
|
Undecided
|
Unassigned | ||
Precise |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
== SRU Justification ==
= IMPACT =
Users who have inadvertently broken their mysql configuration will be met with a hung package upgrade process on any updates, and no easy way to see that fact.
= TEST CASE: =
1. sudo apt-get install mysql-server
2. edit /etc/mysql/my.cnf and add an invalid variable to the [mysqld] section
3. sudo apt-get --reinstall install mysql-server - affected system will hang forever on the 'start' of mysql
4. in another terminal, verify status of mysql job is 'start/respawn'
5. in that second terminal, run 'sudo stop mysql'
6. first terminal should now be "unlocked"
7. install updated package
8. install should error out or move on quietly after trying to start mysql, but not hang indefinitely.
= Dev Fix =
This was fixed in the 5.5 packages by making sure that in the post-start if the job is in 'respawn' that the post-start is aborted immediately.
= REGRESSION POTENTIAL =
Its possible that this code will cause some systems to error out where they would keep retrying forever. This might be particularly problematic in systems that use configuration management like puppet or chef, where they would boot the system, and then run the config management to apply the correct configs.
========
I believe that it is looking for some input when updating mysql. The updating just stops when mysql is being updated. There is no dialog box to be found. This has happened to me several times on different computers.
ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: mysql-server-5.1 5.1.41-3ubuntu12.9
ProcVersionSign
Uname: Linux 2.6.32-27-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Tue Feb 1 18:32:38 2011
ErrorMessage: subprocess installed post-installation script killed by signal (Terminated)
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
SourcePackage: mysql-dfsg-5.1
Title: package mysql-server-5.1 5.1.41-3ubuntu12.9 failed to install/upgrade: subprocess installed post-installation script killed by signal (Terminated)
mtime.conffile.
Related branches
summary: |
- mysql update fails waiting for upstart job to respawn + init: post-start can cause respawn to hang |
Changed in upstart: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in mysql-5.1 (Ubuntu): | |
status: | New → Triaged |
Changed in mysql-5.5 (Ubuntu): | |
status: | New → Triaged |
Changed in mysql-5.1 (Ubuntu): | |
importance: | Undecided → Low |
Changed in mysql-5.5 (Ubuntu): | |
importance: | Undecided → Low |
Changed in mysql-5.1 (Ubuntu Lucid): | |
status: | New → Invalid |
Changed in mysql-5.1 (Ubuntu Precise): | |
status: | Triaged → Invalid |
Changed in mysql-5.5 (Ubuntu Precise): | |
status: | In Progress → Fix Committed |
Changed in mysql-dfsg-5.1 (Ubuntu Precise): | |
status: | Triaged → Invalid |
Changed in mysql-dfsg-5.1 (Ubuntu Lucid): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in mysql-5.1 (Ubuntu Oneiric): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in mysql-5.1 (Ubuntu Natty): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in mysql-dfsg-5.1 (Ubuntu Natty): | |
status: | New → Invalid |
Changed in mysql-dfsg-5.1 (Ubuntu Oneiric): | |
status: | New → Invalid |
tags: | added: precise rls-mgr-p-tracking |
description: | updated |
Changed in mysql-5.5 (Ubuntu Lucid): | |
status: | Confirmed → Invalid |
Changed in mysql-5.5 (Ubuntu Natty): | |
status: | Confirmed → Invalid |
Changed in mysql-5.5 (Ubuntu Oneiric): | |
status: | Confirmed → Invalid |
description: | updated |
Changed in upstart (Ubuntu): | |
assignee: | nobody → James Hunt (jamesodhunt) |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in upstart (Ubuntu Lucid): | |
status: | New → Won't Fix |
Changed in upstart (Ubuntu Natty): | |
status: | New → Won't Fix |
Changed in upstart (Ubuntu Oneiric): | |
status: | New → Won't Fix |
Changed in upstart (Ubuntu Precise): | |
importance: | Undecided → Medium |
status: | New → Triaged |
I can confirm this behavior. To reproduce, I did: lucid-10. 04-amd64- server- 20110201. 1) d/usr.sbin. mysqld, adding hashes to the two lines below: core-5. 1 (5.1.41- 3ubuntu12. 9) ... 3ubuntu12. 9) ... mysql.conf ...
* launch ec2 instance (ami-fa01f193 us-east-1 ubuntu-
* disable lucid-updates
* sudo apt-get update && sudo apt-get install mysql-server-5.1
* modify /etc/apparmor.
# /var/lib/mysql/ r,
# /var/lib/mysql/** rwk,
* enable -updates
* sudo apt-get update && sudo apt-get dist-upgrade
* system hangs on:
Setting up mysql-server-
Setting up mysql-server-5.1 (5.1.41-
Installing new version of config file /etc/init/
These 4 processes are running: core-5. 1 mysql-client-5.1 mysql-server- core-5. 1 mysql-server-5.1 debconf/ frontend /var/lib/ dpkg/info/ mysql-server- 5.1.postinst configure 5.1.41-3ubuntu12.7 dpkg/info/ mysql-server- 5.1.postinst configure 5.1.41-3ubuntu12.7
7476 pts/2 Ss+ 0:00 /usr/bin/dpkg --status-fd 14 --configure libmysqlclient16 mysql-client-
7486 pts/2 S+ 0:00 /usr/bin/perl -w /usr/share/
7496 pts/2 S+ 0:00 /bin/bash -e /var/lib/
7703 pts/2 S+ 0:00 start mysql
because you commented out the lines in the config file, mysql cannot access /var/lib/mysql. I suspect you have app armour messages in your dmesg indicating this.
I'm not sure if I should call this bug invalid or confirmed.