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

Bug #1199778 reported by James Hunt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
Fix Released
High
James Hunt
upstart (Ubuntu)
Fix Released
High
Dimitri John Ledkov
Raring
Won't Fix
Undecided
Unassigned
Saucy
Fix Released
High
Dimitri John Ledkov

Bug Description

Problem affects both 1.9 and 1.9.1.

Related branches

James Hunt (jamesodhunt)
Changed in upstart:
importance: Undecided → High
assignee: nobody → James Hunt (jamesodhunt)
affects: ubuntu → upstart (Ubuntu)
James Hunt (jamesodhunt)
Changed in upstart (Ubuntu):
importance: Undecided → High
Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.