You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky: server/file-pool.test.ts hangs CI Fast checks when its readGate thread is ended before it opens the FIFO #2296
server/file-pool.test.ts hung in CI's Fast checks on run 40779586477 (#2293 @414ae278, a PR that does not touch it): the only one of 535 unit files that never reported; last output 22:28:20 UTC, job cancelled at its 10-minute limit at 22:35:38.
Cause
The test "keeps a descriptor its thread is reading open until that thread is gone, when the last server stops" holds its file thread with the fake worker's readGate (server/file-worker.fake.ts). That gate says the thread is reading (Atomics.notify on cell 1) before it opens the FIFO for reading, a blocking open(2). The test then ends the thread (release()) and opens the FIFO's writer with a blocking openSync(fifo, "w") on the test's main thread. A thread ended between the notify and its own open never opens the reader, so the writer's open waits forever, and Bun's per-test timeout cannot fire while the main thread is blocked in a system call. #2265's PR body already named this gap as a candidate flake.
Reproduction
A 500 ms Atomics.wait added in the fake's readGate between the notify and the FIFO open (scratch, not committed) on main 72f2edf: timeout 30 bun test server/file-pool.test.ts is killed at 30 s (exit 124), stopped in that test.
Product code (server/file-pool.ts) is not affected: the server's thread never waits on a file thread (it posts, terminates without awaiting, and closes descriptors).
Activity
test(files): close the FIFO gates' descriptor once their ended thread…
test(files): open the read-held thread's FIFO before it says it is re…