[BUG]: WebKit browser tests fail intermittently in CI
Describe the bug
The WebKit browser test suite intermittently fails in GitHub Actions across unrelated PRs and on main. The failing Node version and test file vary between runs, while the Chromium and Firefox suites usually pass.
The failures I have seen are in webkit-memory.test.web.js and webkit-idb.test.web.js, with errors such as:
page.evaluate: RuntimeError: Out of bounds memory accessINITDB failed to initialize: child process was terminated by signal 1: HangupRuntimeError: call_indirect to a null table entryTo Reproduce
I do not have a reliable local reproduction. Running the repository's "Build and test PGlite packages" workflow eventually hits it.
Some examples from unrelated changes:
- PR #1079, Node 21 and 22: https://github.com/electric-sql/pglite/actions/runs/32092403347
- PR #1081, Node 24: https://github.com/electric-sql/pglite/actions/runs/32089886034
- The next run completed successfully: https://github.com/electric-sql/pglite/actions/runs/32090752581
- PR #1073, Node 22: https://github.com/electric-sql/pglite/actions/runs/30863936008
- PR #1067, Node 23: https://github.com/electric-sql/pglite/actions/runs/30149767473
- PR #1066, Node 23: https://github.com/electric-sql/pglite/actions/runs/29791702977
- PR #1060, Node 20: https://github.com/electric-sql/pglite/actions/runs/29666399267
main, Node 24: https://github.com/electric-sql/pglite/actions/runs/30364466212
Logs
In the PR #1079 run, the OPFS-AHP tests passed before the failures occurred in the WebKit memory/IDB tests. The same pattern appears in unrelated runs: the failure is isolated to WebKit and moves between Node matrix entries and storage targets.
Details
- Environment: GitHub-hosted Ubuntu runners
- Node versions observed: 20.x through 24.x
- Test runner: the repository's current Vitest/Playwright setup
- Browser target: WebKit
- Reproduction locally: not reproduced so far
Additional context
This looks like a pre-existing flaky WebKit/initdb lifecycle issue rather than a failure tied to a specific PR. It would be useful to identify the first failing lifecycle boundary and add enough diagnostics to distinguish an initdb child-process shutdown from a WebAssembly runtime failure.
Source: electric-sql/pglite