test: deflake crash-spec "js-execute-iframe" afterEach by force-killing wedged children#52148
Merged
MarshallOfSound merged 5 commits intoJun 26, 2026
Merged
Conversation
… wedged children The afterEach sent the default SIGTERM then polled children.length===0, which only drops when each child emits exit. A wedged crash fixture child can ignore SIGTERM and never emit exit, so the 10s waitUntil timed out. Send SIGKILL and await each child's real exit instead.
MarshallOfSound
approved these changes
Jun 26, 2026
dsanders11
approved these changes
Jun 26, 2026
…CallDepthScope DCHECK on subframe contexts
…er document-end emit ExplicitMicrotasksScope flips policy to kExplicit and asserts scope depth 0 on entry, which fails when document-end runs re-entrantly (window.open synchronous about:blank/iframe commit). A plain v8::MicrotasksScope nests correctly and still satisfies the CallDepthScope DCHECK, matching the IPC emit path.
|
No Release Notes |
This was referenced Jun 26, 2026
Merged
Contributor
|
I have automatically backported this PR to "42-x-y", please check out #52154 |
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #52155 |
Contributor
|
I have automatically backported this PR to "41-x-y", please check out #52156 |
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.
Requested by Samuel Attard · Slack thread
Before / After
Before: On busy Linux CI runners the
crash cases"js-execute-iframe" test intermittently fails in itsafter eachhook withwaitUntil timed out after 10000ms(~7.5% of runs), going red before Electron's test reranner masks it on retry.After: The hook tears down reliably even when a crash fixture's child process is wedged, so it no longer times out.
How
The
afterEachsent the defaultSIGTERMto each spawned child and then polledwaitUntil(() => children.length === 0). Thechildrenarray only shrinks when each child's ownexithandler fires. A wedged crash fixture (the whole point of these cases) can ignoreSIGTERMand never emitexit, so the count never reaches 0 and the 10swaitUntiltimes out in the hook even though the test body passed.The hook now attaches the
exitlistener first, sendsSIGKILL(which cannot be caught or ignored, so the process goes down promptly), and awaits each child's realexit— removing the dependency on the side-effecting array length. Children that have already exited are skipped (guarding againstESRCHon a dead pid).Verification
Root cause confirmed from CI logs of runs 28199457464 and 28199339066 (the recorded signal is the
afterEachwaitUntiltimeout following the fixture's own 30s test-body timeout — not the benignsurface_managerGPU log noise, which appears equally in passing runs). Locally: 27/27 crash cases pass normally, and 15/15 iterations pass under sustained CPU load.Closes #52140.
Notes: none