Repository navigation
Closed
Labels
bugSomething isn't working
Description
What happened
Found by the fourth review of #571, lower confidence, timing and budget only (no wrong answer).
After #571 a frame that never answers is asked again on every read of the page, so a permanently hung iframe costs time on every command.
All four items share one cause: silent frames are re-asked without a per-command budget, and the retry is sized to the gateway's limits, not to the command's deadline.
Page::frames()(hided/src/browser_page/page.rs) re-asks every silent frame (Page.enable, tag, scan) on each call and blocks a fullSTEP(8 s) for each unanswered round, and a command calls it several times.
A page with one iframe stuck in a loop:click @k:3with verify calls it in the capture,frame(),frame_offsetand each of the three change reads, about 6 x 8 s = 48 s.
A frame that answersPage.enablebut not its tag read adds a second round per call, and a nested level adds more, which can pass the 120 s command deadline and end with a genericpage_unresponsive.
Scans of silent parents are sequential (8 s each), not batched.
Thetriedset bounds retries only within one call.wait_for(hided/src/browser_page/actions.rs) checks its deadline only after a whole poll, and each poll begins withframes()blocking a full step on a frame that never answered.
wait --text Done --timeout 5on a page with one hung iframe returns after about 8 s; with--timeout 60and several hung levels the last poll can start just before the deadline and run to about 24 s, so the 120 s command limit can cut it off instead of reportingtimeout.Page::frame()mapsLookup::Unknownto a silentpage_unresponsivewhenever any unrelated frame is silent.
A ref from a frame that navigated, used while an ad iframe never answersPage.enable, getspage_unresponsivewith "retry, or ask the operator", neverref_stalewith the "take a fresh snapshot" guidance, so a caller can retry the same stale ref forever.Cdp::call_all(hided/src/browser_page/cdp.rs) sizes its rounds to the gateway's 32-command pending cap, but hided gives up atSTEP(8 s) while the gateway keeps an unanswered command pending until its 10 s deadline.
With about 17 or more hung frames (the cap is 24), a secondframes()call starts at 8 s while the first batch is still pending until 10 s; pending passes 32 and the gateway closes the connection with 1013, so the command failsbrowser_limitinstead of noting the silent frames.
What you expected
- A frame that did not answer is retried within a per-command budget, not on every read: after one unanswered round in a command it is noted and skipped for the rest of that command, or retried at most once more at the end.
waitreportstimeoutwithin its own deadline (plus at most one step), whatever the frames do; a poll's reads are bounded by the time left.- A ref whose tag no frame carries answers
ref_stalewith the re-snapshot guidance when the silent frame cannot be that ref's frame, orpage_unresponsivewith anext_actionthat also says to take a fresh snapshot. - Pending commands never pass the gateway's cap: the batch size counts commands the gateway still holds from an earlier round (those abandoned at 8 s are pending until 10 s), so no read ends with
browser_limitbecause of silent frames.
Steps to reproduce
Each is a deterministic test on the scripted gateway in hided/src/browser_page/fake_gateway.rs, with ordering and counts asserted, not wall-clock bounds (docs/TESTING.md).
- Frames
hung: 1, then runclickwith verify and count thePage.enablesent to the hung frame: expect a bounded number per command, not one per read. wait --textwith a hung frame and atimeoutshorter thanSTEP: expecttimeout, not a poll that runs a whole step past it.click @old:3withhung: 1and no frame carryingold: expect the re-snapshot guidance.hung: 24, twoframes()calls in a row against a gateway that keeps abandoned commands pending: expect the commands in flight to stay at or under 32.
Versions
- hide: main after Note an unresponsive frame in the browser snapshot and refuse dragged files through the gateway #571
- Herdr: pinned in
contracts/herdr-bundle.json - macOS: any
Diagnostics
From the fourth review pass on #571 (items it ranked lower confidence); no log lines.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
feat: make the Windows device kit beside both Linux kits in every rel…