Closed Bug 2087406 Opened 19 days ago Closed 15 days ago

TRR pre-connect never happens on late beta/release or at Android cold start

Categories

(Core :: Networking: DNS, defect, P2)

defect

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr153 --- wontfix
firefox159 --- wontfix
firefox160 --- wontfix
firefox161 --- fixed

People

(Reporter: leggert, Assigned: leggert)

References

Details

(Keywords: regression, Whiteboard: [necko-triaged])

Attachments

(1 external file)

TRRService::MaybeSpeculativeConnectToTRR() (bug 2025145) has three problems:

  1. It returns early when TRRConnectionInfo() is null. The cached connection info is only created from TRR::SendHTTPRequest when network.trr.async_connInfo is set, which is early-beta-or-earlier only, so the pre-connect never happens on late beta and release.
  2. When it does connect, it uses the cached nsHttpConnectionInfo unchanged, while real TRR requests finalize theirs in TRRServiceChannel::ContinueOnBeforeConnect (anonymous, TRR_DISABLED_MODE). The speculative connection therefore appears to land in a different ConnectionEntry than TRR lookups use.
  3. At Android cold start GeckoRuntime sends geckoview-initial-foreground instead of application-foreground, so no pre-connect is attempted. In TRR-first mode the confirmation query from TRRService::Init opens the connection early; in TRR-only mode, or with network.trr.confirmationNS = skip, nothing does.

Proposed fix: create the connection info on demand and finalize it with the flags TRR requests use, skip the pre-connect when network.trr.use_ohttp is set, and also pre-connect on geckoview-initial-foreground.

Set release status flags based on info from the regressing bug 2025145

Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
Assignee: nobody → leggert
Status: NEW → ASSIGNED

Bug 2025145 did not regress this, this never worked even before that change.

No longer regressed by: 2025145
See Also: → 2025145
Pushed by leggert@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c74459568aba https://hg.mozilla.org/integration/autoland/rev/c008679ab928 Make the TRR pre-connect reuse the TRR connection entry and also run at Android cold start. r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 15 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch

The patch landed in nightly and ESR is affected.

:leggert, please make an uplift decision for ESR:

  • For ESR, nominate the patch for the appropriate ESR uplift approval if the fix should be included in ESR, or set the ESR status flag(s) to wontfix if an uplift isn't needed. Each affected ESR release needs a decision.

Uplift requests can be submitted from Lando: D338706.

See Requesting an Uplift for documentation on how to request an uplift.

For more information, please visit BugBot documentation.

Flags: needinfo?(leggert)

I want to let this soak in Nightly/Beta for a while first.

Regressions: 2088786
QA Whiteboard: [qa-triage-done-c162/b161]
Flags: needinfo?(leggert)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: