jdx/mise · error · eyre::Report
cached rustc output failed digest verification: {}
Error message
cached rustc output failed digest verification: {} What it means
Before restoring a cached output file, the wrapper materializes the blob (reflink/copy) into a temp file and re-hashes it; the digest must match the node's recorded digest. A mismatch means the stored bytes degraded — corruption, truncation, or a bad copy — and the wrapper refuses to install wrong build artifacts (src/cache/rustc.rs:389).
Source
Thrown at src/cache/rustc.rs:389
}
fn stage_cached_output(
directory: &Path,
index: usize,
source: &Path,
node: &CacheFileNode,
) -> Result<tempfile::TempPath> {
let temporary = directory.join(format!("output-{index}"));
reflink_copy::reflink_or_copy(source, &temporary)
.wrap_err_with(|| format!("failed to materialize cached rustc output {}", node.name))?;
let temporary = tempfile::TempPath::try_from_path(temporary)?;
make_owner_writable(&temporary)?;
std::fs::OpenOptions::new()
.write(true)
.open(&temporary)?
.sync_all()?;
if !node.digest.matches_file(&temporary)? {
bail!(
"cached rustc output failed digest verification: {}",
node.name
);
}
apply_file_mode(&temporary, node.mode)?;
Ok(temporary)
}
fn cached_matches(cached: &CachedCompilation, output: &Output) -> bool {
output.status.success()
&& cached.stdout == output.stdout
&& cached.stderr == output.stderr
&& cached.outputs.iter().all(|expected| {
std::fs::metadata(&expected.path).is_ok_and(|metadata| {
file_mode(&metadata) == expected.mode
&& expected
.digest
.matches_file(&expected.path)View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Delete the corrupted blob/cache store and rebuild so outputs are re-recorded
- Check disk space and filesystem health if multiple outputs fail verification
- If using reflink on an unusual FS, disable the rustc cache or copy the store fully before use
Defensive patterns
Strategy: fallback
Try / catch
# Digest failure => corrupted blob: delete store, rebuild uncached if grep -q 'failed digest verification' build.log; then rm -rf "$MISE_CACHE_STAGING_DIR"; cargo build fi
Prevention
- Sync cache stores fully (no partial rsync) before use
- Monitor disk space during record phases
- Treat repeated verification failures across files as FS/hardware trouble
When it happens
Trigger: Bit rot or truncated writes in the cache blob store; reflink/copy silently producing wrong bytes on an exotic filesystem; tampered or partially synced cache directory (rsync/interrupted disk full).
Common situations: Shared/network caches copied without full sync; disk-full during an earlier record; filesystems with buggy reflink support.
Related errors
- cached rustc action result has an invalid identity
- cached rustc action descriptor does not match the invocation
- cached rustc metadata is unsupported
- remote cache blob failed digest verification
- cache agent did not return an action prediction response
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/7c7d2cda555d2869.
Report an issue: GitHub.