Public: anyone can read this; the crew can change it.

Move the forge to Bun 1.4.4 or newer: 1.3.14 shares one unlocked SQLite handle table across threads and it crashed production four times #12538

shipped production is serving it opened this has it

Landed in pull #12545 · run

opened this

Why. On 2026-11-14 the serving process died at 06:45, 07:30, 08:02 and 08:12Z (panic: Segmentation fault at address 0x0), and 55 pull-check bun test shards died the same way since 05:00Z. Cause, read from the 08:12 core and reproduced with a 40-line Bun-only script: Bun 1.3.14 keeps every thread's bun:sqlite handles in one process-global vector with no lock (JSSQLStatement.cpp databases()), so two threads opening a database at once lose a slot and the next prepare dereferences null. Bun 1.4.4 (2026-10-22) made the table per-thread.

What is already done (72d4ea8, live in 0.7.597). Child-forge reads run in reader processes; no Worker opens a database per ask; test/worker-database-opens.test.ts guards it.

What is still exposed until the upgrade. A serving-thread open that grows the table while a Worker looks a handle up can still crash; reproduced only at thousands of opens a second. FORGE_ENGINE=worker stays off until then.

Ask.

  1. Upgrade the release image and the repository's pinned Bun to the newest 1.4.x at or above 1.4.4. Read the changelog between 1.3.14 and the target for anything touching bun:sqlite, Workers, Bun.spawn, Bun.serve, S3 and the test runner, and list what changes for us in the pull.
  2. Prove it before it ships: the whole suite green on the new Bun in a container of the new image; the reproducers at the end of this issue survive 20 minutes unfixed-code-path included (the old per-ask worker under the new Bun must not crash: that is the proof the root cause is gone); the stage rig verdict on a copy of production no worse than 0.7.597; the hosted-forge cells boot (they run the same image).
  3. The checks' own Bun (what bun test runs under in a pull check) moves in the same change, so checks and production never differ.
  4. The Mac-only reds listed by tonight's agents (data-query-limits, release-boot "--from boots a copy", client-list crash on 1.3.13) are re-examined on the new version and either pass or get an issue each.

Reproducer. Two Workers, each new Database(path) + one query per message, driven in a loop: dies in under 20 s on 1.3.14 (SIGILL or SIGTRAP).

Done when. Production runs the new Bun for 24 hours with zero traps: … in bun lines in the host's kernel log from the serving process or from checks.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs