{"record":{"id":"b5eb28d6ff23cfbb","repo":"astrid-runtime/astrid","slug":"fuse-service-status-failed-code-message","errorCode":null,"errorMessage":"FUSE service status failed [{code}]: {message}","messagePattern":"FUSE service status failed \\[(.+?)\\]: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-fuse/src/main.rs","lineNumber":367,"sourceCode":"}\n\nasync fn sync(\n    client: &mut AdminClient,\n    acting_principal: &astrid_core::PrincipalId,\n    selector: &StorageMountSelectorV1,\n) -> Result<StorageProviderSuccessV1> {\n    let record = registry::resolve_record(selector)?;\n    let status = require_live_lease(client, acting_principal, &record).await?;\n    validate_record(&record, &status)?;\n    let control = live_control_status(client, acting_principal, &record).await?;\n    match control {\n        ControlResponse::Status { access } if access == record.access => {},\n        ControlResponse::Status { access } => {\n            bail!(\"detached FUSE service access {access:?} does not match lease\")\n        },\n        ControlResponse::Done => bail!(\"FUSE service returned an incompatible status response\"),\n        ControlResponse::Failure { code, message } => {\n            bail!(\"FUSE service status failed [{code}]: {message}\")\n        },\n    }\n    into_success(\n        client\n            .request(AdminRequestKind::StorageMountSync {\n                mount_id: record.mount_id,\n            })\n            .await?,\n    )?;\n    Ok(StorageProviderSuccessV1::Synced {\n        mount_id: record.mount_id,\n    })\n}\n\nasync fn status(\n    client: &mut AdminClient,\n    acting_principal: &astrid_core::PrincipalId,\n    selector: &StorageMountSelectorV1,","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-fuse/src/main.rs#L349-L385","documentation":"This error is raised by the FUSE storage provider's `sync` command (crates/astrid-storage-provider-fuse/src/main.rs:367). After confirming a live lease exists, the provider queries the running FUSE service over its control socket and receives `ControlResponse::Failure { code, message }`, meaning the detached FUSE service itself reported an operational failure when asked for its status. The provider surfaces the service's own error code and message verbatim so the caller can see why the mount is unhealthy.","triggerScenarios":"Calling `sync` (StorageMountSelectorV1) while the mount has a live kernel lease and a registry record, but the detached FUSE service replies `ControlResponse::Failure` on `live_control_status` — e.g. the FUSE daemon hit an internal error serving the mount, lost its backing storage handle, or the control protocol returned an explicit failure code.","commonSituations":"FUSE daemon partially crashed or was restarted with a stale control socket; backing remote storage credentials expired so the daemon reports failure on status checks; version mismatch between the admin client and the running FUSE service leading the daemon to reject the status request; kernel lease still live but the daemon's mount state is corrupt.","solutions":["Read the embedded [code] and message to identify the FUSE service-side failure and fix the underlying daemon problem (e.g. re-authenticate backing storage).","Restart the FUSE service for this mount so it re-establishes a healthy state, then retry the sync.","If the daemon is unrecoverable, unmount and re-mount the storage to get a fresh lease and control socket.","Verify the admin client and FUSE service versions match to rule out protocol incompatibilities."],"exampleFix":"// before: retrying sync against a failed daemon\nprovider.sync(selector).await?;\n// after: check status, remount on failure, then sync\nmatch provider.status(selector).await {\n    Err(e) if e.to_string().contains(\"FUSE service status failed\") => {\n    provider.unmount(selector).await?;\n    provider.mount(params).await?;\n    provider.sync(selector).await?;\n    }\n    _ => provider.sync(selector).await?,\n}","handlingStrategy":"try-catch","validationCode":"// pre-check: only sync when the daemon reports a healthy status\nlet status = provider.status(&selector).await;\nif matches!(&status, Err(e) if e.to_string().contains(\"FUSE service status failed\")) {\n    return Err(\"FUSE service unhealthy; restart daemon before sync\".into());\n}","typeGuard":"fn is_fuse_service_failure(err: &anyhow::Error) -> bool {\n    err.to_string().starts_with(\"FUSE service status failed [\")\n}","tryCatchPattern":"match provider.sync(&selector).await {\n    Err(e) if is_fuse_service_failure(&e) => {\n        // parse code between '[' and ']' and restart the FUSE daemon\n        restart_fuse_service(&mount_id).await?;\n        provider.sync(&selector).await\n    }\n    other => other,\n}","preventionTips":["Check daemon liveness with status before issuing sync.","Keep FUSE service and admin client versions in lockstep.","Monitor backing-storage credentials and rotate before expiry.","Alert on control-socket health to catch partial daemon crashes early."],"tags":["fuse","mount","storage","ipc"],"backgroundTag":"api-error-response","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}