{"record":{"id":"af8949ce705724a6","repo":"oven-sh/bun","slug":"runtime-client-exited-code-code-null","errorCode":null,"errorMessage":"${runtime} client exited ${code}${code === null ? \" (timed out)\" : \"\"}","messagePattern":"(.+?) client exited (.+?)(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"bench/quic/run.mjs","lineNumber":62,"sourceCode":"  }\n  throw new Error(`${runtime} server exited before READY`);\n}\n\nasync function runClient(runtime, port) {\n  const proc = spawn(bin(runtime), [...argv(runtime), `${here}client.mjs`], {\n    env: { ...process.env, PORT: port, COUNT, CONCURRENCY },\n    stdio: [\"ignore\", \"pipe\", \"inherit\"],\n  });\n  let out = \"\";\n  proc.stdout.on(\"data\", d => (out += d));\n  // Bounded: a pairing that wedges (e.g. the peer tears the session down\n  // mid-run) must report, not hang the whole matrix.\n  const timer = setTimeout(() => proc.kill(\"SIGKILL\"), Number(process.env.CLIENT_TIMEOUT_MS ?? 60000));\n  const [code] = await once(proc, \"exit\");\n  clearTimeout(timer);\n  const line = out.trim().split(\"\\n\").at(-1);\n  if (code !== 0 || !line?.startsWith(\"{\")) {\n    throw new Error(`${runtime} client exited ${code}${code === null ? \" (timed out)\" : \"\"}`);\n  }\n  return JSON.parse(line);\n}\n\n// Best of N rounds: QUIC throughput is noisy, and the fastest round is the one\n// least perturbed by an unrelated scheduler hiccup.\nasync function measure(serverRuntime, clientRuntime) {\n  const { proc, port } = await startServer(serverRuntime);\n  try {\n    let best = null;\n    for (let i = 0; i < ROUNDS; i++) {\n      let r;\n      try {\n        r = await runClient(clientRuntime, port);\n      } catch (err) {\n        return { failed: err.message };\n      }\n      if (!best || r.rps > best.rps) best = r;","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/bench/quic/run.mjs#L44-L80","documentation":"The offset tables in the lockfile's buffer section failed structural sanity checks: 0xDEADBEEF 'never written' sentinels, zero or backwards start offsets, start > end, end past EOF, or ranges not aligned/sized to the element type (src/install/lockfile/Buffers.rs:83-137).","triggerScenarios":"Any structural corruption of bun.lockb: bit rot, partial writes, binary merge conflicts, LFS smudge/clean filters altering bytes.","commonSituations":"Same as other corruption classes - the file on disk no longer matches what the writer serialized.","solutions":["Restore bun.lockb from version control","Otherwise delete it and run `bun install`","Prevent non-Bun tooling (filters, hooks, editors) from touching bun.lockb"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat bun.lockb as opaque binary; only Bun writes it","Exclude it from git filters, hooks, and text-mode tooling","Keep backups via version control so restoration is one command"],"tags":["lockfile","corruption","parsing"],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}