[Bug 245728] Re: runit doesn't stop and /var isn't umounted on shutdown

Brian Murray brian at ubuntu.com
Wed Feb 27 21:22:39 UTC 2013


I'll go ahead and upload this to the precise-proposed queue for the SRU
team to review but bugs 315541 and 539567 will both also need test cases
for the SRU to proceed.

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/245728

Title:
  runit doesn't stop and /var isn't umounted on shutdown

Status in “runit” package in Ubuntu:
  Fix Released
Status in “runit” source package in Precise:
  Confirmed

Bug description:
  [Impact]
  Runit does not properly terminate the services it supervises, it just leaves them running. This can lead to files being open during unmount and with that dirty filesystems on the next reboot.

  A minor annoyance is that postinst prints errors during installation
  because it tries to grep an inexistent file.

  [Test Case]
  1. Install runit from a purged state (e.g. dpkg -P runit; apt-get install runit). Observe the errors from postinst: grep: /etc/inittab: No such file or directory
  2. Add the directory test to /etc/service.
  3. Add a script called 'run' and a script called 'finish' to this directory. Add a line 'echo run > /test; sleep 10000' and 'echo finish > /test' to run and finish respectively, then make them executable.
  4. When run is marked executable, runsvdir will start it, check with pstree -a to see the runsvdir process tree and run somewhere beneath. Observe that /test contains 'run'.
  5. Execute the command 'stop runsvdir', which will shutdown the runit service.
  6. Observe that pstree -a will still show runsv to be running, only the parent runsvdir process has been terminated. Also observe that /test will not contain 'finish', which means that runsv has never been told that runsvdir is going to terminate.

  runsvdir expects SIGHUP to correctly shutdown all supervised services.
  Upstart sends SIGTERM by default, which causes runsvdir to exit
  immediately without cleaning up supervised processes.

  [Regression potential]
  IMO small, unless someone came to rely on the broken behaviour.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/runit/+bug/245728/+subscriptions



More information about the Ubuntu-sponsors mailing list