Repository navigation
test(e2e): the reload storm names a crash of webkit's network process instead of reading it as lost tasks - #573
Merged
Conversation
… instead of reading it as lost tasks Playwright's WebKit contexts keep IndexedDB in the network process's memory. When the Linux build's network process aborts on heap corruption during the reload storm, the next document reads an empty store and the spec failed with "0 pending", the symptom of lost writes. The count checks now say when the network process crashed during the test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
e2e/stress-tasks.spec.ts"five reloads in a row lose nothing and hydrate clean" failed once on WebKit in the weekly full matrix withExpected /50 pending/, received "0 pending • 0 archived". That reads as the store losing writes. It is not: WebKit's network process crashed during the storm.What happens. Playwright's WebKit contexts are ephemeral, so IndexedDB lives in the network process's memory. Each reload in the storm cancels about a hundred in-flight dev-server module requests. On a loaded machine the Linux WebKit build's network process then logs GLib refcount assertions (
g_atomic_ref_count_dec: assertion 'old_value > 0',g_atomic_rc_box_release_full: assertion 'real_box->magic == G_BOX_MAGIC') and aborts with glibc'scorrupted double-linked list. The web process reportsWebKit encountered an internal error. This is a WebKit bug.(WebLoaderStrategy::internallyFailedLoadTimerFired) and fails every in-flight load. The browser starts a new network process with empty storage, so the next document reads an empty store. The writes had committed: each one waits for the IndexedDB transaction'scomplete, and the list showed 50 before the storm. Killing the network process by hand in the middle of a reload gives the same page and the same failed-load text.What changes. No app or framework change; there is no data loss to fix. The storm test's two count checks now carry a message from
e2e/support/browser-crash.ts. When a load failed with "WebKit encountered an internal error", or the HMR socket reported "Network process crashed", the failure says the network process crashed and should be read as a browser crash. The test still fails then; re-running is a human decision.Reproduce:
Verify:
--repeat-each=10→ 10 passed.corrupted double-linked liston the browser's stderr. After this change, 9 passed and 1 failed, with:Error: the storm lost tasks — but WebKit's network process crashed during the test (WebKit encountered an internal error (http://localhost:58791/manifest.json)), which empties an ephemeral context's storage: read this as a browser crash, not as the app losing writes.WPENetworkProcessmid-reload → in-flight loads fail with "WebKit encountered an internal error", HMR socket "Network process crashed", page shows0 pending • 0 archived.biome check e2e/,tsc --build(playground) clean.Tested on: Linux, Playwright 1.61.1 WebKit (WPE), local stress config.
Not tested: macOS WebKit; Safari (its network stack is not GLib's and its IndexedDB is on disk).