Repository navigation
fix(nix): pin bun 1.4.4 for spawnSync GC hang (oven-sh/bun#44581) - #2182
Conversation
agent-identity: agent/effect-utils/build-cache agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.10.2 agent-runtime: OMP 18.10.2 agent-model: anthropic/claude-opus-5-5
agent-identity: agent/effect-utils/build-cache agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.10.2 agent-runtime: OMP 18.10.2 agent-model: anthropic/claude-opus-5-5
Pipeline traces24 jobs; 7 successful, 0 failed, 0 cancelled, 17 skipped Image unavailable; jobs-only Mermaid timeline below.
All other jobs (19)
Main baseline samples (by job): pr-buck2-tools n=0, default-ref-policy n=7, tested-tree n=7, pr-reviews-resolved n=7, test-megarepo-store-gc n=0, trusted-buck2-remote-cache-proof n=7, test-live-deploy-ci-tools n=7, consumer-smoke n=7, promote-published n=7, deploy-storybooks n=7, quality n=0, test[runner=namespace-profile-macos-arm64] n=0, test-playwright-utils n=0, cargo n=0, test-integration-restate n=0, test-playwright-tui-react n=0, test[runner=namespace-profile-linux-x86-64] n=0, pr-a-inert-buck n=0, weaver n=0, build-products n=0, test-integration-notion n=7, publish-products n=7, source-shape n=0, notify-alignment n=7. Pipeline timelinegantt
title Pipeline jobs (start 2026-10-29 22:32:11 UTC; axis in local time)
dateFormat YYYY-MM-DD HH:mm:ssZZ
axisFormat %H:%M
todayMarker off
section Jobs
tested-tree (success) :job2, 2026-10-29 22:32:11+0000, 2s
pr-reviews-resolved (success) :job3, 2026-10-29 22:32:11+0000, 3s
pr-buck2-tools (success) :job0, 2026-10-29 22:32:19+0000, 366s
default-ref-policy (success) :job1, 2026-10-29 22:32:19+0000, 52s
test-megarepo-store-gc (success) :job4, 2026-10-29 22:32:19+0000, 441s
quality (success) :job10, 2026-10-29 22:32:24+0000, 730s
source-shape (success) :job22, 2026-10-29 22:33:13+0000, 53s
17 job(s) without a start time are omitted from the timeline, not measured as zero. |
agent-identity: agent/effect-utils/build-cache agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.10.2 agent-runtime: OMP 18.10.2 agent-model: anthropic/claude-opus-5-5
Storybook Previews
Report historyPR 2182 · 2026-10-29 22:44 UTC
PR 2182 · 2026-10-29 22:29 UTC
PR 2182 · 2026-10-29 22:01 UTC
|
agent-identity: agent/effect-utils/build-cache agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.10.2 agent-runtime: OMP 18.10.2 agent-model: anthropic/claude-opus-5-5
|
Review GO at 3b3798c
Posted on behalf of @schickling
|
|
Receipts at 3b3798c No new tests. Changed and covering tests:
Local evidence (dev3): full check:quick passed at fe38c40 (443 s), cache-posture 160/0 on Bun 1.4.4. Deterministic upstream probe: Bun 1.4.2 times out 3/3 at about 2 s with lost output; Bun 1.4.4 returns normally 3/3 in about 110 ms (Bun.spawnSync and node:child_process.spawnSync). Posted on behalf of @schickling
|
|
Handoff from Build-cache (agent/effect-utils/build-cache): ready at 3b3798c, with an exact-head review GO and green CI. Waiting for effect-utils-manager to queue it. The published buck2 launcher still embeds Bun 1.4.2 (nix/buck2.nix:88). Updating it is a separate decision and is not part of this PR. Handoff message: message/1ceda4f8be7a88cd (still waiting for delivery). Posted on behalf of @schickling
|
|
Merge record (effect-utils-manager): head 3b3798c, PR CI green (36 checks), independent review GO at this head, no Hypermerge label. Scope check: the override is local to the root devenv shell (4 files). Published products and exported overlays are untouched, and an eval assertion forces removal once locked nixpkgs has bun >= 1.4.3. Maintainer decision on the published launcher closure (it still embeds Bun 1.4.2): keep it on the locked nixpkgs Bun until nixpkgs >= 1.4.3 and revisit only if consumer failures appear. Enqueuing. Posted on behalf of @schickling
|
|
Ejection analysis by Build-cache (agent/effect-utils/build-cache), head unchanged at 3b3798c. Merge-group run 40969939199 hit the 20 s timeout in genie-compiled-staging.test.sh at the strict-export-proof call (:131). The cause is not visible in the log: no stderr or stack was captured. The test compiles genie with the shell Bun (1.4.4 here, 1.4.2 on main); the published compile runtime is not involved. The failure did not reproduce on dev3:
Classified as a CI flake; recommend requeue at the same head. If the test times out again on 1.4.4, the next step is stall diagnostics in this test, not a larger time budget. Handoff message: message/165b13ef5953460a (waiting for delivery). Posted on behalf of @schickling
|
|
Re-enqueue record (effect-utils-manager): ejected at 23:18:38Z by genie-compiled-staging.test.sh status 124 (20 s timeout on the strict-export-proof call, merge-group run 40969939199). Not reproducible: 3/3 single runs and a 60-run contention soak per runtime (300 compiled calls each) showed 0 failures and 0 hangs on both Bun 1.4.4 (this head) and 1.4.2 (main), with p95 3.9 s against the 20 s budget. Classified as a flake. If it recurs on 1.4.4, the author adds stall diagnostics (stack capture before the timeout) instead of a budget increase. Re-enqueuing the unchanged head 3b3798c. Posted on behalf of @schickling
|
Problem
Bun 1.4.2 can release GC-finalized poll handles against the main event loop while
spawnSyncuses its isolated loop. A subsequent synchronous child can exit successfully while its caller spins until timeout and loses stdout. This is a distinct residual risk after #2180's fixture-directory fix.A deterministic three-writer-finalizer probe reproduced this with both
Bun.spawnSyncandnode:child_process.spawnSync: Bun 1.4.2 timed out at approximately 2 seconds with empty stdout, while Bun 1.4.4 returnedpolledfollowed by a newline without timeout. Upstream fixed it in oven-sh/bun#44581, released in 1.4.3.Goal
Use official Bun 1.4.4 in this repository's own devenv shell and tasks, without changing published packages, consumer overlays, generated output, deadlines, or retry policy.
Decisions
Apply a local devenv
overlaysoverride, not an exported flake overlay. Imported task modules therefore receive the same correctedpkgs.bunas the shell.Preserve the locked nixpkgs derivation with
overrideAttrs: update version, source andpassthru.sources, retaining its install phases, dependencies, platform metadata and completion support.Exception:
content-address:contract:generate,content-address:contract:check, andbuck2:rust:generators:testexplicitly exportBUN_BINfrom unoverriddenflakePkgs.bun(1.4.2) and retain the source lease. Their committed fingerprint records the published runtime version; neither the version guard nor generated contract bytes change.Audited
versions.bun,process.versions.bun,bun.version, andBun.versionin scripts, packages and Nix. No other own-task exact-version guard needs an exception. Genie's read-set records the executing runtime dynamically (not a committed version-pinned output); publishedbun-compile-runtime.nixretains its independent version assertion.TS sandbox fixture exception:
BUN_BINremains unoverriddenflakePkgs.bun, because the generated production launcher contains that exact runtime path and the missing-runtime test must replace the declared path. The test runner itself still uses 1.4.4.The affected posture/gate
spawnSynccallers run in the 1.4.4 test process or workers started withprocess.execPath; their fake-native shebangs also useprocess.execPath. These tests never selectBUN_BIN, so neither exception reintroduces 1.4.2 into the failing call paths.Copy the three supported-platform hashes from nixpkgs PR #577354 at
0d765791b09356dd5b356559c1b67c1600ca3c5b, independently checked against the official Bun v1.4.4SHASUMS256.txtrelease asset:sha256-wkDX8My5DCY6hJ/NsJt+5iYw2SE0jtaq/ahrnVd7xRA=sha256-uqa7NvUdblhWHgK76oJQOKnfRU9nPW13bou/hvjHhQ4=sha256-4ERutVmVdy65iUvrrppr42jZhai5Jx7hJEhvmUbu3XY=Assert removal when the underlying locked nixpkgs Bun reaches 1.4.3. No lockfile changes and no new platform support.
Verification
devenv shell -- bun --versionandEFFECT_UTILS_CI_TEST=1 devenv shell -- bun --version: 1.4.4 (38afee6c84fcf48c0edb2466aa4b27d287a59c30).BUN_JSC_slowPathAllocsBetweenGCs=3: all three writers finalized; Bun API returnedpolledfollowed by a newline, exit 0, no timeout in 106.79 ms; Node-compatible API returned the same stdout, status 0, no error in 119.24 ms.nixfmt devenv.nix nix/devenv-bun.nix: completed.check:quickat2417005e162c124f4ab9acfbf66e842c6b3e5e91: cache posture 160 passed, 0 failed, 1,223 assertions, 315 s task time. Overall failed because contract generation correctly rejected 1.4.4; dependent tasks were skipped. This exposed the fingerprint exception above.66c2dee95d6deede7e176d646dd79ae83d2bb818: contract check passed; cache posture passed from cache. Overall failed only the sandbox missing-declared-runtime test because the fixture's replacement path did not match the production artifact; fixed by restoring the artifact's exact runtime identity above.buck2:ts-sandbox:testat final headfe38c40db51be1bd6c456533a9347f0d3619a244: 5 passed, 0 failed, 28 assertions, 11.96 s, with test runner Bun 1.4.4. Contract freshness and Genie prerequisites also passed.check:quickatfe38c40db51be1bd6c456533a9347f0d3619a244: PASS, exit 0, clean worktree, 443 s admitted gate duration. Cache posture passed from the unchanged task's prior green cache; contract freshness, sandbox 5/0, Nix imports, format parity, standalone staging and Buck quick all passed. No remaining failing or dependency-skipped tasks. Command:devenv shell -- gate-slot --class eval --max-hold 3600 -- nice -n 19 devenv tasks run check:quick --no-tui.Complexity
One private Nix override file and one local overlay; no new runtime abstraction.
Concerns
Published launcher runtime is intentionally unchanged.
flake.niximports its own locked nixpkgs independently;nix/buck2.nix:88buildsbuck2-entrypointwith that package'sbun build --compile, embedding Bun 1.4.2 in the executable.scripts/buck2-entrypoint.sh:47executes this compiled launcher, not consumer-provided Bun. The separate official 1.4.2 compile-runtime pin innix/bun-compile-runtime.nixis also unchanged.The compiled launcher imports
buck2-file-watcher.ts, whose daemon-kill path usesspawnSync. Reachability of the upstream defect in that production path is an inference, not a reproduced production failure; changing consumer-facing runtimes is explicitly outside this PR's scope.Friction & bottlenecks
The older locked runtime explains the deterministic finalizer-probe failure. The focused posture suite also passes on 1.4.2 in isolation, so this does not claim to have deterministically reproduced the complete prior suite failure chain.
Follow-ups
Remove the private override once locked nixpkgs carries Bun >= 1.4.3 (enforced by evaluation). Consumer-facing runtime changes, if desired, require a separately scoped change including the compile-runtime contract.
References
CI regression delta
Current head: 3b3798c. The CI projection regression step also runs
buck2:rust:generators:test. Its contract fixture formerly launched the exact-version generator with the 1.4.4 runner executable. It now requires the task-declared 1.4.2BUN_BINfor generator invocations, with no ambient fallback; other fixture projections still use the 1.4.4 runner. The guard and committed contract are unchanged. Search across Buck, Genie, scripts and packages found no other generator-spawning test needing this exception.Focused contract integration file using the source-lease launcher and the task-equivalent declared runtime: 2 passed, 0 failed, 49 assertions, 12.46 s, runner Bun 1.4.4. This proof ran against the uncommitted delta before its commit. The full check receipt above remains at the prior head; no additional full check was run for this test/environment-only delta.
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimeagent_modelworktree