[Bug 568288] Re: init: main process can respawn even when the job is stopping
alexius ludeman
568288 at bugs.launchpad.net
Tue Oct 2 20:35:50 UTC 2012
This bug is affecting our application.
We configure upstart to respawn so that in production it will
automatically restart the application if it crashes. We also use pre-
stop to request over http to ask the process to exit. The pre-stop
procedure allows the process to finish serving current clients requests,
and other clean up duties before it exits. However the combination of
these two options then cause the application to be restarted upon
running "stop <service>". This seems like an unusual behavior to us.
So now we are faced with either abandoning upstart or put the respawn
logic somewhere else.
thanks
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/568288
Title:
init: main process can respawn even when the job is stopping
Status in Upstart:
Triaged
Status in “upstart” package in Ubuntu:
Invalid
Bug description:
Binary package hint: upstart
Version: 10.4 Beta, latest as of 21.04.2010.
Sometimes Upstart seems to get confused when "respawn" statement is
used for a service and respawns when process exits normally on
explicit stop event. Log then looks like this:
Apr 22 09:39:08 ubuntu1004alpha3crescendo init: Connection from private client
Apr 22 09:39:08 ubuntu1004alpha3crescendo init: sav-protect goal changed from start to stop
Apr 22 09:39:08 ubuntu1004alpha3crescendo init: sav-protect state changed from running to pre-stop
Apr 22 09:39:08 ubuntu1004alpha3crescendo init: sav-protect pre-stop process (3415)
Apr 22 09:39:09 ubuntu1004alpha3crescendo savd: savd.daemon: Sophos Anti-Virus daemon stopped.
Apr 22 09:39:09 ubuntu1004alpha3crescendo init: sav-protect main process (3379) exited normally
Apr 22 09:39:09 ubuntu1004alpha3crescendo init: sav-protect main process ended, respawning
Apr 22 09:39:09 ubuntu1004alpha3crescendo init: sav-protect goal changed from stop to respawn
Apr 22 09:39:10 ubuntu1004alpha3crescendo init: sav-protect pre-stop process (3415) exited normally
Apr 22 09:39:10 ubuntu1004alpha3crescendo init: sav-protect goal changed from respawn to start
Apr 22 09:39:10 ubuntu1004alpha3crescendo init: sav-protect state changed from pre-stop to stopping
Apr 22 09:39:10 ubuntu1004alpha3crescendo init: Handling stopping event
Apr 22 09:39:10 ubuntu1004alpha3crescendo init: sav-protect state changed from stopping to killed
Apr 22 09:39:10 ubuntu1004alpha3crescendo init: sav-protect state changed from killed to post-stop
Apr 22 09:39:10 ubuntu1004alpha3crescendo init: sav-protect state changed from post-stop to starting
Apr 22 09:39:10 ubuntu1004alpha3crescendo init: Handling starting event
Apr 22 09:39:10 ubuntu1004alpha3crescendo init: sav-protect state changed from starting to pre-start
Apr 22 09:39:10 ubuntu1004alpha3crescendo init: sav-protect pre-start process (3431)
Apr 22 09:39:11 ubuntu1004alpha3crescendo init: sav-protect pre-start process (3431) exited normally
Apr 22 09:39:11 ubuntu1004alpha3crescendo init: sav-protect state changed from pre-start to spawned
Apr 22 09:39:11 ubuntu1004alpha3crescendo init: sav-protect main process (3453)
Apr 22 09:39:11 ubuntu1004alpha3crescendo init: sav-protect state changed from spawned to post-start
Apr 22 09:39:11 ubuntu1004alpha3crescendo init: sav-protect post-start process (3454)
Apr 22 09:39:11 ubuntu1004alpha3crescendo init: sav-protect post-start process (3454) exited normally
Apr 22 09:39:11 ubuntu1004alpha3crescendo init: sav-protect state changed from post-start to running
Apr 22 09:39:11 ubuntu1004alpha3crescendo init: Handling started event
Apr 22 09:39:15 ubuntu1004alpha3crescendo savd: savd.daemon: Sophos Anti-Virus daemon started.
According to my observations this happens most of the time but not
always. Just this morning I got it to stop the service cleanly, then I
started, killed the service abnormally and after it respawned stop
from then on only respawns it. I though it may be related to abnormal
killing before, but even after fresh boot stopping the service only
respawns now.
To manage notifications about this bug go to:
https://bugs.launchpad.net/upstart/+bug/568288/+subscriptions
More information about the foundations-bugs
mailing list