{"record":{"id":"9ae2e5c365678ed2","repo":"xai-org/grok-build","slug":"empty-response-timeout-or-closed","errorCode":null,"errorMessage":"empty response (timeout or closed)","messagePattern":"empty response \\(timeout or closed\\)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-fast-worktree/src/nfs/client.rs","lineNumber":554,"sourceCode":"            return false;\n        }\n        daemon_flock_free(&self.runtime_dir)\n    }\n\n    fn call(&self, req: &Request, timeout: Duration) -> Result<Response> {\n        let mut stream = connect_unix(&self.sock, timeout)\n            .with_context(|| format!(\"connect {}\", self.sock.display()))?;\n        stream.set_read_timeout(Some(timeout))?;\n        stream.set_write_timeout(Some(timeout))?;\n        let mut bytes = serde_json::to_vec(req)?;\n        bytes.push(b'\\n');\n        stream.write_all(&bytes)?;\n        let _ = stream.shutdown(std::net::Shutdown::Write);\n        let mut reader = BufReader::new((&stream).take(MAX_LINE_BYTES));\n        let mut line = String::new();\n        reader.read_line(&mut line)?;\n        if line.is_empty() {\n            return Err(anyhow!(\"empty response (timeout or closed)\"));\n        }\n        Ok(serde_json::from_str(line.trim())?)\n    }\n}\n\n#[derive(Debug, Default)]\npub struct QuerySnapshot {\n    pub phase: Option<String>,\n    pub declined: Option<String>,\n    pub storage_full: bool,\n    pub unknown: bool,\n    pub mount: Option<MountInfo>,\n}\n\n/// `UnixStream::connect` has no deadline. Non-blocking connect + `poll` so a\n/// socket that exists but is not accepting cannot hang ping/create/remove.\nfn connect_unix(path: &Path, timeout: Duration) -> Result<UnixStream> {\n    let bytes = path.as_os_str().as_bytes();","sourceCodeStart":536,"sourceCodeEnd":572,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-fast-worktree/src/nfs/client.rs#L536-L572","documentation":"Error \"empty response (timeout or closed)\" thrown in xai-org/grok-build.","triggerScenarios":"Thrown at crates/codegen/xai-fast-worktree/src/nfs/client.rs:554 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}