event_loop: don't debug-panic on late main-VM enqueue_task_concurrent during process.exit - #36020
Open
robobun wants to merge 6 commits into
Open
event_loop: don't debug-panic on late main-VM enqueue_task_concurrent during process.exit#36020robobun wants to merge 6 commits into
robobun wants to merge 6 commits into
Claude / Claude Code Review
completed
Jul 26, 2026 in 18m 19s
Code review found 2 potential issues
Found 4 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | test/js/node/fs/fs-write-exit-race.test.ts:20 |
Test's __cxa_atexit trigger only reached on ASAN builds (quick_exit skips it) |
| 🟡 Nit | test/js/node/fs/fs-write-exit-race.test.ts:62-65 |
Uncommented 50ms setTimeout — observable signal exists |
Annotations
Check warning on line 20 in test/js/node/fs/fs-write-exit-race.test.ts
claude / Claude Code Review
Test's __cxa_atexit trigger only reached on ASAN builds (quick_exit skips it)
The test's race trigger relies on `__cxa_atexit` running `do_close_and_sleep` after `destroy()`, but on non-ASAN Linux builds `bun_core::Global::exit()` calls `quick_exit()` (which skips `__cxa_atexit` handlers) instead of `libc_exit()` — so on `bun bd --asan=off` the write is never unblocked and the test passes vacuously even with the fix reverted. This is fine in practice (default `bun bd` on Linux and the linux-x64-asan CI lane both enable ASAN, so the test is live where it matters), but cons
Check warning on line 65 in test/js/node/fs/fs-write-exit-race.test.ts
claude / Claude Code Review
Uncommented 50ms setTimeout — observable signal exists
The child fixture's `setTimeout(..., 50)` before `process.exit(0)` needs a comment naming why no observable signal exists (per REVIEW.md's ≥50ms rule) — but one *does* exist: since `rd` is opened `O_NONBLOCK`, a bounded poll of `fs.readSync(rd, Buffer.alloc(1))` (catching EAGAIN) until it returns >0 proves the work-pool thread has entered `write()` and is blocked. Consider replacing the fixed 50ms with that poll, or adding the comment; the 300ms atexit `usleep` makes actual flakiness unlikely, s
Loading