d-i fails to divert initctl when upgrading packages during install

Bug #900526 reported by Steve Langasek
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
debian-installer-utils (Debian)
Fix Released
Unknown
debian-installer-utils (Ubuntu)
Fix Released
High
Colin Watson
Hardy
Fix Released
High
Colin Watson
Lucid
Fix Released
High
Colin Watson
Maverick
Won't Fix
High
Colin Watson
Natty
Fix Released
High
Colin Watson
Oneiric
Fix Released
High
Colin Watson
Precise
Fix Released
High
Colin Watson

Bug Description

TEST CASE: Run a netboot installation with apt-setup/proposed=true. Watch 'ls -l /target/sbin/start-stop-daemon* /target/sbin/initctl*' after the base system is installed and ensure that there's no period when both start-stop-daemon and start-stop-daemon.REAL (similarly initctl and initctl.REAL) are non-fake versions - you can tell by the size - and that if there's an update available for dpkg or upstart that the timestamp of the relevant binaries get updated. In the hardy case, don't worry about initctl, and dpkg probably won't be upgraded but it's still worth checking that start-stop-daemon is diverted correctly.

Regression potential: Checking whether installs with apt-setup/proposed=true work should be sufficient.

Original report follows:

The SRU verification for bug #771372 in maverick has revealed that debian-installer's chroot setup handling when installing/upgrading packages at install time is different than the chroot setup used by debootstrap. When initially bootstrapping a maverick system, the postinst script of the maverick procps package has its call to 'start' successfully intercepted; however, when *upgrading* the procps package after debootstrap, the start call is not intercepted, resulting in install failures.

Since this is impossible to fix in the maverick installer post-release, I'll backport the fix for bug #602896 in a subsequent procps SRU; but investigation is needed here to find out why d-i isn't handling initctl correctly and make sure this is properly resolved for precise.

15:03 < cjwatson> chroot-setup.sh is supposed to divert initctl too
15:08 < cjwatson> slangasek: There is something odd there, indeed. I don't quite see what; visually, the code seems right
15:08 < slangasek> cjwatson: should I raise a bug on debian-installer?
15:08 < cjwatson> slangasek: yes please
15:09 < slangasek> ok
15:09 < cjwatson> (probably belongs on either pkgsel or debian-installer-utils, but debian-installer is the place to start)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: debian-installer (not installed)
ProcVersionSignature: Ubuntu 3.2.0-2.6-generic 3.2.0-rc3
Uname: Linux 3.2.0-2-generic x86_64
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Mon Dec 5 15:19:29 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
MachineType: LENOVO 3249CTO
MemoryUsage:
 total used free shared buffers cached
 Mem: 3908928 3711928 197000 0 101976 1062528
 -/+ buffers/cache: 2547424 1361504
 Swap: 6291452 257140 6034312
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.2.0-2-generic root=/dev/mapper/hostname-root ro pcie_aspm=force quiet splash vt.handoff=7
SourcePackage: debian-installer
UpgradeStatus: Upgraded to precise on 2011-11-08 (27 days ago)
dmi.bios.date: 08/23/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 6QET52WW (1.22 )
dmi.board.name: 3249CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr6QET52WW(1.22):bd08/23/2010:svnLENOVO:pn3249CTO:pvrThinkPadX201:rvnLENOVO:rn3249CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 3249CTO
dmi.product.version: ThinkPad X201
dmi.sys.vendor: LENOVO

Revision history for this message
Steve Langasek (vorlon) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

"high" because there's the possibility of other future SRUs causing the installer to regress post-release if this isn't pinned down.

