Repository navigation
devcloud tests: stop SupervisorTest's services at teardown instead of orphaning them - #318
Merged
Merged
Conversation
… orphaning them tearDown SIGKILLed the supervisor, and every service it runs sits in a session of its own, so a test that ends with services up (the desired-list test's `while :; do sleep 0.05; done` loop, the env test's `sleep 60`) left them reparented to launchd for good. On the MacBook 44 such loops had piled up over three days, spawning ~700 processes a second between them. tearDown now SIGTERMs the supervisor, which stops each service group and waits, and kills it only if it has not exited within 10 s. Sminos-Session: new-2a#bca9a36f (macbook on macbook)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…ad, in case it could not stop them The SIGTERM path relies on the supervisor stopping its services; one that hangs is SIGKILLed after 10 s, which orphans them again. tearDown now snapshots the supervisor's children (each a session leader) before the SIGTERM and kills their groups after it has exited. Checked with a SIGSTOPped supervisor over a TERM-ignoring service: the old tearDown left the service running, this one leaves nothing. Sminos-Session: new-2a#bca9a36f (macbook on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 21, 2026
…t stops its services' process groups) Sminos-Session: devcloud setup#639ca648 (macbook on macbook)
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.
SupervisorTest.tearDownSIGKILLed the supervisor. Every service the supervisor runs sits in a session of its own, so any test that ended with services still up left them running under launchd for good: the desired-list test'swhile :; do sleep 0.05; doneloop and the env test'ssleep 60. On the MacBook, 44 of those loops had piled up over three days and were spawning about 700 processes a second between them.tearDownnow:pgrep -PVerified:
test_servicesrun on main left 2 orphans. With this change it leaves 0, and thedevcloud/tests/unitsuite passes.tearDownleft the service running and the new one leaves nothing.Sminos-Session: new-2a#bca9a36f (macbook on macbook)