Upstart crashes when combining respawn and pre-stop scripts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
High
|
Unassigned |
Bug Description
Upstart 0.5.1 has a somewhat awkward behaviour when combining the respawn stanza with the pre-stop function.
The normal behaviour we see is that when stopping a service first the pre-stop is called and that only after the pre-stop
has finished post-stop is called. However when we add a respawn stanza the post-stop script is called immediately
after the main process died and upstart crashes.
Expected behaviour (test1)
# initctl start test_pre_stop1
PRE START
# initctl stop test_pre_stop1
PRE_STOPPING
PRE_STOPPED
POST_STOPPING
POST_STOPPED
#
Behaviour as seen(test4)
# initctl start test_pre_stop4
PRE START
# initctl stop test_pre_stop4
PRE_STOPPING
POST_STOPPING
PRE_STOPPED
POST_STOPPED
initctl: Unable to stop job: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
# Kernel panic - not syncing: Attempted to kill init!
QEMU: Terminated
FROM IRC:
rah state changed from stopping to killed
rah state changed from killed to post-stop
rah post-stop process (32487)
rah pre-stop process (32484) exited normally
init:job_
zsh: abort (core dumped) ./init
eep
1103IIInih_assert (job->state == JOB_PRE_STOP);
(gdb) p job->state
$1 = JOB_POST_STOP
keesj (keesj) wrote : | #1 |
Changed in upstart: | |
importance: | Undecided → High |
milestone: | none → 0.5.2 |
This may be a duplicate of bug #381048