{"record":{"id":"3817302e42186498","repo":"zed-industries/zed","slug":"invalid-pid-file-contents","errorCode":null,"errorMessage":"Invalid PID file contents","messagePattern":"Invalid PID file contents","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/remote_server/src/server.rs","lineNumber":903,"sourceCode":"                    return Err(ExecuteProxyError::ServerNotRunning(\n                        ProxyLaunchError::ServerNotRunning,\n                    ));\n                }\n                Some(server_pid) => server_pid,\n            }\n        } else {\n            if let Some(pid) = server_pid {\n                log::info!(\n                    \"proxy found server already running with PID {}. Killing process and cleaning up files...\",\n                    pid\n                );\n                kill_running_server(pid, &server_paths)?;\n            }\n            gpui::block_on(spawn_server(&server_paths)).map_err(ExecuteProxyError::SpawnServer)?;\n            std::fs::read_to_string(&server_paths.pid_file)\n                .and_then(|contents| {\n                    contents.parse::<u32>().map_err(|_| {\n                        std::io::Error::new(\n                            std::io::ErrorKind::InvalidData,\n                            \"Invalid PID file contents\",\n                        )\n                    })\n                })\n                .map_err(SpawnServerError::ProcessStatus)\n                .map_err(ExecuteProxyError::SpawnServer)?\n        }\n    };\n\n    let stdin_task = smol::spawn(async move {\n        let stdin = smol::Unblock::new(std::io::stdin());\n        let stream = UnixStream::connect(&server_paths.stdin_socket)\n            .await\n            .with_context(|| {\n                format!(\n                    \"Failed to connect to stdin socket {}\",\n                    server_paths.stdin_socket.display()","sourceCodeStart":885,"sourceCodeEnd":921,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/remote_server/src/server.rs#L885-L921","documentation":"Fires in execute_proxy when the server's PID file exists but its contents cannot be parsed as a valid PID. This means stale or corrupted state in the remote server's data directory, usually from a previous crash or manual tampering with the PID file.","triggerScenarios":"Thrown at crates/remote_server/src/server.rs:903 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the stale PID file in the remote server data directory so a fresh one is written on next launch","Ensure no leftover server process is running before relaunching","Reconnect; the proxy treats this as server-not-running and starts a new server"],"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-14T00:17:10.932Z"}