mysql upgrade hang at 'installing new version of config file /etc/init/mysql.conf' during upgrade from 10.10 to 11.04

Bug #727478 reported by Jean-Baptiste Lallement on 2011-03-01
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mythbuntu
Invalid
Undecided
Unassigned
apparmor (Ubuntu)
High
John Johansen
Natty
High
John Johansen
mysql-5.1 (Ubuntu)
High
Unassigned
Natty
High
Unassigned

Bug Description

ISO Testing: Ubuntu Server i386/amd64 20110301

During the upgrade from 10.10 to 11.04 MySQL hangs at 'Installing new version of config file /etc/init/mysql.conf'

The following message is repeated in the logs:
Mar 1 23:27:07 ubuntu kernel: [ 1156.610526] type=1400 audit(1299018427.307:19): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=27275 comm="apparmor_parser"
Mar 1 23:27:07 ubuntu kernel: [ 1156.831775] type=1400 audit(1299018427.537:20): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=27299 comm="apparmor_parser"
Mar 1 23:27:07 ubuntu kernel: [ 1156.950371] type=1400 audit(1299018427.657:21): apparmor="DENIED" operation="create" parent=1 profile="/usr/sbin/mysqld" pid=27303 comm="mysqld" family="inet" sock_type="stream" protocol=0
Mar 1 23:27:12 ubuntu init: mysql main process (27303) terminated with status 1
Mar 1 23:27:12 ubuntu init: mysql main process ended, respawning
Mar 1 23:27:37 ubuntu init: mysql post-start process (27304) terminated with status 1
Mar 1 23:27:37 ubuntu kernel: [ 1187.202892] type=1400 audit(1299018457.907:22): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=27378 comm="apparmor_parser"
Mar 1 23:27:37 ubuntu kernel: [ 1187.281457] type=1400 audit(1299018457.987:23): apparmor="DENIED" operation="create" parent=1 profile="/usr/sbin/mysqld" pid=27382 comm="mysqld" family="inet" sock_type="stream" protocol=0
Mar 1 23:27:43 ubuntu init: mysql main process (27382) terminated with status 1
Mar 1 23:27:43 ubuntu init: mysql main process ended, respawning

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: mysql-server (not installed)
ProcVersionSignature: Ubuntu 2.6.38-5.32-generic 2.6.38-rc6
Uname: Linux 2.6.38-5-generic i686
Architecture: i386
Date: Tue Mar 1 23:49:29 2011
EcryptfsInUse: Yes
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: mysql-5.1
UpgradeStatus: Upgraded to natty on 2011-02-21 (8 days ago)

Related branches

Jean-Baptiste Lallement (jibel) wrote :
Changed in mysql-5.1 (Ubuntu):
status: New → Confirmed
assignee: nobody → Jamie Strandboge (jdstrand)
Changed in mysql-5.1 (Ubuntu Natty):
importance: Undecided → Medium
tags: added: iso-testing
Jamie Strandboge (jdstrand) wrote :

From IRC:

17:00 < jdstrand> jibel: is this a stock configuration?
17:01 < jibel> jdstrand, yes, fresh 10.10 LAMP + ssh, dist-upgrade, reboot, do-release-upgrade.

Jamie Strandboge (jdstrand) wrote :

I can confirm this.

Jamie Strandboge (jdstrand) wrote :

So, during the upgrade, mysql does get 'stuck' on:
Setting up mysql-client-5.1 (5.1.54-1ubuntu4) ...
Setting up mysql-server-5.1 (5.1.54-1ubuntu4) ...
Installing new version of config file /etc/init/mysql.conf ...

The upstart job keeps running the pre-start script every 30 seconds, but no change to the profile makes this go away. In fact, the profile should be good enough as is:
$ sudo apparmor_parser -p /etc/apparmor.d/usr.sbin.mysqld |grep network
  network inet stream,
  network inet6 stream,
  network inet dgram,
  network inet6 dgram,
  network tcp,

This seems like a maverick kernel vs natty apparmor userspace issue.

tags: added: apparmor
Jamie Strandboge (jdstrand) wrote :

This is not mysql problem, but most likely apparmor.

Changed in apparmor (Ubuntu Natty):
assignee: nobody → John Johansen (jjohansen)
status: New → Confirmed
Changed in mysql-5.1 (Ubuntu Natty):
assignee: Jamie Strandboge (jdstrand) → nobody
importance: Medium → High
status: Confirmed → Invalid
Changed in apparmor (Ubuntu Natty):
importance: Undecided → High
Jamie Strandboge (jdstrand) wrote :

I've marked this as alpha-3 for now, but per discussion in #ubuntu-release, it is not required for the CD images and we will try to get this uploaded before the alpha 3 announcement.

Changed in apparmor (Ubuntu Natty):
milestone: none → natty-alpha-3
Martin Pitt (pitti) on 2011-03-02
Changed in apparmor (Ubuntu Natty):
milestone: natty-alpha-3 → ubuntu-11.04-beta-1
Dave Walker (davewalker) wrote :

Just a note, this is also breaking Mythbuntu. Thanks.

Changed in mythbuntu:
status: New → Confirmed
Changed in apparmor (Ubuntu Natty):
status: Confirmed → Triaged
Jamie Strandboge (jdstrand) wrote :

The problem is that there is an off-by-one bug in the maverick kernel (already fixed in natty) for when apparmor userspace is compiled against a newer kernel with more AF entries than the kernel that apparmor_paser is bing run on. The options are to SRU a maverick kernel to fix the bug or to adjust the apparmor_parser in natty to do a kernel version check, and cap the number of AF entries appropriately. Since this could affect more than just Ubuntu, and because this only affects upgrades (ie, newer apparmor userspace compiled on maverick is just fine), it has been decided that the second option will be used, and the patch is currently under development.

Jamie Strandboge (jdstrand) wrote :

While Mythbuntu may be affected, this fix is with apparmor in Ubuntu, so marking as 'Invalid'.

Changed in apparmor (Ubuntu Natty):
status: Triaged → In Progress
Changed in mythbuntu:
status: Confirmed → Invalid
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apparmor - 2.6.0-0ubuntu2

---------------
apparmor (2.6.0-0ubuntu2) natty; urgency=low

  * debian/patches/0002-lp727478.patch: Override AF_MAX for kernels that don't
    support proper masking. Patch thanks to John Johansen (LP: #727478)
  * debian/patches/0003-test-lp727478.patch: add tcp.sh test as partial
    networking test
 -- Jamie Strandboge <email address hidden> Thu, 03 Mar 2011 16:40:08 -0600

Changed in apparmor (Ubuntu Natty):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments