svscan (the upstart job) doesn't stop on shutdown

Bug #665176 reported by danmb
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
daemontools (Ubuntu)
Fix Released
Undecided
Neil Wilson

Bug Description

Binary package hint: daemontools

My system never manages clean unmounts of / (resulting in permanent fsck's on reboot). I spawned a shell from /etc/init.d/umountroot, and discovered that the svscanboot process and its children were still alive.

By replacing in /etc/init/svscan.conf

start on runlevel [123456]
stop on shutdown

with

start on runlevel [2345]
stop on runlevel [^2345]

the leftover processes go away. svscan.conf seems to be the only upstart job to use the stanza "stop on shutdown", or request to be started in levels 1 and 6.

My normal runlevel is 2.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: daemontools 1:0.76-3ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-25.45-generic 2.6.32.21+drm33.7
Uname: Linux 2.6.32-25-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Fri Oct 22 18:47:00 2010
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: daemontools

Revision history for this message
danmb (danmbox) wrote :
Neil Wilson (neil-aldur)
Changed in daemontools (Ubuntu):
assignee: nobody → Neil Wilson (neil-aldur)
Revision history for this message
danmb (danmbox) wrote :

I have a fixed version in my PPA,

https://launchpad.net/~danmbox/+archive/ppa/

Attaching debdiff against that version. This is a trivial change, but from what I can see Ubuntu is very selectively maintained, and providing a patch makes it slightly more likely that a maintainer will act.

Again, please note that this bug breaks shutdown, leading to unclean filesystems, fsck and thus possibly an increased chance of data corruption.

tags: added: patch
Revision history for this message
Antony Riley (antony-cyberiantiger) wrote :

Please fix asap, I've had to reinstall a system 3 times (after hard disk corruption caused by this bug) before I realized that restarting was causing disk corruption and it wasn't one of the more common causes like bad memory or bad disks.

Revision history for this message
danmb (danmbox) wrote :

If you're seeing data corruption due to shutdown, see also this bug:

https://bugs.launchpad.net/ubuntu/maverick/+source/sysvinit/+bug/665185

(again there is a fixed version in my PPA, and Ubuntu will also soon provide a Lucid update)

Revision history for this message
Daniel T Chen (crimsun) wrote :

I suspect the desired semantics are:
...
start on filesystem
stop on runlevel [06]
...

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package daemontools - 1:0.76-3ubuntu3

---------------
daemontools (1:0.76-3ubuntu3) oneiric; urgency=low

  * Fix upstart job to properly start and stop svscan on appropriate
    runlevels (based on a patch from Dan Muresan). (LP: #665176)
 -- Daniel T Chen <email address hidden> Thu, 28 Jul 2011 08:30:15 -0400

Changed in daemontools (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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