Repository navigation
Skip tabs whose renderer crashed when binding Playwright execution - #465
Draft
robertjamesprior wants to merge 1 commit into
Draft
robertjamesprior wants to merge 1 commit into
robertjamesprior wants to merge 1 commit into
Conversation
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.
Summary
A tab whose renderer is killed by the guest OOM killer keeps its target and still reports
isClosed() === false. Page selection only filtered onisClosed(), so the default (pinned) Playwright executor kept bindingpageto the dead tab and every call failed withPage crashedfor the rest of the session. The browser itself is fine: a live tab clears it.The fix tracks crashed pages and excludes them from selection:
openPagesstarts acrashlistener on every page it enumerates, tracked in aWeakSet.TabMissingError, which is the signal the API already turns into "open a replacement tab and resend the call". No Go change is needed for this: the recovery path atplaywright_executors.go:281already exists.page.on('crash')fires for a kernel-killed renderer — verified on a live 1GiB headless browser while the guest kernel'soom_killcounter went 0 -> 1, with the tab still reportingisClosed() === falseafterwards.Tests
Added
a crashed tab is not bound and a replacement page is opened, using the existing loader-stub harness. It fails onmainwith "bound the crashed tab instead of a replacement" and passes with the fix.node --experimental-vm-modules --test runtime/*.test.tsis 44/44 green andtsc --noEmitis clean.Known limitations