jdx/mise · warning · eyre::Report

cached rustc action is missing blob {}

Error message

cached rustc action is missing blob {}

What it means

Thrown by find_blobs() while restoring a cached rustc action: the session cache agent answered a multi-digest FindBlobs request with a Blobs response whose per-digest path list contains a None slot (src/cache/rustc.rs:491-497). The content-addressed store still has the action manifest but no longer holds one of the blobs it references (named by its blake3 hash), so the cached compilation cannot be materialized. This is effectively a cache miss: compile() logs 'mise rustc cache warning: result was not restored' and runs real rustc (src/cache/rustc.rs:62-64).

Source

Thrown at src/cache/rustc.rs:496

            eprintln!("mise rustc cache warning: hit was not recorded: {error:#}");
        }
    }
}

fn find_blobs(digests: &[CacheDigest]) -> Result<Vec<PathBuf>> {
    let responses = session::request_agent(&[AgentRequest::FindBlobs {
        digests: digests.to_vec(),
    }])?;
    let Some(response) = responses.into_iter().next() else {
        bail!("cache agent did not return a blob lookup response");
    };
    match response {
        AgentResponse::Blobs { paths } if paths.len() == digests.len() => paths
            .into_iter()
            .zip(digests)
            .map(|(path, digest)| match path {
                Some(path) => Ok(path),
                None => bail!("cached rustc action is missing blob {}", digest.hash),
            })
            .collect(),
        AgentResponse::Blobs { .. } => {
            bail!("cache agent returned an incomplete blob lookup response")
        }
        AgentResponse::Blob { path: Some(path) } if digests.len() == 1 => Ok(vec![path]),
        AgentResponse::Blob { path: None } if digests.len() == 1 => {
            let digest = &digests[0];
            bail!("cached rustc action is missing blob {}", digest.hash)
        }
        AgentResponse::Error { message } => bail!(message),
        _ => bail!("cache agent returned an unexpected blob lookup response"),
    }
}

fn read_canonical_blob<T>(path: &Path, digest: &CacheDigest, description: &str) -> Result<T>
where
    T: DeserializeOwned + Serialize,

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Rerun the task: the shim treats this as a miss, recompiles with real rustc, and republishes the missing blobs
  2. If it recurs for the same action, delete the stale local action-cache directory wholesale so manifests without blobs are purged
  3. When task.cache.remote_url is set, check remote health (token, namespace, connectivity) since failed blob-pack fetches surface as missing blobs
  4. Ensure only one mise version uses a given cache dir and that MISE_CACHE_* variables come from the current mise session, not a stale exported environment
Defensive patterns

Strategy: fallback

Validate before calling

fn has_all_blobs(digests: &[CacheDigest]) -> bool {
    matches!(
        session::request_agent(&[AgentRequest::FindBlobs { digests: digests.to_vec() }]).as_deref(),
        Ok([AgentResponse::Blobs { paths }])
            if paths.len() == digests.len() && paths.iter().all(Option::is_some)
    )
}
// call before restore_result() and skip the cached path when false

Try / catch

Keep restore optional, never fatal — the shim already does `match restore_result(...) { Ok(Some(c)) => replay, Ok(None) => {}, Err(e) => eprintln!("mise rustc cache warning: result was not restored: {e:#}") }` and falls through to executing rustc (src/cache/rustc.rs:62-64); preserve that degradation so a missing blob only costs a recompile.

Prevention

When it happens

Trigger: restore_result() looks up the [action descriptor, metadata, output-root] digests (src/cache/rustc.rs:301-305) or the [stdout, stderr, output-file] digests (src/cache/rustc.rs:331-333) and at least one blob was evicted from the local CAS or never downloaded from the remote cache; e.g. the cache directory was partially pruned, or a remote cache served the action manifest but its blob pack was expired or failed to download.

Common situations: Manual cleanup that deleted CAS object files but left action manifests; a remote cache in read mode with server-side LRU eviction; concurrent cache GC or two sessions sharing one cache dir; a disk-full condition during an earlier StoreBlob leaving manifest-without-blob entries.

Related errors


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/bfa5124fd7efc51a. Report an issue: GitHub.