[SRU] libnih upgrade does not respawn init, resulting in unclean shutdown
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libnih (Ubuntu) |
Fix Released
|
Medium
|
James Hunt | ||
Precise |
Fix Released
|
High
|
James Hunt |
Bug Description
If required package libnih1 (or libnih-dbus1) are upgraded, Upstart needs to be restarted to avoid it holding open "stale" file descriptors to files in the old versions of the packages. This results in the following issues:
- the shutdown sequence displays error messages.
- the shutdown sequence results in an unclean unmount of the root partition.
- the subsequent boot experience is slowed down and may show potentially alarming messages to users.
All this amounts to a non-optimal user experience.
See original bug 740390.
= Fix =
The fix released for quantal on bug 740390 is to add an explicit debian/
/var/
This magic file is used by /etc/init.
The magic file is already used by:
- libdbus (package dbus): recent change - see bug 740390
- libc6 (package eglibc): since 2011-01-12.
= Justification for Back-Porting =
The fix is simple and has already been released to quantal.
= Test Case =
1) Boot a Precise system without the 'quiet' and 'splash' boot options.
2) Check version of libnih1 is 1.0.3-4ubuntu9:
$ dpkg -p libnih1 libnih-dbus1|grep ^Version:
3) force a re-install of libnih1:
$ sudo apt-get install --reinstall libnih1 libnih-dbus1
4) Add a sleep to /etc/init.
--- /etc/init.
+++ /etc/init.
@@ -86,6 +86,7 @@
mount $MOUNT_FORCE_OPT -n -o remount,ro -t dummytype dummydev / 2>/dev/null \
|| mount $MOUNT_FORCE_OPT -n -o remount,ro dummydev / 2>/dev/null \
|| mount $MOUNT_FORCE_OPT -n -o remount,ro /
+ sleep 5
ES=$?
[ "$VERBOSE" = no ] || log_action_end_msg $ES
}
5) Shutdown
$ sudo shutdown -h now
6) Ensure you see the expected error message. The last 2 lines of output should be:
umount: /run/lock: not mounted
mount: / is busy
(Note that the 'umount' message is not an error - just informational).
7) Reboot again without the 'quiet' and 'splash' boot options.
8) Install libnih1 and lib-dbus1 both at version '1.0.3-4ubuntu9.1'.
9) Check that install has created the expected magic file:
ls -l /var/run/
10) Shutdown
$ sudo shutdown -h now
11) Ensure you see the expected output. The last line of output should be:
umount: /run/lock: not mounted
There should be no 'mount: / is busy' line.
12) Reboot and revert changes to /etc/init.
= Regression Potential =
No regression potential.
Related branches
Changed in libnih (Ubuntu): | |
assignee: | nobody → James Hunt (jamesodhunt) |
status: | New → In Progress |
Changed in libnih (Ubuntu Precise): | |
importance: | Undecided → Medium |
Changed in libnih (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in libnih (Ubuntu Precise): | |
status: | New → In Progress |
status: | In Progress → Triaged |
assignee: | nobody → James Hunt (jamesodhunt) |
importance: | Medium → High |
FYI, for testing, you can also do a "dmesg | grep orphan" once the machine has rebooted to see if it wasn't properly unmounted.