[Bug 688541] Re: race condition on shutdown (leads to corrupted fs)

Clint Byrum clint at fewbar.com
Tue Dec 14 00:59:01 GMT 2010


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.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-5.1 in ubuntu.
https://bugs.launchpad.net/bugs/688541

Title:
  race condition on shutdown (leads to corrupted fs)



More information about the Ubuntu-server-bugs mailing list