{"record":{"id":"4e0554746602c5e7","repo":"astrid-runtime/astrid","slug":"winfsp-mountpoint-did-not-become-ready-within-s","errorCode":null,"errorMessage":"WinFsp mountpoint did not become ready within {} seconds: {}","messagePattern":"WinFsp mountpoint did not become ready within (.+?) seconds: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-winfsp/src/win.rs","lineNumber":123,"sourceCode":"        // rather than inspecting the junction object itself.\n        match std::fs::metadata(mountpoint) {\n            Ok(metadata) if metadata.is_dir() => return Ok(()),\n            Ok(_) => bail!(\n                \"WinFsp mountpoint is not a directory: {}\",\n                mountpoint.display()\n            ),\n            Err(error) if error.kind() == std::io::ErrorKind::NotFound => {},\n            Err(error) => {\n                return Err(error).with_context(|| {\n                    format!(\n                        \"inspect WinFsp mountpoint readiness {}\",\n                        mountpoint.display()\n                    )\n                });\n            },\n        }\n        if started.elapsed() >= MOUNTPOINT_READY_TIMEOUT {\n            bail!(\n                \"WinFsp mountpoint did not become ready within {} seconds: {}\",\n                MOUNTPOINT_READY_TIMEOUT.as_secs(),\n                mountpoint.display()\n            );\n        }\n        std::thread::sleep(Duration::from_millis(25));\n    }\n}\n\n#[derive(Debug, serde::Deserialize, serde::Serialize)]\n#[serde(rename_all = \"kebab-case\", tag = \"operation\", deny_unknown_fields)]\nenum ServiceControlRequest {\n    /// Probe service state with the broker bearer.\n    Status { token: String },\n    /// Stop and unmount the private service.\n    Stop { token: String },\n}\n","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-winfsp/src/win.rs#L105-L141","documentation":"wait_for_mountpoint_ready loops (25 ms sleeps) until the mountpoint metadata shows a directory, bounded by MOUNTPOINT_READY_TIMEOUT. If the WinFsp mount never materializes as a browsable directory within the timeout, the function bails with the elapsed seconds and the path. It signals the mount failed to come up rather than hanging forever.","triggerScenarios":"The WinFsp filesystem failed to start or register the junction (driver missing, service start failure, invalid filesystem parameters), so the poll sees only NotFound until the timeout elapses.","commonSituations":"WinFsp driver not installed or wrong version; the FSD/security descriptor rejected the mount; the daemon crashed after launching; slow system startup exceeding the configured timeout on heavily loaded machines.","solutions":["Verify WinFsp is installed and the version matches the crate's requirement (check C:\\Program Files (x86)\\WinFsp)","Capture and inspect the daemon/service stderr for the earlier failure that prevented the mount","Increase MOUNTPOINT_READY_TIMEOUT if the environment is slow (rebuild the crate)","Test the same mount manually with winfsp-x.dll test tools or `net use` to isolate driver vs. app issues"],"exampleFix":"// before\nconst MOUNTPOINT_READY_TIMEOUT: Duration = Duration::from_secs(5);\n// after\nconst MOUNTPOINT_READY_TIMEOUT: Duration = Duration::from_secs(30);","handlingStrategy":"retry","validationCode":"// verify WinFsp is present before mounting\nif !Path::new(\"C:\\\\Program Files (x86)\\\\WinFsp\\\\bin\\\\winfsp-x64.dll\").exists() {\n    return Err(\"WinFsp driver not installed\".into());\n}","typeGuard":"fn mountpoint_became_dir(p: &Path, timeout: Duration) -> bool {\n    let start = std::time::Instant::now();\n    while start.elapsed() < timeout {\n        if std::fs::metadata(p).map(|m| m.is_dir()).unwrap_or(false) { return true; }\n        std::thread::sleep(Duration::from_millis(25));\n    }\n    false\n}","tryCatchPattern":"match mount_err {\n    Err(e) if e.to_string().contains(\"did not become ready\") => {\n        // capture daemon stderr, check WinFsp install, then retry once with longer timeout\n        collect_daemon_logs()?;\n        retry_mount_with_timeout(Duration::from_secs(60))?;\n    }\n    other => other?,\n}","preventionTips":["Install/verify the matching WinFsp release before mounting","Propagate daemon stderr so earlier failures surface instead of a bare timeout","Allow a generous timeout on slow or heavily loaded machines","Smoke-test mounts at boot in CI"],"tags":["windows","winfsp","mount","timeout"],"backgroundTag":"request-timeout","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"}