{"record":{"id":"a1f0af2bc34da59d","repo":"Yeachan-Heo/oh-my-codex","slug":"sparkshell-failed-to-launch-native-binary-err","errorCode":null,"errorMessage":"[sparkshell] failed to launch native binary: ${errno.message}","messagePattern":"\\[sparkshell\\] failed to launch native binary: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/sparkshell.ts","lineNumber":443,"sourceCode":"    }\n    throw error;\n  }\n  const result = runSparkShellBinary(binaryPath, args);\n\n  if (result.error) {\n    const errno = result.error as NodeJS.ErrnoException;\n    const kind = classifySpawnError(errno);\n    if (!hasExplicitOverride && (kind === 'missing' || kind === 'blocked')) {\n      runSparkShellFallback(args, { cause: errno, nativePath: binaryPath, state: kind });\n      return;\n    }\n    if (kind === 'missing') {\n      throw new Error(`[sparkshell] failed to launch native binary: executable not found (${binaryPath})`);\n    }\n    if (kind === 'blocked') {\n      throw new Error(`[sparkshell] failed to launch native binary: executable is blocked (${errno.code || 'blocked'})`);\n    }\n    throw new Error(`[sparkshell] failed to launch native binary: ${errno.message}`);\n  }\n\n  if (!hasExplicitOverride && isSparkShellNativeCompatibilityFailure(result)) {\n    runSparkShellFallback(args, {\n      cause: result.stderr || 'GLIBC-incompatible native sidecar',\n      nativePath: binaryPath,\n      state: 'glibc-incompatible',\n    });\n    return;\n  }\n\n  writeSparkShellResultOutput(result);\n\n  if (result.status !== 0) {\n    process.exitCode = typeof result.status === 'number'\n      ? result.status\n      : resolveSignalExitCode(result.signal);\n  }","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/sparkshell.ts#L425-L461","documentation":"Launching the native sparkshell binary failed with an error that is neither ENOENT nor EACCES (and an explicit override is set, bypassing fallback). The raw Node spawn error message is propagated for diagnosis.","triggerScenarios":"EINVAL from bad argv, EMFILE from exhausted file descriptors, or EIO when spawning the overridden binary.","commonSituations":"Exotic environments: hardened sandboxes, very low ulimits, corrupted binary files.","solutions":["Inspect the embedded message for the errno and address that OS-level cause","Check `ulimit -n`","Reinstall the binary in case of corruption"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { sparkshellCommand(args); }\ncatch (e) { logSpawnDiagnostics((e as Error).message); /* EMFILE/EINVAL triage */ }","preventionTips":["Raise ulimit -n in CI environments","Report the embedded errno message when filing issues"],"tags":["spawn","os","environment"],"backgroundTag":"spawn-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}