Skip to content

deps(zccache): bump embedded backend to 1.15.23 (no-abort lock watchdog) - #2254

Merged
zackees merged 2 commits into
mainfrom
agent/1866-zccache-noabort-watchdog
Dec 5, 2026
Merged

zackees merged 2 commits into
mainfrom
agent/1866-zccache-noabort-watchdog

Conversation

@zackees

@zackees zackees commented Dec 5, 2026

Copy link
Copy Markdown
Member

Summary

#1866 recorded two ways the embedded zccache lock-holder watchdog could take the shared fbuild daemon down mid-build:

  1. Failure 1 — artifact flush guard. Delivered by zccache 1.15.22 (PR Keep the fbuild cache daemon alive during slow checkpoints #2180, f13b3d12).
  2. Failure 2 — spawn / materialization admission. Still aborts at crates/zccache-daemon-core/src/daemon/spawn_exclusion.rs in 1.15.22: an overdue holder triggers abort_after_report, killing the process (and with it warm daemon state) while a build is active.

Upstream fixed failure 2 in forge-ci/zccache@645b00ac ("report lock hold overruns instead of aborting; add lock watchdog kill switch", 2026-11-28), first released in 1.15.23 (2026-11-28T11:23Z). The watchdog now:

  • reports each overdue holder/waiter once and never terminates the process (a holder wedged in a kernel filesystem wait cannot be cancelled by aborting; aborting only adds a core dump to the stalled disk and drops warm daemon state),
  • accepts an operator kill switch: ZCCACHE_LOCK_WATCHDOG / SOLDR_LOCK_WATCHDOG=off.

This PR pins the embedded backend to exactly 1.15.23 (9d3dcb0e059143d2e3775ee5a87970ceb38b79d7).

Why not 1.15.24 / 1.15.25

Those releases change cache-key semantics (ZCCACHE_SCOPE per-scope stores with scope-salted keys, cross-checkout rust artifact sharing, ZCCACHE_SHARED_DIR shared tier). They are auditable changes in their own right and are deliberately out of scope here.

Dependency delta

kernal-api moves 0.1.40 -> 0.1.42, which is 1.15.23's exact pin. It is the only other package that moves; all 14 zccache crates still resolve from one git source, and running-process is untouched (modern zccache links kernal-api, not running-process), so the duplicate-rp_*_public hazard described in Cargo.toml does not apply.

Cargo.lock | 74 +++++++++++++++++++++++++++++++-------------------------------
Cargo.toml | 13 ++++++++---

Changed versions in the lock: exactly zccache* 1.15.22 -> 1.15.23 (14 crates) and kernal-api 0.1.40 -> 0.1.42.

Validation

See the check/test output in the thread. Reproduce:

soldr cargo check -p fbuild-build -p fbuild-build-arm -p fbuild-build-engine \
  -p fbuild-build-esp -p fbuild-build-mcu -p fbuild-daemon --all-targets

Scope

#1866 stays open: this delivers the upstream half. The in-repo RED->GREEN test is not expressible from fbuild because the watchdog and its registry are zccache internals (pub(crate)); upstream owns those tests (crates/zccache-core/src/sync_watchdog_tests.rs, crates/zccache-daemon-core/src/daemon/spawn_exclusion_watchdog_tests.rs, extended by 645b00ac).

Local run (this branch, a6709584 + 48faf6d6)

soldr cargo check -p fbuild-build -p fbuild-build-arm -p fbuild-build-engine \
  -p fbuild-build-esp -p fbuild-build-mcu -p fbuild-daemon --all-targets
  -> exit 0, Finished `dev` profile in 3m 42s

soldr cargo test -p fbuild-build -p fbuild-build-engine -p fbuild-build-mcu -p fbuild-build-arm --lib
  -> 21 + 312 + 752 + 78 = 1163 passed, 0 failed, 10 ignored

soldr cargo test -p fbuild-daemon --lib
  -> 353 passed, 0 failed, 3 ignored

soldr cargo test -p fbuild-build-engine --lib embedded_zccache_keeps
  -> zccache_embedded::materialization_mode_tests::embedded_zccache_keeps_the_no_abort_lock_watchdog ... ok

soldr cargo clippy -p fbuild-build-engine --all-targets -- -D warnings
  -> exit 0

soldr cargo fmt -p fbuild-build-engine -- --check
  -> clean

Runtime smoke (isolated HOME / FBUILD_CACHE_DIR, port 22771):

daemon startup phase: device_leases
disk maintenance pass complete ... cache_root=.../.fbuild/prod/zccache/v1.15.23
fbuild-daemon identity pid=... version="2.5.56"
daemon startup complete in 2.2s

i.e. the embedded service reports v1.15.23 and boots clean.

Test note

embedded_zccache_keeps_the_no_abort_lock_watchdog asserts the version floor and that the same predicate rejects 1.15.22, so the guard provably discriminates. The behavioural RED->GREEN lives upstream (sync_watchdog_tests.rs, spawn_exclusion_watchdog_tests.rs, extended by 645b00ac) because the watchdog registry is pub(crate) inside zccache.

steward added 2 commits December 4, 2026 19:25
#1866 recorded two ways the embedded zccache lock-holder watchdog could take
the shared fbuild daemon down mid-build. Failure 1 (artifact flush guard) was
delivered by 1.15.22 in #2180. Failure 2 (spawn/materialization admission) is
fixed upstream in forge-ci/zccache 645b00ac, first released in 1.15.23: an
overdue hold is now REPORTED once per site and never terminates the process,
so a stuck kernel filesystem wait no longer drops warm daemon state, and an
operator kill switch (ZCCACHE_LOCK_WATCHDOG / SOLDR_LOCK_WATCHDOG=off) exists.

Pin exactly 1.15.23. 1.15.24/1.15.25 are intentionally not taken: they change
cache-key semantics (ZCCACHE_SCOPE per-scope stores, ZCCACHE_SHARED_DIR) and
need their own audited change.

kernal-api moves 0.1.40 -> 0.1.42 as 1.15.23's exact pin requires; it is the
only other package that moves, and all 14 zccache crates still resolve from a
single git source (no duplicate-link risk).

Refs #1866 (stays open; the upstream half is delivered here).
#1866 failure 2 was fixed upstream in zccache 1.15.23 (645b00ac): an overdue
spawn/materialization hold is reported instead of aborting the daemon. The
behaviour lives in zccache internals, so fbuild cannot reproduce the RED half
locally -- but a pin downgrade would silently reintroduce the mid-build daemon
kill. Assert the embedded zccache version floor (zccache::core::VERSION >=
1.15.23) and, in the same test, that the predicate rejects the still-aborting
1.15.22, so the guard is proven to discriminate rather than being vacuous.

Refs #1866.
@zackees
zackees added this pull request to the merge queue Dec 5, 2026
Merged via the queue into main with commit 6e3ccb5 Dec 5, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant