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
test: browser session status test flakes under parallel load #224
packages/browser/test/session.test.ts > "getBrowserSessionStatus (fake binaries)" > "reports both legs live and overall alive" can fail under heavy host load:
Error: Chrome exited during startup.
DevToolsActivePort file was not created before the Chrome process exited; chrome.log tail:
[empty]
❯ waitForReadyPort packages/browser/src/session.ts:404:9
❯ finishBrowserStartup packages/browser/src/session.ts:439:19
❯ createBrowserSession packages/browser/src/session.ts:664:12
❯ packages/browser/test/session.test.ts:340:21
The test uses a fake Chrome binary, and the empty log suggests the fake process exits or is reaped before it writes the port file when the machine is busy.
Where it was found
Local validation for PR #218 (#199) at feb1781, in one full bun run test:coverage run while a second full suite ran on the same host. The file passed 3 of 3 times alone on that branch and 3 of 3 times on origin/mainb9ea7ce. The PR does not touch the browser package.
Acceptance criteria
The test passes reliably when the full suite runs under parallel load, without weakening what it asserts about both legs being live.
Product startup behavior and timeouts stay unchanged unless a real defect is found.
Checklist
Find why the fake Chrome exits before writing DevToolsActivePort under load
Make the fixture or the test deterministic
Run the full suite several times under parallel load without the failure
Investigation result: no repro and no fixture defect found, so there is no change yet.
The target test passed in every run. That includes 48 of 48 targeted runs under 8-way parallel load on 2 pinned CPUs and all 4 concurrent coverage suites. It also passed in 23 of 24 file runs beside two concurrent full suites. The one miss was a vitest "Worker exited unexpectedly" before any test ran.
The "ready" fake Chrome has no timing-dependent exit. It exits only through an uncaught error, which would print a stack to chrome.log, or through a signal. The supervisor ignores SIGTERM, SIGINT and SIGHUP after start. An empty chrome.log plus "exited" means the supervisor stopped matching its recorded identity with nothing logged. That fits an external signal better than a fixture race. All product kill paths are identity-checked, and no test kills processes by name. Temporary diagnostics and two signal-catching canaries saw no unexpected signal.
If it recurs, capture the exit signal of the fake and the supervisor first. A fake that logs SIGTERM or SIGHUP before it re-raises would do, or auditctl or bpftrace. Do that before any fixture change, because a test cannot fix an external kill.
This most likely shares the cause of #253. Under concurrent suites, processes in the test tree are SIGKILLed from outside the suites' process trees. That matches this failure: an empty chrome.log and a supervisor that exited with nothing logged. PR #272 logs the signal when a vitest worker dies this way. The sender still needs root tracing, described on #253. This issue stays open until that is resolved.
Activity
ElbertePlinio commentedon Oct 5, 2026
Investigation result: no repro and no fixture defect found, so there is no change yet.
The target test passed in every run. That includes 48 of 48 targeted runs under 8-way parallel load on 2 pinned CPUs and all 4 concurrent coverage suites. It also passed in 23 of 24 file runs beside two concurrent full suites. The one miss was a vitest "Worker exited unexpectedly" before any test ran.
The "ready" fake Chrome has no timing-dependent exit. It exits only through an uncaught error, which would print a stack to chrome.log, or through a signal. The supervisor ignores SIGTERM, SIGINT and SIGHUP after start. An empty chrome.log plus "exited" means the supervisor stopped matching its recorded identity with nothing logged. That fits an external signal better than a fixture race. All product kill paths are identity-checked, and no test kills processes by name. Temporary diagnostics and two signal-catching canaries saw no unexpected signal.
If it recurs, capture the exit signal of the fake and the supervisor first. A fake that logs SIGTERM or SIGHUP before it re-raises would do, or auditctl or bpftrace. Do that before any fixture change, because a test cannot fix an external kill.
ElbertePlinio commentedon Oct 6, 2026
This most likely shares the cause of #253. Under concurrent suites, processes in the test tree are SIGKILLed from outside the suites' process trees. That matches this failure: an empty chrome.log and a supervisor that exited with nothing logged. PR #272 logs the signal when a vitest worker dies this way. The sender still needs root tracing, described on #253. This issue stays open until that is resolved.