Comment 7 for bug 688541

Clint Byrum (clint-fewbar) wrote :

Note that there is one incorrect assumption, which is that sendsigs will never kill any upstart jobs.

In fact, it does make one attempt to kill -9 any still running upstart jobs:

    if [ -z "$alldead" ] ; then
        log_action_begin_msg "Killing all remaining processes"
        #report_unkillable
        killall5 -9 $OMITPIDS # SIGKILL
        log_action_end_msg 1

Unfortunately, it doesn't actually wait for this kill -9 to finish, so its still possible to have running processes there corrupting the system.

I do think the appropriate fix is to have umountfs emit an 'unmounting-filesystems' event and anything that does a 'start on local-filesystems' or 'start on filesystem' should also 'stop on unmounting-filesystems', causing this to wait for upstart to give up on its jobs (which is nice as they can have their own well defined kill timeout). What I don't know yet, is whether upstart will check to see that its SIGKILL actually ended the job, or just report that it sent it, and move on.