You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build: native_file vanishes under zccache snapshot restore on Windows #3048
Hits a file-lock race (os error 32) and fails partway through.
Reports "falling back to fresh setup" but the native_file is already nuked.
The existing _purge_restored_pch_artifacts defensive cleanup in ci/meson/meson_setup_execute.py covers PCH artifacts but not the native_file.
Proposed fix
Extend the zccache-snapshot recovery in ci/meson/meson_setup_execute.py to rewrite the native_file unconditionally after a failed snapshot restore. The file is small and is derived from CompilerDetection, so re-emission is free. Pattern: detect the cache restore failed outcome and call write_meson_native_file() again before handing control back to the build orchestrator.
Acceptance
Three back-to-back bash test --cpp invocations on Windows pass without manual intervention.
Self-healing path fires at least once during those runs (verifies the recovery exercises).
Decisions
Priority: P2. Developer-blocking on Windows; CI runs on Linux where the file-lock race does not fire.
Scope: rewrite-on-restore-failure. Do not try to fix zccache#710 upstream from this side — that lives in a separate repo. This is the FastLED-side defensive patch.
Investigated. Root cause is in zccache, not FastLED — filed upstream as zackees/zccache#749.
TL;DR: zccache meson configure's restore path (restore_from_cache in crates/zccache/src/cli/commands/meson_cache.rs:515) does an unconditional remove_dir_all(build_dir) before extracting the cached payload. That has two distinct bugs:
Destructive wipe nukes user-owned files even on success. v3's allowlist only captures is_configure_output() paths, so the FastLED wrapper's pre-meson meson_native.txt is never in the snapshot — and is deleted by the wipe with no way to come back.
remove_dir_all is not atomic on Windows. A single mid-loop ERROR_SHARING_VIOLATION (os error 32) — Defender, Search Indexer, etc. holding a transient lock — aborts the wipe partway through. The destination is left half-deleted; the "falling back to fresh setup" recovery doesn't restore the deleted files.
The FastLED-side rewrite-on-restore-failure workaround in ci/meson/meson_setup_execute.py is still worth landing as a P2 defensive layer, but the durable fix is upstream. zccache#749 proposes a targeted wipe (only allowlisted paths, leave user-owned files alone) + extract-then-swap for atomicity.
zccache meson configure's restore path now uses extract-then-swap: it stages the cached entries into a sibling tempdir, then per-file renames each into place. The destination is never wiped, so user-owned files like meson_native.txt survive both successful and failed restores. Mid-extract failures (e.g. the Windows os error 32 sharing-violation race that triggered this report) now leave the build dir untouched so the wrapper's "fall back to fresh setup" recovery can actually rely on the pre-restore state.
To pick up the fix:
via PyPI: uv pip install --upgrade 'zccache>=1.12.5'
via fbuild's managed install: bump MANAGED_ZCCACHE_VERSION to "1.12.5" in crates/fbuild-build/src/managed_zccache.rs (same shape as PR chore(deps): bump managed zccache 1.12.3 -> 1.12.4 fbuild#582). The download path verifies SHA256 against the GitHub release, so no SHA edits needed.
The FastLED-side rewrite-on-restore-failure defensive layer mentioned in the issue is still worth landing as belt-and-suspenders, but it's no longer strictly required.
Activity
zackees commentedon Jun 14, 2026
Investigated. Root cause is in zccache, not FastLED — filed upstream as zackees/zccache#749.
TL;DR:
zccache meson configure's restore path (restore_from_cacheincrates/zccache/src/cli/commands/meson_cache.rs:515) does an unconditionalremove_dir_all(build_dir)before extracting the cached payload. That has two distinct bugs:is_configure_output()paths, so the FastLED wrapper's pre-mesonmeson_native.txtis never in the snapshot — and is deleted by the wipe with no way to come back.remove_dir_allis not atomic on Windows. A single mid-loopERROR_SHARING_VIOLATION(os error 32) — Defender, Search Indexer, etc. holding a transient lock — aborts the wipe partway through. The destination is left half-deleted; the "falling back to fresh setup" recovery doesn't restore the deleted files.The FastLED-side
rewrite-on-restore-failureworkaround inci/meson/meson_setup_execute.pyis still worth landing as a P2 defensive layer, but the durable fix is upstream. zccache#749 proposes a targeted wipe (only allowlisted paths, leave user-owned files alone) + extract-then-swap for atomicity.fix(meson_cache): restore via extract-then-swap; preserve user files …
chore(release): bump 1.12.4 -> 1.12.5 (#751)
zackees commentedon Jun 15, 2026
Fixed upstream in zccache 1.12.5 via zackees/zccache#750 (closes #749).
zccache meson configure's restore path now uses extract-then-swap: it stages the cached entries into a sibling tempdir, then per-file renames each into place. The destination is never wiped, so user-owned files likemeson_native.txtsurvive both successful and failed restores. Mid-extract failures (e.g. the Windowsos error 32sharing-violation race that triggered this report) now leave the build dir untouched so the wrapper's "fall back to fresh setup" recovery can actually rely on the pre-restore state.To pick up the fix:
uv pip install --upgrade 'zccache>=1.12.5'MANAGED_ZCCACHE_VERSIONto"1.12.5"incrates/fbuild-build/src/managed_zccache.rs(same shape as PR chore(deps): bump managed zccache 1.12.3 -> 1.12.4 fbuild#582). The download path verifies SHA256 against the GitHub release, so no SHA edits needed.The FastLED-side
rewrite-on-restore-failuredefensive layer mentioned in the issue is still worth landing as belt-and-suspenders, but it's no longer strictly required.chore(deps): bump zccache floor 1.12.3 -> 1.12.5 (fixes FastLED #3048) (
fix(wrap): auto-retry link/compile-ephemeral on lost-connection (#752) (