Comment 4 for bug 963106

Steven Farmer (stevenleefarmer) wrote :

Clint, I don't see the dhclient process die when network-manager is stopped. But I think I was guilty of some fuzzy thinking in saying that the problem is due to the pid file being held open; the problem is that the dhclient pid file isn't deleted from /var/run/sendsigs.omit.d (so /etc/init.d/sendsigs doesn't kill dhclient at shutdown time) *and* dhclient has a dhcp lease file open for write. The following should (I hope) show what I'm talking about:

$ ps auxw | grep NetworkManager | grep -v grep # NetworkManager and dhclient are both running
$ ls /var/run/sendsigs.omit.d # there are pid files for both dhclient and dnsmasq
$ sudo stop network-manager
$ ps auxw | grep NetworkManager | grep -v grep # now only dhclient is still running
$ ls /var/run/sendsigs.omit.d # and the dhclient pid file is still there
$ sudo lsof -c dhclient | grep lease # dhclient still has a lease file open for write

Because sendsigs won't kill dhclient and the lease file is open for write, /etc/init.d/umountroot fails and the filesystem must be recovered. And dhclient still has libc .so files open as well, which is what leads to orphaned inodes if those files have been overwritten during a libc upgrade.

If the dhclient pid file was removed from /var/run/sendsigs.omit.d when network-manager is stopped, then sendsigs would kill dhclient at shutdown. Or, if dhclient could be terminated when network-manager shuts down, that should work too. I don't understand enough to guess why the pid files are written to sendsigs.omit.d in the first place...