Repository navigation
fix(ci): retry the Rosetta cross build through toolchain segfaults - #2788
Merged
Merged
Conversation
The x86_64-apple-darwin lane added in #2780 is flaky, and because `js-check` gates on `callback-platforms` it blocks unrelated PRs: it failed that way on #2787, a GitHub Actions bump that touches none of this. Cross-linking to x86_64 on the arm64 runner intermittently dies with error: linking with `cc` failed: exit status: 1 clang: error: unable to execute command: Segmentation fault: 11 clang: error: linker command failed due to signal while linking a *build script*. Build scripts are host binaries, so no cross-compilation flag of ours is involved, and `crates/bashkit-js/.cargo/ config.toml` only sets rustflags for x86_64-pc-windows-msvc. It hit `libc` on one run and `getrandom` on another, roughly two runs in five, and recurred after the Rust cache was scoped per target in #2780 and again under a different `Swatinem/rust-cache` revision on #2787 -- so it is the toolchain crashing, not our cache or our configuration. Retry the cross build up to three times. cargo keeps whatever already compiled, so a retry resumes rather than rebuilds. This only absorbs the crash: a genuine compile error fails all three attempts and still fails the job, and the tests themselves are not retried, so the regression the lane was added to catch still fails it.
chaliy
pushed a commit
that referenced
this pull request
Oct 26, 2026
…dates (#2787) Swatinem/rust-cache and taiki-e/install-action to new v2 revisions, actions/setup-python v7.0.0 -> v7.1.0, astral-sh/setup-uv v10.3.0 -> v10.3.2, across 14 workflows. All SHA-pinned, as the repo requires. Touches no rust-toolchain pin, and check-workflow-parity passes. All 49 checks green. The Rosetta lane first failed here on the transient cross-build segfault tracked in #2788, and passed on re-run; that failure was unrelated to these bumps, which is the point #2788 makes.
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.
What changed
The
x86_64-apple-darwincross build injs.yml'scallback-platformsjobretries up to three times. Only the build is retried; the tests are not.
Why
The lane I added in #2780 is flaky, and since
js-checkgates oncallback-platforms, a toolchain crash blocks unrelated PRs. It already did:#2787, a GitHub Actions version bump that touches none of this, is red on
it right now.
Cross-linking to x86_64 on the arm64 runner intermittently dies with:
It is the toolchain crashing, not our configuration:
cross-compilation flag of ours is in play.
crates/bashkit-js/.cargo/config.tomlonly sets
rustflagsforx86_64-pc-windows-msvc.libcon one run,getrandomonanother.
chore(ci): bump the github-actions group across 1 directory with 4 updates #2787 under a different
Swatinem/rust-cacherevision (so, a cold cache).Cache contamination was my first guess and it is ruled out.
Roughly two runs in five.
Before / After
75a810b(#2780)libcea3bd4e(#2780)6bf1fc2(#2780)b4d9e70(#2780)1dc7911(main)9fcc382c(#2787)getrandomAfter: the first two attempts may crash and the job still succeeds. cargo
keeps whatever already compiled, so a retry resumes rather than rebuilds, and
each retry logs a
::warning::so the flake stays visible rather than beingsilently swallowed.
Risk
error fails all three attempts and still fails the job. The test step is
outside the loop, so the regression the lane exists to catch — verified in
fix(js): unblock npm release by sizing the host-callback timeout for Rosetta #2780 by reverting the budget to 2s — still fails it.
outright.
enough, the lane's cost should be reweighed against its value rather than
the retry count raised again.
Checklist
coverage is unchanged
Generated by Claude Code