Closed Bug 2058370 Opened 1 month ago Closed 1 month ago

get_page_content hangs forever when a page read never commits

Categories

(Core :: Machine Learning: On Device, defect, P1)

defect

Tracking

()

VERIFIED FIXED
155 Branch
Tracking Status
firefox154 --- verified
firefox155 --- verified

People

(Reporter: thasan, Assigned: thasan)

References

(Blocks 1 open bug)

Details

(Whiteboard: [aiplatform])

Attachments

(2 files)

PageExtractorParent.getHeadlessExtractor loads a URL in a hidden browser and ends with:

return callback(await actorResolver.promise);

actorResolver (PageExtractorParent.sys.mjs:211) is only ever resolved from inside the onLocationChange listener, and nothing above it has a timeout — HiddenFrame.sys.mjs:216 withHiddenBrowser is a bare try/finally. Several paths leave the promise pending forever, which hangs the Smart Window turn with no error, no recovery, and no user-visible cause.

Blocks: 2058700
See Also: → 2058754
Assignee: nobody → thasan
Status: NEW → ASSIGNED
Whiteboard: [aiplatform]
Pushed by thasan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/900a2c58924a https://hg.mozilla.org/integration/autoland/rev/0e766e62aa6b Time out a headless page read that never loads. r=ai-platform-reviewers,ai-security-reviewers,nordzilla,bjohns,omarg
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch

Verified as fixed in our latest Nightly 155.0a1 (2026-07-30)

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-ver-done-c155/b154]
QA Contact: rdoghi

I think this issue also occurs in Beta, im getting some large hang times when im searching through history, or when Im trying to get the content of a page.

Status: VERIFIED → RESOLVED
Closed: 1 month ago1 month ago
QA Whiteboard: [qa-ver-done-c155/b154] → [qa-ver-needed-c155/b154]

The patch landed in nightly and beta is affected.
:thasan, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(thasan)

Original Revision: https://phabricator.services.mozilla.com/D314825

(cherry picked from commit 900a2c58924a65093f2eead579dace01f18bd357)

Attachment #9620097 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Smart Window's get_page_content hangs forever when a headless page read never commits, a stalled network response, or bot detection redirecting to a challenge page on another host. The turn stalls with no error, no recovery, and no user-visible cause.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: An example website, "tell me about ign.com go on the page" Ign.com should block headless extraction and the page should never load. In this case after 15s the headless extractor should return and show that it couldnt load the page.
  • Risk associated with taking this patch: low
  • Explanation of risk level: Adds a timeout around an await that previously had none, plus a rejection handler on an already-existing promise, governed by a new pref (browser.ml.pageExtractor.headlessTimeoutMs, default 15s). Behavior is unchanged whenever the load commits; the only new path is the failure path that previously hung forever. Scoped to the PageExtractor headless read.
  • String changes made/needed?: None.
  • Is Android affected?: no
Flags: qe-verify+
Flags: needinfo?(thasan)
QA Whiteboard: [qa-ver-needed-c155/b154] → [qa-ver-needed-c155/b154][uplift]
Attachment #9620097 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified as fixed in our latest Beta 154.0b6

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-ver-needed-c155/b154][uplift] → [qa-ver-done-c155/b154][uplift]
Flags: qe-verify+
Blocks: 2057625
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: