** Description changed:

- Binary package hint: runit
+ [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.
  
- What happens:
-   On shutdown, /var isn't umounted. It says it tries but that processes are 
still using files on /var.
+ A minor annoyance is that postinst prints errors during installation
+ because it tries to grep an inexistent file.
  
- What I expected:
-   /var should umount on shutdown.
+ [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.
  
- Notes:
+ 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.
  
- I tracked this down to runit not exiting correctly.  upstart seems to
- just nuke runsvdir, but the individual runsv processes are still
- running, as are the processes they monitor/manage.
- 
- According to the man page for runsvdir, it needs to be sent HUP not TERM
- to shut down cleanly.
- 
- Ciao!
+ [Regression potential]
+ IMO small, unless someone came to rely on the broken behaviour.

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

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

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to