Repository navigation
test: stop aborted Squirrel.Mac updater runs cleanly - #53607
Merged
Merged
Conversation
When a pooled updater run overran its budget, stopping it could throw ENOTEMPTY from removing the slot's update directory, because the app it had just SIGKILL'd still held files there open. That error replaced the run's own, and the retry then queued behind the other slot with no bound on the wait, so one slow test could take a shard past its step timeout. - Each fixture app is spawned as its own process group, so it and anything it starts (helpers, ditto) are killed together. ShipIt is a launchd job and is still stopped by removing it. - stopRun waits for the killed groups to be gone before touching the filesystem, retries the removal for a few seconds, and never throws; a slot it cannot clean is retired. The suite's after hook uses the same retrying removal. - A retry waits at most its budget for a slot, then retires one, instead of waiting silently for a stuck lookahead run to finish.
ShipIt runs from inside the fixture app bundle, so the process-group kill does not reach it: launchd spawns it. Removing its launchd job does not reliably stop one mid-install either, so an aborted run left a ShipIt copying and verifying the bundle, and the next runs on a slow runner crawled. Kill by path as well, loop until nothing under the run's app paths is left, refuse spawns once a run is aborted, clear ShipIt's install-attempt counter, and sweep every fixture app path in the suite's after hook.
MarshallOfSound
enabled auto-merge (squash)
September 6, 2026 06:10
VerteDinde
approved these changes
Sep 6, 2026
codebytere
approved these changes
Sep 6, 2026
… once When a run hits its budget, print the busiest processes, everything still running from the run's apps, and the slot's ShipIt log, while they are still there. The last two CI timeouts could only be read as guesses. A retry is the test mocha is blocked on. It now takes a free slot or a fresh one immediately instead of waiting its whole budget behind lookahead runs for later tests, which doubled the cost of every retry.
|
No Release Notes |
This was referenced Sep 6, 2026
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #53617 |
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #53618 |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #53619 |
MarshallOfSound
added a commit
that referenced
this pull request
Sep 8, 2026
…, and serially on x64 (#53731) Brings the updater specs to main's shape in one step: a stripped, deep-signed template app cloned per fixture with a shallow re-sign (#53437), per-run budgets and clean stops of overrunning runs (#53536, #53607), and the split into lifecycle and policy files that run serially on x64 (#53663). The harness uses express here as the branch has no routed-server helper. (cherry picked from commit 57ab2fc)
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.
Follow-up to #53536. That change stops an overrunning updater run, but stopping it could itself fail:
stopRunSIGKILLed the fixture app and immediately removed the slot's update directory, and the app still had files there open for a moment, sormthrewENOTEMPTY. That error replaced the run's own, and the retry then queued behind the other slot with no bound on the wait. On a slow Intel runner one such test could take a shard past its 60 minute step timeout, which is what happened on the release-branch backports.detached: true), so it, its helpers and anydittoit started are killed with onekill(-pgid). ThepsListpath-prefix scan is gone. ShipIt is a launchd job rather than our child, so it is still stopped by removing its job.stopRunwaits for the killed groups to be gone before touching the filesystem, retries the removal for a few seconds, and never throws. A slot it cannot clean is retired so the next run does not inherit it. The suite'safterhook uses the same retrying removal.Verified locally on the same build: the normal suite passes with no retries; the grep'd abort test, which is the case that failed on CI, now passes with no
after-hook failure; and a run with a forced 6s budget reports the budget error for every aborted run, with noENOTEMPTYand no processes, launchd jobs ordittoleft behind.Notes: none