Repository navigation
Conversation
The wrapper ran fizzbee as a child of bash, so a SIGTERM sent to the wrapper's pid killed bash and left fizzbee running, reparented to init. exec it instead. In --parallel mode each worker was a subshell waiting on fizzbee, and killing the subshell did not reach fizzbee either, both on interrupt and when killing survivors after a failure. Run the workers as direct background jobs and record their exit status from the parent, so killing a worker pid stops its fizzbee, with no extra dependency on pkill. The trap is set before the workers start and also covers SIGHUP. Fixes fizzbee-io#385.
A signal between launching a worker and recording its pid left that worker out of the trap's kill. jobs -p already lists it. With stdout a closed pipe, the first echo killed bash by SIGPIPE before any kill ran, so kill first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #385.
execfizzbee, so a signal to the wrapper's pid reaches it. the temp file is removed before the exec.--parallel: workers are direct background jobs instead of subshells, so killing a worker pid (on interrupt, or after another worker fails) stops its fizzbee. the parent records exit status and FAILED / DEADLOCK as before. the trap is set before spawning, covers INT, TERM and HUP, and kills$(jobs -p)(which also lists a worker started but not yet inpids) before any echo (an echo to a closed stdout would die of SIGPIPE first). nopkill, since the docker image has noprocps. bash 3.2 compatible.a model-check run stopped by SIGTERM now prints
Model checker stoppedand exits 0, same as Ctrl-C.testing
tests/test_wrapper_signals.py: SIGTERM to the wrapper pid, single run and-x --parallel 2. fails on main, passes here. also passes with a release-style layout (release/fizz.env). not wired into ci.test_references.py --skip-lovable: 172 passed, 0 failed, counts unchanged.--parallelpass / fail / worker-error paths checked by hand, output unchanged.