init: possible issue with blocked events?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
Invalid
|
Undecided
|
Unassigned | ||
0.3 |
Incomplete
|
Medium
|
Unassigned |
Bug Description
I've found 3 and fixed (patched, more like) 2 problems. My question is - has this been found and fixed already in later versions?
Details:
1) The test below makes init dump core and restart, triggered by an assert in job.c::
service
respawn
script
exit 0
end script
post-start script
sleep 4
end script
As far as I could see JOB_RUNNING was legitimate, so I updated the assert condition to allow it, and respawning worked.
2) after the change above, stopping this job produced another core. This time PROCESS_POST_START got JOB_WAITING.
I patched this as well by allowing JOB_WAITING and setting state and stop to FALSE in this case.
I'm not sure the second fix is a good one.
I tried to compare against 0.5, but it's been re-written in C++, so there's no simple diff.
Changed in upstart: | |
milestone: | 0.3.10 → 0.3-later |
The bug is that the running process exiting transitions the state - it should stay in POST_START if the post-start script is still running, and then transition directly to stopping after.
0.5 should be checked to see if it's still got the same bug.
If possible, we should backport a patch to 0.3 since it's still in active use