Changed in debian-installer (Ubuntu Precise):
importance: Undecided → High
Colin Watson (cjwatson)
Changed in debian-installer (Ubuntu Precise):
assignee: nobody → Colin Watson (cjwatson)
milestone: none → precise-alpha-2
Colin Watson (cjwatson)
Changed in debian-installer (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

Light dawns.

chroot-setup.sh does indeed move aside /sbin/initctl. However, it doesn't divert it! Therefore, if upstart is upgraded, it will put a real initctl back. In this case, upstart is upgraded before procps, hence the bug.

Alarmingly, this means that in such cases the resulting system will end up with an upgraded version of upstart according to dpkg but will in fact have an old initctl binary, because d-i will have saved initctl from the start of its internal upgrade process and then put it back at the end. Therefore, we need to fix this bug rather urgently for all supported releases.

affects: debian-installer (Ubuntu Precise) → debian-installer-utils (Ubuntu Precise)
Changed in debian-installer-utils (Ubuntu Precise):
status: Confirmed → Triaged
Changed in debian-installer-utils (Ubuntu Hardy):
status: New → Triaged
Changed in debian-installer-utils (Ubuntu Lucid):
status: New → Triaged
Changed in debian-installer-utils (Ubuntu Maverick):
status: New → Triaged
Changed in debian-installer-utils (Ubuntu Natty):
status: New → Triaged
Changed in debian-installer-utils (Ubuntu Oneiric):
status: New → Triaged
Changed in debian-installer-utils (Ubuntu Hardy):
importance: Undecided → High
Changed in debian-installer-utils (Ubuntu Lucid):
importance: Undecided → High
Changed in debian-installer-utils (Ubuntu Maverick):
importance: Undecided → High
Changed in debian-installer-utils (Ubuntu Natty):
importance: Undecided → High
Changed in debian-installer-utils (Ubuntu Oneiric):
importance: Undecided → High
Changed in debian-installer-utils (Ubuntu Hardy):
assignee: nobody → Colin Watson (cjwatson)
Changed in debian-installer-utils (Ubuntu Lucid):
assignee: nobody → Colin Watson (cjwatson)
Changed in debian-installer-utils (Ubuntu Maverick):
assignee: nobody → Colin Watson (cjwatson)
Changed in debian-installer-utils (Ubuntu Natty):
assignee: nobody → Colin Watson (cjwatson)
Changed in debian-installer-utils (Ubuntu Oneiric):
assignee: nobody → Colin Watson (cjwatson)
Changed in debian-installer-utils (Ubuntu Lucid):
milestone: none → ubuntu-10.04.4
Changed in debian-installer-utils (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package debian-installer-utils - 1.88ubuntu1

---------------
debian-installer-utils (1.88ubuntu1) precise; urgency=low

  * Resynchronise with Debian (diversion change fixes LP: #900526).
    Remaining changes:
    - user-params: Don't propagate vga=*, break=*, *-ubiquity, or
      noninteractive to installed system.
    - Use /proc/self/fd/4 rather than /dev/fd/4 in fetch-url-methods/http;
      the latter doesn't seem to exist in d-i.
    - list-devices: new "mmc-partition" type for detecting partitions on MMC
      devices.
    - Don't include the battery subsystem on calls to udevadm trigger.

debian-installer-utils (1.88) unstable; urgency=low

  [ Colin Watson ]
  * chroot_setup.sh: Divert start-stop-daemon and initctl rather than simply
    moving them aside (closes: #654580).

  [ Updated translations ]
  * Icelandic (is.po) by Sveinn í Felli
  * Kannada (kn.po) by Prabodh C P
 -- Colin Watson <email address hidden> Wed, 04 Jan 2012 14:36:47 +0000

Changed in debian-installer-utils (Ubuntu Precise):
status: Triaged → Fix Released
Colin Watson (cjwatson)
description: updated
Colin Watson (cjwatson)
Changed in debian-installer-utils (Ubuntu Hardy):
status: Triaged → In Progress
Changed in debian-installer-utils (Ubuntu Lucid):
status: Triaged → In Progress
Changed in debian-installer-utils (Ubuntu Maverick):
status: Triaged → In Progress
Colin Watson (cjwatson)
Changed in debian-installer-utils (Ubuntu Natty):
status: Triaged → In Progress
Changed in debian-installer-utils (Ubuntu Oneiric):
status: Triaged → In Progress
Changed in debian-installer-utils (Debian):
status: New → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Steve, or anyone else affected,

Accepted debian-installer-utils into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in debian-installer-utils (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Steve, or anyone else affected,

Accepted debian-installer-utils into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in debian-installer-utils (Ubuntu Oneiric):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Steve, or anyone else affected,

Accepted debian-installer-utils into hardy-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in debian-installer-utils (Ubuntu Hardy):
status: In Progress → Fix Committed
Changed in debian-installer-utils (Ubuntu Natty):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Steve, or anyone else affected,

Accepted debian-installer-utils into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Martin Pitt (pitti) wrote :

Does it really make much sense to fix this for maverick? It's three months before EOL, and there won't be too many new installations for it any more..

Revision history for this message
Martin Pitt (pitti) wrote :

No response in a bit, setting to wontfix and rejecting. Please yell if you disagree.

Changed in debian-installer-utils (Ubuntu Maverick):
status: In Progress → Won't Fix
Revision history for this message
Martin Pitt (pitti) wrote :

Can anyone please try the current lucid dailies to verify that this is fixed? http://cdimage.ubuntu.com/lucid/

We need to do this in the next few days to get this fix into 10.04.4.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I installed the latest netboot image.
I attached 2 screenshots:
1. just after the base system is installed. It shows start-stop-daemon (94 bytes), start-stop-daemon.REAL (28028 bytes), initctl (84bytes), initctl.REAL (114056 bytes) and dpkg (418216bytes April 15)
2. During installation after selection of "base server". It shows start-stop-daemon (94 bytes), start-stop-daemon.REAL (28028 bytes), initctl (84 bytes), initctl.REAL (114056 bytes) and dpkg (418216bytes Jan. 6)

Steve, Colin could you interpret these results or is there any additional information I can provide ?

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

One more detail, it is a Lucid netboot installation

Revision history for this message
Steve Langasek (vorlon) wrote :

Jean-Baptiste, can you also confirm that, as part of the base server install, an upgraded version of the upstart package was pulled in? (Just to make sure /sbin/initctl is unmodified simply because there was no update)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

The version of upstart installed is 0.6.5-8 from lucid-updates

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package debian-installer-utils - 1.72ubuntu5.2

---------------
debian-installer-utils (1.72ubuntu5.2) lucid-proposed; urgency=low

  [ Scott Moser ]
  * Add --quiet to dpkg-divert calls in chroot_setup.

debian-installer-utils (1.72ubuntu5.1) lucid-proposed; urgency=low

  * chroot_setup.sh: Divert start-stop-daemon and initctl rather than simply
    moving them aside (LP: #900526).
 -- Colin Watson <email address hidden> Fri, 06 Jan 2012 12:25:41 +0000

Changed in debian-installer-utils (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Resetting verification tags for the other releases.

tags: added: verification-done-lucid verification-needed
removed: verification-done
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you confirm that the fix works for you so the update can be moved out of staging?

Colin Watson (cjwatson)
tags: added: verification-done-hardy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package debian-installer-utils - 1.50ubuntu6

---------------
debian-installer-utils (1.50ubuntu6) hardy-proposed; urgency=low

  [ Scott Moser ]
  * Add --quiet to dpkg-divert calls in chroot_setup.

debian-installer-utils (1.50ubuntu5) hardy-proposed; urgency=low

  * chroot_setup.sh: Divert start-stop-daemon rather than simply moving it
    aside (LP: #900526).
 -- Colin Watson <email address hidden> Fri, 06 Jan 2012 12:23:00 +0000

Changed in debian-installer-utils (Ubuntu Hardy):
status: Fix Committed → Fix Released
Colin Watson (cjwatson)
tags: added: verification-done-natty
Revision history for this message
Colin Watson (cjwatson) wrote :

Verified for all of hardy, natty, and oneiric.

tags: added: verification-done
removed: verification-done-hardy verification-done-lucid verification-done-natty verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package debian-installer-utils - 1.82ubuntu1.2

---------------
debian-installer-utils (1.82ubuntu1.2) natty-proposed; urgency=low

  [ Scott Moser ]
  * Add --quiet to dpkg-divert calls in chroot_setup.

debian-installer-utils (1.82ubuntu1.1) natty-proposed; urgency=low

  * chroot_setup.sh: Divert start-stop-daemon and initctl rather than simply
    moving them aside (LP: #900526).
 -- Colin Watson <email address hidden> Fri, 06 Jan 2012 12:29:11 +0000

Changed in debian-installer-utils (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package debian-installer-utils - 1.84ubuntu1.2

---------------
debian-installer-utils (1.84ubuntu1.2) oneiric-proposed; urgency=low

  [ Scott Moser ]
  * Add --quiet to dpkg-divert calls in chroot_setup.

debian-installer-utils (1.84ubuntu1.1) oneiric-proposed; urgency=low

  * chroot_setup.sh: Divert start-stop-daemon and initctl rather than simply
    moving them aside (LP: #900526).
 -- Colin Watson <email address hidden> Fri, 06 Jan 2012 12:30:44 +0000

Changed in debian-installer-utils (Ubuntu Oneiric):
status: Fix Committed → Fix Released
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.