Repository navigation
fix: report a wedged input pipe when the renderer is responsive - #56085
Open
benjaminfrombe wants to merge 1 commit into
Open
benjaminfrombe wants to merge 1 commit into
benjaminfrombe wants to merge 1 commit into
Conversation
|
Suggested release note (advisory) The
This suggestion was generated automatically, so use your best judgment. This comment will update as the PR description is edited. |
3 tasks done
Contributor
|
For more information on signing commits, see GitHub's documentation on Telling Git about your signing key. |
benjaminfrombe
force-pushed
the
fix/input-pipe-stall-unresponsive
branch
from
November 28, 2026 13:59
bfde196 to
c0944c2
Compare
benjaminfrombe
force-pushed
the
fix/input-pipe-stall-unresponsive
branch
3 times, most recently
from
November 29, 2026 07:48
82d5d36 to
befd2e9
Compare
benjaminfrombe
force-pushed
the
fix/input-pipe-stall-unresponsive
branch
from
November 29, 2026 08:03
befd2e9 to
c828382
Compare
The input ack hang monitor escalates to RendererUnresponsive only when its PingMainThread probe times out. When the input path is wedged but the renderer main thread is alive, the ping always succeeds, so the monitor loops forever while dispatched input events are never received or acked. No unresponsive event is emitted and all input stays dead until the WebContents is reloaded. Bound the loop: if several consecutive monitoring cycles complete with the main thread answering pings while the in-flight event count never decreases, report the stall through the existing delegate_->OnInputEventAckTimeout() path so apps get the unresponsive event and can recover, and reset the lost in-flight accounting so later events can restart the monitoring cycle. Signed-off-by: benjaminfrombe <[email protected]>
benjaminfrombe
force-pushed
the
fix/input-pipe-stall-unresponsive
branch
from
November 29, 2026 08:21
c828382 to
b92c5cf
Compare
This branch has not been deployed
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.
Description of Change
Fixes #56084 (full evidence package: traces, timelines, and analysis there).
Validation status, CORRECTED after extended live testing: this patch fixes a real but DIFFERENT stall mode than the one in the linked issue. The patch detects a renderer-side stall (events received but never acked while pings are answered) and that detection works as designed. However, the wedge in the issue is browser-side: the browser forwards input but it never arrives in the renderer, in_flight_event_count_ stays 0, the ping-ack counter correctly resets, and input stays dead. Two full wedges were captured on the patched build with identical signature to the original report. A complete fix for the reported wedge needs browser-side detection (InputEventSentBlocking without renderer receipt while the renderer main thread is responsive) and possibly a WidgetInputHandler binding reset. The app-level CDP-canary watchdog (getpaseo/paseo#11198) remains the only working detection + recovery for the reported wedge mode. See the correction comment on issue #56084.
The input ack hang monitor escalates to
RendererUnresponsiveonly when itsPingMainThreadprobe times out. When the input path is wedged but the renderer main thread is alive, the ping always succeeds, soRenderInputRouter::OnPingAck()restarts the ack timeout and the monitor loops (monitoring -> pinging -> ping ack -> restart) forever while dispatched input events are never received or acked. Nounresponsiveevent is emitted and all input stays dead until the WebContents is reloaded. We captured this in a packaged Electron 45 app on macOS: after an app switch, the browser forwards input (ForwardMouseEvent/ForwardKeyboardEvent,InputEventSentBlockingposted immediately before the mojoDispatchEvent) while the renderer receives nothing, its main thread healthy and pumping tasks, for minutes on end.This adds a new Chromium patch,
fix_report_input_pipe_stall_when_renderer_is_responsive.patch, that bounds the loop: if several consecutive monitoring cycles complete with the main thread answering pings while the in-flight event count never decreases, the input path is wedged rather than the renderer being hung. The patch then reports the stall through the existingdelegate_->OnInputEventAckTimeout()path (so apps get theunresponsiveevent and can recover, e.g. by reloading) and resets the lost in-flight accounting so later events can restart the monitoring cycle. Any input ack resets the stall counter, and the decrement is guarded so a late ack for a dropped event cannot drive the count negative.The natural long-term home for this detection is upstream Chromium (
components/input/render_input_router.cc); this patch is structured so it can be proposed there and dropped from Electron once it rolls in, the same way therefactor_unfilter_unresponsive_eventsCL was handled.Checklist
npm testpassesNotes on the unticked items, stated plainly: this is a Chromium-layer patch carried by Electron; I verified it applies cleanly to the pinned Chromium checkout sources (git apply and git am both clean against 160.0.8181.0) and reviewed it against the surrounding code, but I have not built Electron or run npm test locally, so those boxes stay open for CI and reviewers. The scenario (input events lost with a live renderer main thread) cannot be constructed from the JS API in a spec test; a unit test would live upstream in Chromium's render_input_router tests together with the detection itself.
AI usage disclosure per the governance policy: the patch, PR, and the linked issue were prepared with a coding agent under my direction; I reviewed and verified every change.
Release Notes
Notes: Emitted the unresponsive event when input stalls with a live renderer.