{"record":{"id":"2fba657dde4b2313","repo":"denoland/deno","slug":"error-2fba65","errorCode":null,"errorMessage":"{}: ({}) {}","messagePattern":"\\{\\}: \\(\\{\\}\\) \\{\\}","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"runtime/subprocess_windows/src/process.rs","lineNumber":189,"sourceCode":"      0,\n      null_mut(),\n    );\n  }\n  let errmsg = if buf.is_null() {\n    \"Unknown error\"\n  } else {\n    unsafe { CStr::from_ptr(buf).to_str().unwrap() }\n  };\n\n  let msg = if syscall.is_empty() {\n    format!(\"({}) {}\", errno, errmsg)\n  } else {\n    format!(\"{}: ({}) {}\", syscall, errno, errmsg)\n  };\n  if !buf.is_null() {\n    unsafe { LocalFree(buf.cast()) };\n  }\n  panic!(\"{}\", msg);\n}\n\nfn uv_fatal_error(syscall: &str) {\n  uv_fatal_error_with_no(syscall, None)\n}\n\nfn uv_init_global_job_handle() {\n  use windows_sys::Win32::System::JobObjects::*;\n  UV_GLOBAL_JOB_HANDLE.get_or_init(|| {\n    unsafe {\n      // SAFETY: SECURITY_ATTRIBUTES is a POD type, repr(C)\n      let mut attr = mem::zeroed::<SECURITY_ATTRIBUTES>();\n      // SAFETY: JOBOBJECT_EXTENDED_LIMIT_INFORMATION is a POD type, repr(C)\n      let mut info = mem::zeroed::<JOBOBJECT_EXTENDED_LIMIT_INFORMATION>();\n      attr.bInheritHandle = FALSE;\n\n      info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_BREAKAWAY_OK\n        | JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/runtime/subprocess_windows/src/process.rs#L171-L207","documentation":"The Windows subprocess runtime ports libuv's fatal-error handling: when a process-control syscall fails, uv_fatal_error_with_no formats the syscall name, errno, and the message from FormatMessage, then panics because the subprocess state cannot be recovered.","triggerScenarios":"Spawning a child process on Windows where the OS call fails: invalid spawn attributes or handles, job-object limits reached, or required system resources exhausted in a way not pre-checked by a typed error.","commonSituations":"Process spawning on constrained CI runners (job limits), antivirus interference, or programmatically produced invalid spawn arguments.","solutions":["Verify the executable path exists and is runnable before spawning","Reduce concurrency or check job-object limits on the CI runner","Read the errno in the panic message and map it to the Windows error code (e.g. 5 = access denied) to find the cause","Update Deno - more spawn failures are mapped to typed errors in newer versions"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate before spawn on Windows\nfn spawnable(exe: &str) -> bool {\n  let p = std::path::Path::new(exe);\n  p.is_file()\n}\nif !spawnable(&cmd) {\n  return Err(format!(\"executable not found: {cmd}\")); // normal error, no panic\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve and stat the executable before spawning; handle NotFound as a typed error yourself","Cap concurrent spawns on CI runners to stay under job-object limits","Map errno values from the panic message to Windows error codes when filing issues"],"tags":["windows","subprocess","spawn","syscall","panic"],"backgroundTag":"process-spawn-failure","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}