Repository navigation
run_http_tests.sh leaked all five HTTP servers on every run - #11
Merged
Merged
Conversation
start_worker recorded each server with PIDS+=("$!"), but it was always
called as W_X=$(start_worker ...). A command substitution runs in a
subshell, so the append landed in the subshell's copy of PIDS and the
EXIT trap's cleanup iterated an empty array: every run, clean exit or not,
left all five `vgi-example-worker --http` servers running. Found as
batches of five orphaned workers (parent PID 1, hours old) on the shared
build host. The same subshell also swallowed start_worker's `exit 1`, so a
server that failed to announce its port left an empty URL and the run
carried on.
start_worker now sets STARTED_URL and is called directly, as the
boot_http_worker helpers in ci/ already do. Checked with a stub worker
and unittest replaced by true: 6 servers left behind before, 0 after,
all five URLs still resolved.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
start_worker recorded each server with PIDS+=("$!"), but it was always
called as W_X=$(start_worker ...). A command substitution runs in a
subshell, so the append landed in the subshell's copy of PIDS and the
EXIT trap's cleanup iterated an empty array: every run, clean exit or not,
left all five
vgi-example-worker --httpservers running. Found asbatches of five orphaned workers (parent PID 1, hours old) on the shared
build host. The same subshell also swallowed start_worker's
exit 1, so aserver that failed to announce its port left an empty URL and the run
carried on.
start_worker now sets STARTED_URL and is called directly, as the
boot_http_worker helpers in ci/ already do. Checked with a stub worker
and unittest replaced by true: 6 servers left behind before, 0 after,
all five URLs still resolved.
🤖 Generated with Claude Code