Comment 3 for bug 963106

Clint Byrum (clint-fewbar) wrote :

Thanks for the info Steven. I looked into this a bit more.

It would seem this bug introduced the omitting: bug #869635

The resolution makes, I think, a false assumption that when network-manager is killed that it will take dhclient with it. This does not seem to be the case. Or, more likely, the processes are not waited on properly after being sent the kill signal. I looked through the code of network manager quite a bit, and could not find any code that explicitly stops the dhcp manager when SIGTERM is received, though I am no glib expert, so its possible when the main loop is exitted there is some kind of process that fires the watches which lead to the stop methods being called.

I do see that the dhclients die when I manually stop the network-manager job. This job is guaranteed to stop before umountrootfs because it stops on stopping dbus, which stops on deconfiguring-networking. deconfiguring-networking is always waited on during the shutdown.

One possiblity is that network-manager takes longer than 5 seconds to stop, at which point, upstart would send it a SIGKILL, and move on. To test that hypothesis we can just raise the kill timeout in the job to a very high level with

kill timeout 100

and then try to reproduce the problem.