astrid-runtime/astrid · error
kernel returned an unexpected storage unmount response
Error message
kernel returned an unexpected storage unmount response
What it means
unmount_status() only accepts Success(_) or the two recognized Error texts from a StorageMountStatus request; any other AdminResponseBody variant bails here. Like error 601, it signals a response-shape/protocol mismatch, not a refused operation.
Source
Thrown at crates/astrid-storage-provider-fskit/src/main.rs:318
AdminResponseBody::Error(error) => {
bail!("kernel refused storage lifecycle request: {error}")
},
_ => bail!("kernel returned an unexpected storage lifecycle response"),
}
}
fn unmount_status(body: AdminResponseBody) -> Result<bool> {
match body {
AdminResponseBody::Success(_) => Ok(true),
AdminResponseBody::Error(error)
if error.contains("was not found") || error.contains("expired or revoked") =>
{
Ok(false)
},
AdminResponseBody::Error(error) => {
bail!("kernel refused storage unmount authorization: {error}")
},
_ => bail!("kernel returned an unexpected storage unmount response"),
}
}
async fn revoke_after_registry_failure(client: &mut AdminClient, mount_id: StorageMountId) {
let _ = client
.request(AdminRequestKind::StorageMountRevoke { mount_id })
.await;
}
fn with_native_rollback(
error: anyhow::Error,
rollback: Result<()>,
) -> Result<StorageProviderSuccessV1> {
match rollback {
Ok(()) => Err(error),
Err(rollback) => Err(error).context(rollback),
}
}View on GitHub (pinned to affd8760f4)
Solutions
- Rebuild kernel and provider together so the AdminResponseBody schema matches.
- Add the newly observed variant to unmount_status() if it is a legitimate response for status requests.
- Capture and inspect the raw response to confirm which variant arrived.
Defensive patterns
Strategy: type-guard
Validate before calling
// ensure schema match: kernel and provider built from same source revision
Type guard
fn is_status_response(body: &AdminResponseBody) -> bool {
matches!(body, AdminResponseBody::Success(_) | AdminResponseBody::Error(_))
} Try / catch
match unmount_status(body) {
Err(e) if e.to_string().contains("unexpected storage unmount response") => Err(e),
other => other,
} Prevention
- Ship kernel and provider binaries from matched versions.
- Test StorageMountStatus round trips in CI for every response variant.
- Deserialize responses strictly and log unknown variants at the boundary.
When it happens
Trigger: unmount() calls unmount_status() on the kernel's reply to StorageMountStatus and the body is neither Success nor Error — e.g. the kernel returned a StorageMountLease payload or another variant after a schema change.
Common situations: Version-skewed kernel/provider builds; custom kernel forks returning extra payload variants; corrupted IPC framing that deserializes into an unexpected variant.
Related errors
- unexpected daemon metadata response: {other:?}
- kernel returned an unexpected storage lifecycle response
- FUSE service returned an incompatible unmount response
- kernel returned an unexpected storage unmount response
- unexpected distro lock response: {other:?}
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/86fddce18f6eee6b.
Report an issue: GitHub.