/srv/irclogs.ubuntu.com/2011/01/16/#upstart.txt

jackqu7Hello14:19
jackqu7I've got a job stuck on 'start/killed', and trying to start or stop it just hangs14:20
jackqu7I was changing the conf for it, but even after reverting to a known good version the same thing is happening14:20
jackqu7I was wondering if anyone had any suggestions?14:20
ionThe main process most likely has different forking behavior than claimed in the ‘expect’ stanza, confusing Upstart’s preliminary fork-following code. Either be 100 % sure of the forking behavior or make it not fork and drop the ‘expect’. A future release of Upstart will have more intelligent code to follow forks.14:22
jackqu7ion: I've tried setting it to both fork and daemon, no luck14:54
ion“Trying” to set it to seomthing indicates you don’t actually know the precise forking behavior of the main process. It might be best just to make it not fork at all.14:54
jackqu7The process has a switch to either fork or not14:55
jackqu7What happened was I set that switch, but didn't add "expect fork" the first time14:56
jackqu7And now even after adding that, or removing the switch from the process it still hangs14:56
jackqu7As if it's still tracking the process initiated from the bad configuration14:57
ionYes, Upstart is still in a confused state. Can you reboot?14:57
jackqu7I would really rather not14:57
jackqu7I'm foolishly making changes on a production box14:57
jackqu7Is there any other way to flush it?14:58
ionhttp://heh.fi/tmp/workaround-upstart-snafu14:58
ion./workaround-upstart-snafu 12345 where 12345 is the pid reported by ‘status jobname’.14:58
jackqu7Thanks! That worked15:02
jackqu7Cheers for your help15:02
jackqu7Out of interest, what does that script actually do?15:04
ionWhen in the confused state, Upstart’s fork-following code is waiting to reap a parentless child by the tracked pid which never appears. The workaround creates new child processes until one with the right pid appears, then kills its parent and lets the child die afterwards. Ugly, but effective.15:06
JanCsort of a benign fork bomb?  ;)15:16
ionNot a fork bomb, since it has no more than two child processes running at any given time.15:18
JanCion: but it would work much faster as a fork bomb!  :P15:21
ionheh15:21
JanCj/k15:22
=== robins is now known as robinsmidsrod

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!