fix(build-windows): tolerate dead sccache server in CUDA retry path - #604
Merged
Conversation
The CUDA ABI build has a retry-once-after-sccache-restart path in
`Invoke-CmakeBuild`. It calls `sccache --stop-server` to clean up
before retrying cmake. When the sccache server has already crashed
(which is precisely the case this retry path exists to handle),
`sccache --stop-server` exits non-zero with 'couldn't connect to
server'.
Because the script runs under `$ErrorActionPreference = 'Stop'`,
the non-zero native exit is promoted to a terminating PowerShell
error and the catch block re-throws before the retry cmake invocation
ever runs. `mesh-llm.exe` is therefore never produced and the
downstream `package-release.ps1` fails with 'Required file not found'.
Wrap the `--stop-server` call in a localized
`$ErrorActionPreference = 'Continue'` block (and restore the prior
value) so a dead server is silently ignored and the retry proceeds.
`Reset-SccacheStats` further down already uses this exact pattern
for the same reason.
Observed in the v0.66.0-rc5 release run on Build Windows CUDA:
sccache: error: failed to execute compile
sccache: caused by: An existing connection was forcibly closed
by the remote host. (os error 10054)
WARNING: CUDA ABI build failed while using sccache; restarting
sccache and retrying once.
sccache: error: couldn't connect to server
error: recipe `release-build-cuda-windows` failed on line 173
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Windows CUDA build retry flow in Invoke-CmakeBuild so that a crashed/dead sccache server does not prevent the retry from running, ensuring the build can still produce mesh-llm.exe for downstream packaging.
Changes:
- Wraps
sccache --stop-serverin a localized$ErrorActionPreference = "Continue"block during the CUDA retry path. - Restores the prior
$ErrorActionPreferenceviatry/finallyto avoid impacting subsequent script behavior.
michaelneale
added a commit
that referenced
this pull request
May 20, 2026
The Windows CUDA release lane has been failing deterministically because
`scripts/install-windows-sdk.ps1` does `choco install cuda` which pulls
the latest CUDA Toolkit (currently 13.2). sccache 0.15.0 cannot parse
nvcc 13.2 output and crashes mid-build with:
sccache: error: failed to execute compile
sccache: caused by: An existing connection was forcibly closed by the
remote host. (os error 10054)
This is the documented incompatibility in mozilla/sccache#2470 (CUDA +
MSVC + Ninja). PR #604 made the in-script retry tolerate a dead sccache
server, which let the retry actually run — but the retry hits the same
deterministic crash on the same file (argsort.cu), so the workflow
still failed on rc6.
CI's Windows CUDA lane has been working because it pins CUDA via
`Jimver/cuda-toolkit@v0.2.35` to `vars.CUDA_VERSION || '12.6.3'`
(currently 12.8.0 in repo vars). Mirror that setup here for the
release lane: install CUDA via the same pinned action for the cuda
matrix entry, and keep `install-windows-sdk.ps1` for rocm/vulkan
where it works correctly.
Validated by:
- PR #604 PR CI Windows CUDA succeeded with the same Jimver+12.8.0 path
- Release rc5/rc6 Windows CUDA failed with choco+13.2 path
Other Windows lanes (CPU, ROCm, Vulkan) keep using
`install-windows-sdk.ps1` unchanged.
michaelneale
added a commit
that referenced
this pull request
May 21, 2026
Brings in #579 advisory capacity, #583 hardened materialization cache, #562 version bump, #606/#604 Windows CUDA build fixes, #608 lint rule, and #560 UI mockup. * origin/main: fix(ci): small update for lint rule (#608) mockup: Reserves high-fidelity UI mockup (#560) Add advisory capacity evaluation for model targets (#579) Harden Skippy layer package materialization cache (#583) fix(release): pin Windows CUDA to sccache-compatible version (#606) fix(build-windows): tolerate dead sccache server in CUDA retry path (#604) chore(version): synchronize version bump everywhere (#562)
michaelneale
added a commit
that referenced
this pull request
May 21, 2026
* main: docs(AGENTS): add confidence-testing recipe for routing/MoA/gossip changes (#613) ci(sdk-smoke): install lld in macOS swift smoke job (#610) MoA: mesh mode and many inference critical fixes, and quic keep alive (#566) fix(ci): small update for lint rule (#608) mockup: Reserves high-fidelity UI mockup (#560) Add advisory capacity evaluation for model targets (#579) Harden Skippy layer package materialization cache (#583) fix(release): pin Windows CUDA to sccache-compatible version (#606) fix(build-windows): tolerate dead sccache server in CUDA retry path (#604) chore(version): synchronize version bump everywhere (#562) fix(mesh): skip filtered peers in gossip dial loop to unwedge `--auto` (#602) docs(agents): clarify just build vs release-build for serious testing (#599) build: ozempic — slim binary -42 MB / -47 MB (#592)
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.
The CUDA ABI build has a retry-once-after-sccache-restart path in
Invoke-CmakeBuild. It callssccache --stop-serverto clean up before retrying cmake. When the sccache server has already crashed (which is precisely the case this retry path exists to handle),sccache --stop-serverexits non-zero with 'couldn't connect to server'.Because the script runs under
$ErrorActionPreference = 'Stop', the non-zero native exit is promoted to a terminating PowerShell error and the catch block re-throws before the retry cmake invocation ever runs.mesh-llm.exeis therefore never produced and the downstreampackage-release.ps1fails with 'Required file not found'.Wrap the
--stop-servercall in a localized$ErrorActionPreference = 'Continue'block (and restore the prior value) so a dead server is silently ignored and the retry proceeds.Reset-SccacheStatsfurther down already uses this exact pattern for the same reason.Observed in the v0.66.0-rc5 release run on Build Windows CUDA:
sccache: error: failed to execute compile
sccache: caused by: An existing connection was forcibly closed
by the remote host. (os error 10054)
WARNING: CUDA ABI build failed while using sccache; restarting
sccache and retrying once.
sccache: error: couldn't connect to server
error: recipe
release-build-cuda-windowsfailed on line 173