Skip to content

Renderer-crash test: wait for the crash itself, and give the fixture time under load - #2800

Merged
davidmckayv merged 1 commit into
mainfrom
fix/renderer-crash-flake
Dec 2, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
fix/renderer-crash-flake

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

The renderer-crash test failed in the merge queue (run 46925536152, "app (real browser, WebKit) (shard 2 of 3)") with "crashes once" read as failed. It passes on an idle machine and failed under load.

Why it was timing-dependent

  • The fixture ran under bun's default 5-second test timeout. A fixture test that crashes Chromium two or three times, opening a page each time, took longer under CI's load. bun then failed that test for its time, killed the Chromium it had left running ("killed 1 dangling process"), and every fixture test after it failed too. The parent test read that as a crash that was not run again.
  • The harness waited a fixed 100ms after every failure for Playwright's crash event. A crash reported later than that counted as the test's own failure.
  • The fixture's crashRenderer took goto's failure to mean the renderer was gone. goto("chrome://crash") fails with ERR_ABORTED about 200ms before the renderer dies, and up to seconds before under load, so the next call could run against a page that had not crashed yet.

The fix

  • renderer-crash.ts: no fixed wait. A failure counts as a crash if Playwright has already reported one. If the failure says its page went away ("Target crashed", "Page crashed", "Target page, context or browser has been closed") and no crash has been reported yet, the harness waits for the crash event and stops as soon as it arrives, for 3 seconds at most. Any other failure is decided at once.
  • renderer-crash.fixture.ts: crashRenderer waits for the page's crash event.
  • renderer-crash.test.ts: the fixture runs with a 60-second test timeout, and the parent test's timeout goes from 120 to 300 seconds. What it proves stays the same: a crashed renderer runs the test again, up to twice and no more, and any other failure fails on the first go.

Proof

Stress on a 16-core Actions runner (openbot-ubuntu-16core, the WebKit job's Playwright image and OPENBOT_APP_ENGINES=chromium,webkit): renderer-crash.test.ts run 100 times, 24 at a time, alongside 24 busy-loop processes. This was a temporary push-only workflow on a branch that has since been deleted (run 46931846502).

passed
before (main at 903705c) 2 / 100 (an earlier run: 0 / 100)
after (this PR's head) 100 / 100

The failures before matched the merge queue's (expect(result("crashes once")).toBe("pass") and the tests after it). Each one came from the fixture's 5-second timeout and the browser it killed.

Run normally on a Mac, with the fix: 3 of 3 with no engine set, and 3 of 3 with OPENBOT_APP_ENGINES=chromium,webkit.

Changelog

none

…time under load

The fixture's tests ran under bun's default 5-second timeout. Under CI's load,
three crashes and new pages took longer: bun failed the test for its time,
killed the Chromium it had left running, and every fixture test after it
failed, which the parent test read as a crash that was not run again
(merge-queue run 46925536152). The fixture now gets 60 seconds a test.

The harness waited a fixed 100ms after every failure for Playwright's crash
event. It now waits for the event itself, only when the failure says its page
went away, for 3 seconds at most, and decides at once for any other failure.
The fixture's crashRenderer waits for the page's crash event rather than
taking goto's failure to mean the renderer is gone: goto fails with
ERR_ABORTED about 200ms before the renderer dies, and up to seconds before
under load.
@davidmckayv
davidmckayv force-pushed the fix/renderer-crash-flake branch from 9a5c5e9 to cf95080 Compare December 2, 2026 21:18
@davidmckayv
davidmckayv added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit fb48330 Dec 2, 2026
38 checks passed
@davidmckayv
davidmckayv deleted the fix/renderer-crash-flake branch December 2, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant