{"record":{"id":"edbbf9bab37be54d","repo":"zed-industries/zed","slug":"stderr-closed","errorCode":null,"errorMessage":"stderr closed","messagePattern":"stderr closed","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/remote_server/src/server.rs","lineNumber":959,"sourceCode":"        let mut stderr = smol::Unblock::new(std::io::stderr());\n        let mut stream = UnixStream::connect(&server_paths.stderr_socket)\n            .await\n            .with_context(|| {\n                format!(\n                    \"Failed to connect to stderr socket {}\",\n                    server_paths.stderr_socket.display()\n                )\n            })?;\n        let mut stderr_buffer = vec![0; 2048];\n        loop {\n            match stream\n                .read(&mut stderr_buffer)\n                .await\n                .context(\"reading stderr\")?\n            {\n                0 => {\n                    let error =\n                        std::io::Error::new(std::io::ErrorKind::UnexpectedEof, \"stderr closed\");\n                    Err(anyhow!(error))?;\n                }\n                n => {\n                    stderr.write_all(&stderr_buffer[..n]).await?;\n                    stderr.flush().await?;\n                }\n            }\n        }\n    });\n\n    if let Err(forwarding_result) = gpui::block_on(async move {\n        futures::select! {\n            result = stdin_task.fuse() => result.map_err(ExecuteProxyError::StdinTask),\n            result = stdout_task.fuse() => result.map_err(ExecuteProxyError::StdoutTask),\n            result = stderr_task.fuse() => result.map_err(ExecuteProxyError::StderrTask),\n        }\n    }) {\n        log::error!(\"encountered error while forwarding messages: {forwarding_result:#}\",);","sourceCodeStart":941,"sourceCodeEnd":977,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/remote_server/src/server.rs#L941-L977","documentation":"Fires in execute_proxy when reading the remote server's stderr forwarding socket returns 0 bytes, i.e. the server closed the stderr socket connection. This indicates the remote server process exited or its stderr pipe ended, so the proxy can no longer forward server diagnostics.","triggerScenarios":"Thrown at crates/remote_server/src/server.rs:959 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check whether the remote server process crashed by inspecting its log files on the remote host","Reconnect to restart the server and re-establish the stderr socket","Verify the stderr socket file was not deleted or corrupted in the server data directory"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}