Open Bug 1816677 Opened 2 years ago Updated 1 year ago

HTTP/3 won't be retried if first destination is unreachable

Categories

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

Firefox 109
Desktop
Windows
defect

Tracking

()

REOPENED
116 Branch
Tracking Status
firefox-esr115 --- disabled
firefox112 --- wontfix
firefox114 --- wontfix
firefox115 --- wontfix
firefox116 --- disabled
firefox117 --- disabled
firefox118 --- disabled

People

(Reporter: rbucata, Assigned: kershaw)

References

(Blocks 1 open bug, Regressed 1 open bug, )

Details

(Whiteboard: [necko-triaged][necko-priority-queue])

Attachments

(1 file, 1 obsolete file)

From github: https://github.com/webcompat/web-bugs/issues/118205.

<!-- @browser: Firefox 109.0 -->
<!-- @ua_header: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0 -->
<!-- @reported_with: unknown -->
<!-- @public_url: https://github.com/webcompat/web-bugs/issues/118205 -->

URL: https://cloudflare-quic.com/

Browser / Version: Firefox 109.0
Operating System: Windows 10
Tested Another Browser: Yes Chrome

Problem type: Something else
Description: no quic protocol used in private browsing mode
Steps to Reproduce:
firefox doesn`t use http/3 in private browsing mode but chrome use even in private mode and i tested in youtube and https://cloudflare-quic.com/

<details>
<summary>Browser Configuration</summary>
<ul>
<li>None</li>
</ul>
</details>

From webcompat.com with ❤️

Change performed by the Move to Bugzilla add-on.

OS: Android → Windows
Priority: -- → P3
Hardware: Unspecified → Desktop
Summary: cloudflare-quic.com - see bug description → cloudflare-quic.com - firefox doesn`t use http/3 in private browsing mode
Version: unspecified → Firefox 109
Summary: cloudflare-quic.com - firefox doesn`t use http/3 in private browsing mode → cloudflare-quic.com - Firefox doesn`t use http/3 in private browsing mode

Hello Valentin, has this something to do with Necko? Do we do differently in private windows for quic?

Flags: needinfo?(valentin.gosu)

So, if you load https://cloudflare-quic.com/ in the browser and don't have DNS over HTTPS (network.trr.mode is not 2 or 3), then the first time we would use HTTP/2 and only use HTTP/3 when we get the "alt-svc" header (subsequent loads)
This happens in both regular and private browser (but may be more evident in PB because when you open it there is a fresh cache).
When DNS over HTTPS is enabled, we always get HTTP/3

Raul, can you confirm this behaviour?

Flags: needinfo?(valentin.gosu) → needinfo?(raul.bucata)

Valetin, if I enable the setting via Firefox from about:preferences#general, in the Network Settings section, the page still returns that HTTP/2 is being used, in both Normal and Private Mode, after refreshing the page multiple times. The same applies if I change network.trr.mode pref from 0 to either 2 or 3. Is there somewhere else that I should be looking to see if HTTP/3 is being used, beside the message displayed on the page?

Flags: needinfo?(raul.bucata) → needinfo?(valentin.gosu)

I was able to reproduce this.
It seems apart from the first issue with alt-svc, we sometimes fail to connect to the http/3 endpoint, so we add the host to the excluded list, so it keeps using http/2 regardless of how often we refresh. Executing Services.obs.notifyObservers(null, "network:reset-http3-excluded-list", "") in the browser console and refreshing gets me http/3 again, so this is definitely the problem.
This seems to happen regardless if we're using TRR or not.

Kershaw, could you take a look? Let me know if you can't reproduce it, maybe I can capture some logs for you.

Blocks: QUIC
Severity: -- → S3
Component: Privacy: Anti-Tracking → Networking: HTTP
Flags: needinfo?(valentin.gosu) → needinfo?(kershaw)
Priority: P3 → P2
Whiteboard: [necko-triaged]
Flags: needinfo?(kershaw)
Whiteboard: [necko-triaged] → [necko-triaged][necko-priority-review]

Kershaw and I debugged this yesterday. It seems the failure usually only happens when TRR is turned on. And that's because the first HTTP/3 tries are with an IPv6 address, and when you don't have IPv6 that fails. We need to also add a retry with IPv4 logic to UDP connections.

Whiteboard: [necko-triaged][necko-priority-review] → [necko-triaged][necko-priority-review][neck-next]
Whiteboard: [necko-triaged][necko-priority-review][neck-next] → [necko-triaged][necko-next]
Whiteboard: [necko-triaged][necko-next] → [necko-triaged][necko-priority-review][necko-next]
Whiteboard: [necko-triaged][necko-priority-review][necko-next] → [necko-triaged][necko-priority-next]
Whiteboard: [necko-triaged][necko-priority-next] → [necko-triaged][necko-priority-queue]
Assignee: nobody → kershaw
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9ccaad4630db Allow to retry diffrent IP family for Http/3, r=necko-reviewers,valentin
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

This issue affects our ability to use HTTP/3. If we don't see any regressions from this patch we should consider uplifting to esr115

Right now, that just means requesting Beta uplift :-)

Regressions: 1837252

Backed out for causing DNS related crashes bug 1837252.

Status: RESOLVED → REOPENED
Flags: needinfo?(kershaw)
Resolution: FIXED → ---
Target Milestone: 116 Branch → ---
Backout by abutkovits@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/20d429c3c3eb Backed out changeset 9ccaad4630db for causing DNS related crashes (bug 1837252). a=backout
Attachment #9336737 - Attachment is obsolete: true
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dfe0fed4de68 Allow to retry diffrent IP family for Http/3, r=necko-reviewers,valentin
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0ea0074ef6d0 Allow to retry diffrent IP family for Http/3, r=necko-reviewers,valentin
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Summary: cloudflare-quic.com - Firefox doesn`t use http/3 in private browsing mode → HTTP/3 won't be retried if first destination is unreachable
Regressions: 1840981

Is this something we should consider uplifting to ESR115?

Flags: needinfo?(kershaw)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #18)

Is this something we should consider uplifting to ESR115?

Yes, I'll request an uplift.

Flags: needinfo?(kershaw)

Comment on attachment 9338618 [details]
Bug 1816677 - Allow to retry diffrent IP family for Http/3, r=#necko

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Users could still use HTTP/2 to connect, but the server does support HTTP/3.
  • User impact if declined: The same as the above reason.
  • Fix Landed on Version: 116
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): The previous version of this patch caused some crashes before and this change is not straightforward, so I think the risk is between low and medium.
    Note that this feature can be disabled via a pref and we do have a unit test for this.
Attachment #9338618 - Flags: approval-mozilla-esr115?

Comment on attachment 9338618 [details]
Bug 1816677 - Allow to retry diffrent IP family for Http/3, r=#necko

Approved for 115.1esr

Attachment #9338618 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+

:kershaw before uplifting this, should we be concerned with bug 1840981 ?

Flags: needinfo?(kershaw)

(In reply to Dianna Smith [:diannaS] from comment #22)

:kershaw before uplifting this, should we be concerned with bug 1840981 ?

I think it's fine, since all failures happened when the socket process is enabled, and the socket process is not enabled by default.

Flags: needinfo?(kershaw)
Regressions: 1847066

network.http.http3.retry_different_ip_family was disabled in 116.0.3 in bug 1847066
netwerk/test/unit/test_http3_dns_retry.js was disabled in bug 1840981

debated setting 116 to disabled since there was more on this bug. :kershaw should we reopen this?

Flags: needinfo?(kershaw)

Yeah, let's reopen this.
Thanks.

Status: RESOLVED → REOPENED
Flags: needinfo?(kershaw)
Resolution: FIXED → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: