Skip to content

WebKit: the stage page stops responding after a large graph scenario loads (renderer harness) #151

Closed

Description

@agorischek

Symptom

On WebKit, the renderer harness's stage page sometimes stops responding entirely after a heavy graph scenario loads. Every request to the page then hangs: page.evaluate, locator.count inside the frame, and the stage's own in-page timers. The Playwright screencast also stops producing frames. The test burns its whole 360 s timeout (120 s on macOS) and passes on rerun.

When (UTC) Branch Job Spec Scenario / where
11-21 17:36 pane-machine (#147) browser (harness, webkit-desktop, 2/4) diff.spec.ts:36 graph graph/npm-express-5 dark diff, locator.count in the frame
11-21 18:05 pane-machine (#147), rerun same diff.spec.ts:36 graph graph/npm-express-5 dark diff, measure('settle')
11-21 16:09, 00:44 headless-view-model browser (harness, webkit-desktop, 2/4) arrowheads.spec.ts:22 graph page.evaluate(subject()) right after a load
11-21 02:27 utility-area browser-macos (harness 2/2) gallery.spec.ts:12 graph/npm-express-5 stays loading, then the target is closed
11-21 several main, PRs browser-macos affordances.spec.ts:37 graph/test-timings, graph/terraform-database-replacement: "Target page, context or browser has been closed"

What the trace shows

Trace from #147 attempt 2: public-browser-failure-Linux-packages-renderers-harness-webkit-desktop-2-4, run 44930946920.

  • graph/npm-express-5 loads in diff mode: loadScenario took 8.5 s (light took 7.3 s just before).
  • state() then answers: status ready, progress 1.
  • The next call, measure('settle'), never returns.
  • The last screencast frame is from 155 ms after state() answered. There are no frames for the remaining 240 s.

So the whole WebKit web process, not just one request, stops right after the renderer reports ready. WebKit has no site isolation here, so the sandboxed renderer frame shares the host page's process, and a renderer stuck in its document freezes the stage with it. Chromium doesn't hang on these scenarios.

Leads

  • Every hang is in the graph renderer, mostly its largest scenarios (npm-express-5, test-timings, terraform-database-replacement). They follow a load, when the frame takes its height and the renderer lays out and frames again (useFitScale → uncutStart, edge routing).
  • A synchronous computation whose cost explodes on one input would look like this: a long or unbounded layout, routing or framing pass. The closed Kit routing: crossing tests compare segment bounds first and test proximity last #34 ("Kit routing: crossing tests compare segment bounds first…") was about routing cost on large graphs.
  • To reproduce: run graph/npm-express-5 in diff mode, light then dark, on Linux WebKit in a loop, and record a JS profile or console.time around the graph's layout, routing and framing after the height arrives.

#153 makes the harness fail such a hang in 90 s, naming the request, the scenario and the stage's last state, instead of waiting out the test timeout. It doesn't fix the hang.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions