upstart crashes if re-exec'ed with active chroot sessions

Bug #1199778 reported by James Hunt on 2013-07-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
High
James Hunt
upstart (Ubuntu)
High
Dimitri John Ledkov
Raring
Undecided
Unassigned
Saucy
High
Dimitri John Ledkov

Bug Description

Problem affects both 1.9 and 1.9.1.

Related branches

James Hunt (jamesodhunt) on 2013-07-10
Changed in upstart:
importance: Undecided → High
assignee: nobody → James Hunt (jamesodhunt)
affects: ubuntu → upstart (Ubuntu)
James Hunt (jamesodhunt) on 2013-07-10
Changed in upstart (Ubuntu):
importance: Undecided → High
James Hunt (jamesodhunt) wrote :

This problem affects those systems hosting chroots but also affects those with sbuild/pbuilder installed. The failure process is as follows:

- user builds a package in the sbuild/pbuilder env.
- upstart gets updated within the sbuild/pbuilder chroot as part of the package build.
- as part of the upgrade, the Upstart maintainer script gets called which calls "initctl version" crucially *before* ischroot gets
  called.
- at this stage an upstart session now exists for the chroot on the host system.
- the version of upstart gets upgraded on the host system (*)
- the upgrade triggers a stateful re-exec.
- seemingly on deserialisation, if sessions exist in the meta-data, a crash results.

James Hunt (jamesodhunt) wrote :

Correction to the process above: a session only gets created when a job is queried so a maintainer script is probably invoking status/start/stop/restart.

James Hunt (jamesodhunt) wrote :

Failure message, for reference:

conf.c:1510: Assertion failed in conf_source_deserialise_all: NIH_LIST_EMPTY (conf_sources)

Changed in upstart:
status: New → In Progress
Changed in upstart (Ubuntu):
status: New → In Progress
assignee: nobody → Dmitrijs Ledkovs (xnox)
Changed in upstart:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upstart - 1.9.1-0ubuntu2

---------------
upstart (1.9.1-0ubuntu2) saucy; urgency=low

  [ Dmitrijs Ledkovs ]
  * Upload to saucy.

  [ James Hunt ]
  * Fix stateful re-exec with active chroot sessions (LP: #1199778)

  [ Colin Watson ]
  * Alternatively try new and old pkg-config names for json-c library.
 -- Dmitrijs Ledkovs <email address hidden> Thu, 18 Jul 2013 10:56:31 +0100

Changed in upstart (Ubuntu Saucy):
status: In Progress → Fix Released
Adam Conrad (adconrad) wrote :

This is still happening with 1.9.1-0ubuntu2. Trivial reproducer:

15:10 < infinity> schroot (with overlay)
15:10 < infinity> initctl show-config (in chroot)
15:10 < infinity> exit chroot
15:10 < infinity> sudo telinit u
15:10 < infinity> Boom.
15:10 < infinity> Not 100%, though. I had to try a few times.

Changed in upstart (Ubuntu Saucy):
status: Fix Released → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upstart - 1.9.1-0ubuntu3

---------------
upstart (1.9.1-0ubuntu3) saucy; urgency=low

  * Fix stateful re-exec with multiple stale chroot sessions (LP: #1199778)
 -- Dmitrijs Ledkovs <email address hidden> Sat, 20 Jul 2013 00:17:07 +0100

Changed in upstart (Ubuntu Saucy):
status: In Progress → Fix Released
Changed in upstart:
status: Fix Committed → Fix Released
Steve Langasek (vorlon) wrote :

I took a stab at fixing this by cherry-picking, but was hitting segfaults in the test suite and ran out of time to resolve this. Now that 13.10 is out, it's even more unlikely that I'll have time to get to it. So I'm marking this bug as 'wontfix'. I've pushed my work-in-progress branch to lp:~vorlon/ubuntu/raring/upstart/lp.1199778 in case anyone else wants to pick this up for 13.04.

Changed in upstart (Ubuntu Raring):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers