Closed Bug 1854782 Opened 8 months ago Closed 7 months ago

Speculative connection to the default search engine when focusing on the search bar

Categories

(Core :: Networking: HTTP, defect)

Firefox 115
defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox-esr115 --- wontfix
firefox118 --- wontfix
firefox119 --- wontfix
firefox120 --- wontfix

People

(Reporter: aoia7rz7l, Unassigned)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [necko-priority-review] )

Attachments

(1 file)

7.26 KB, application/octet-stream
Details

Tested on 117.0.1 and 115.2.1esr.

Prerequisites:

  1. browser.search.widget.inNavBar is set to true.
  2. browser.urlbar.speculativeConnect.enabled is set to false.
  3. network.http.speculative-parallel-limit is to set to 0.

STR:

  1. (Optionally) Switch to offline mode by pressing Alt and then File > Work Offline.
  2. Open about:networking#http and note the domains listed there.
  3. Open about:networking#rcwn and note the number under Total network request count.
  4. Click on Refresh for a few times until the count is stable.
  5. Click/Focus on the search bar.
  6. Repeat steps 1-3.
  7. Click on AppMenu > History> Clear recent history... and clear everything.
  8. Repeat steps 1-4 twice.

Expected Behavior:

Domains listed in about:networking#http are unrelated to the search engines available.

Actual Behavior:

www.google.com was added to the list of domains shown in about:networking#http while the Total network request count in about:networking#rcwn1 did not visibly increase.

Mozregression returned

Last good revision: 0cae6ecbc3984ca8f45c8ae5a0bec250392a22c1
First bad revision: 3155d983a779ff98645129c066353f3204786f4c
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0cae6ecbc3984ca8f45c8ae5a0bec250392a22c1&tochange=3155d983a779ff98645129c066353f3204786f4c

The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Address Bar

Hello, thank you for the bug report!
Issue is reproducible on:

  • Firefox 118.0;
  • Nightly 119.0a1;
  • Firefox ESR 115.3.0;

Tested on:

  • Windows 10;
  • Ubuntu 22;
  • macOS 12;

Setting the Product to ‘Core’ and Component to ‘Networking:HTTP’. Please change if there’s a better fit, thank you.
Setting as NEW so the developing team can have a look.

Status: UNCONFIRMED → NEW
Component: Address Bar → Networking: HTTP
Ever confirmed: true
Product: Firefox → Core

Setting Regressed by field after analyzing regression range found by mozregression in comment #0.

Keywords: regression
Regressed by: 1813618

:keeler, since you are the author of the regressor, bug 1813618, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(dkeeler)

Do you have any client authentication certificates? (about:preferences -> View Certificates... -> Your Certificates)
What's probably going on here is before bug 1813618, if you had client authentication certificates, speculative connections were essentially disabled, so it makes sense that you wouldn't see a connection to google before then.

Flags: needinfo?(dkeeler) → needinfo?(aoia7rz7l)

(In reply to Dana Keeler (she/her) (use needinfo) (:keeler for reviews) from comment #5)

Do you have any client authentication certificates? (about:preferences -> View Certificates... -> Your Certificates)

No, nothing is listed under there in my profile.

What's probably going on here is before bug 1813618, if you had client authentication certificates, speculative connections were essentially disabled, so it makes sense that you wouldn't see a connection to google before then.

Well, I would prefer to keep mine that way. Would it be possible to provide a pref for this e.g. browser.search.widget.speculativeConnect.enabled?

Flags: needinfo?(aoia7rz7l)

Oh, right, now I remember - the detection was faulty and would disable speculative connections even without client auth certificates, so that tracks.
I don't know how to disable the behavior you're seeing. Kershaw?

Flags: needinfo?(kershaw)

I'm surprised to see that speculative connections are being made with network.http.speculative-parallel-limit set to 0, as per the listed prerequisites.

On second thought perhaps this is just another old bug resurfacing? I remember this happening pre-Quantum and after a quick check I was able to reproduce this on ESR52/60/68 but not ESR78.

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

(In reply to aoia7rz7l from comment #9)

On second thought perhaps this is just another old bug resurfacing? I remember this happening pre-Quantum and after a quick check I was able to reproduce this on ESR52/60/68 but not ESR78.

Yes, I don't think this is a regression but rather a very old bug that was hidden by bug 1813618 for a while.
Flagged for [necko-priority-review].

Whiteboard: [necko-priority-review]

(In reply to Dana Keeler (she/her) (use needinfo) (:keeler for reviews) from comment #7)

Oh, right, now I remember - the detection was faulty and would disable speculative connections even without client auth certificates, so that tracks.
I don't know how to disable the behavior you're seeing. Kershaw?

Yeah, setting network.http.speculative-parallel-limit to 0 is the only way to disable speculative connection.

Reporter,
Could you try to record a http log? The log might be able to tell us where the connection is from.
Thanks.

Flags: needinfo?(kershaw) → needinfo?(aoia7rz7l)
Attached file log.txt

Log was generated in an offline environment.

Flags: needinfo?(aoia7rz7l)

(In reply to aoia7rz7l from comment #13)

Created attachment 9355338 [details]
log.txt

Log was generated in an offline environment.

Thanks for the log.
I saw this in the log:

:57:14.330000 UTC - [Parent 2324: Socket Thread]: V/nsHttp DoSpeculativeConnectionInternal Transport ci=.S........[tlsflags0x00000000]www.google.com:443^partitionKey=%28https%2Cgoogle.com%29 not created due to existing connection count:0

This means that the speculative connection is not created.

What the active and the idle counts in about:networking#http? If they are 0, it means that Firefox only created a connection entry for www.google.com, but there was no real socket created.

Flags: needinfo?(aoia7rz7l)

(In reply to Kershaw Chang [:kershaw] from comment #14)

What the active and the idle counts in about:networking#http? If they are 0, it means that Firefox only created a connection entry for www.google.com, but there was no real socket created.

Both counts were 0 when Firefox is online, so I guess everything is working as expected? I had always assumed that network.http.speculative-parallel-limit is primarily reserved for web content when there are other prefs like browser.urlbar.speculativeConnect.enabled and browser.places.speculativeConnect.enabled.

Flags: needinfo?(aoia7rz7l)

:jesup could this be triaged for priority?

Flags: needinfo?(rjesup)

(In reply to aoia7rz7l from comment #15)

(In reply to Kershaw Chang [:kershaw] from comment #14)

What the active and the idle counts in about:networking#http? If they are 0, it means that Firefox only created a connection entry for www.google.com, but there was no real socket created.

Both counts were 0 when Firefox is online, so I guess everything is working as expected? I had always assumed that network.http.speculative-parallel-limit is primarily reserved for web content when there are other prefs like browser.urlbar.speculativeConnect.enabled and browser.places.speculativeConnect.enabled.

Thank you for looking into this Kershaw. I suppose we can close this as invalid?

Status: NEW → RESOLVED
Closed: 7 months ago
Flags: needinfo?(rjesup)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: