{"record":{"id":"086acbaf4a009ed0","repo":"zed-industries/zed","slug":"unable-to-spawn-server-process","errorCode":null,"errorMessage":"unable to spawn server process","messagePattern":"unable to spawn server process","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/crashes/src/crashes.rs","lineNumber":587,"sourceCode":"        unsafe {\n            mach2::task::task_threads(task, &raw mut threads, &raw mut count);\n        }\n        let current = unsafe { mach2::mach_init::mach_thread_self() };\n        for i in 0..count {\n            let t = unsafe { *threads.add(i as usize) };\n            if t != current {\n                unsafe { mach2::thread_act::thread_resume(t) };\n            }\n        }\n    }\n}\n#[cfg(not(target_os = \"windows\"))]\nfn spawn_crash_handler(exe: &Path, socket_name: &Path) -> async_process::Child {\n    async_process::Command::new(exe)\n        .arg(\"--crash-handler\")\n        .arg(&socket_name)\n        .spawn()\n        .expect(\"unable to spawn server process\")\n}\n\n#[cfg(target_os = \"windows\")]\nfn spawn_crash_handler(exe: &Path, socket_name: &Path) {\n    use std::ffi::OsStr;\n    use std::iter::once;\n    use std::os::windows::ffi::OsStrExt;\n    use windows::Win32::System::Threading::{\n        CreateProcessW, PROCESS_CREATION_FLAGS, PROCESS_INFORMATION, STARTF_FORCEOFFFEEDBACK,\n        STARTUPINFOW,\n    };\n    use windows::core::PWSTR;\n\n    let mut command_line: Vec<u16> = OsStr::new(&format!(\n        \"\\\"{}\\\" --crash-handler \\\"{}\\\"\",\n        exe.display(),\n        socket_name.display()\n    ))","sourceCodeStart":569,"sourceCodeEnd":605,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/crashes/src/crashes.rs#L569-L605","documentation":"Fires in the crash handler setup (macOS/Unix path) when the crash-handler subprocess cannot be spawned via async_process::Command (missing executable, fork/exec failure). The panic hook cannot report crashes without this server process.","triggerScenarios":"Thrown at crates/crashes/src/crashes.rs:587 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the crash-handler executable path exists and is executable","Check resource limits (RLIMIT_NPROC) and fork availability","Ensure no sandbox policy blocks process spawning at panic time"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}