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

Launchpad Bug Tracker 245728 at bugs.launchpad.net
Fri Feb 15 17:27:19 UTC 2013


You have been subscribed to a public bug by eraserix (eraserix):

[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.

** Affects: runit (Ubuntu)
     Importance: Medium
         Status: Fix Released

** Affects: runit (Ubuntu Precise)
     Importance: Medium
         Status: Confirmed


** Tags: patch
-- 
runit doesn't stop and /var isn't umounted on shutdown
https://bugs.launchpad.net/bugs/245728
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list