Open Bug 2098400 Opened 5 days ago Updated 1 day ago

Multi-second page load stalls on macOS with Happy Eyeballs v3 when UDP/443 is blocked (e.g. Netskope) and a Content Filter is active (e.g. CrowdStrike Falcon)

Categories

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

Firefox 160
defect

Tracking

()

UNCONFIRMED

People

(Reporter: tomasz.gieniusz, Assigned: kershaw)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged] )

Attachments

(1 external file)

Environment

  • Firefox 160.0.1 (build 20261116130455, Release channel, enrolled in happy-eyeballs-release-rollout); does not reproduce on Firefox Developer Edition
  • macOS 26.7.3 (25G342, arm64); Chrome on the same machine is unaffected
  • DoH: disabled (system DNS); system proxy mode (no explicit HTTP/SOCKS/PAC proxy configured)
  • Transparent system-level NEAppProxyProvider proxy (Netskope) silently dropping outbound UDP:443 + active NEFilterDataProvider Content Filter (CrowdStrike Falcon)

Steps to reproduce

  1. On macOS with a transparent system-level proxy (NEAppProxyProvider, e.g. Netskope) dropping UDP:443 and an NEFilterDataProvider content filter active (e.g. CrowdStrike Falcon), run Firefox Release 160.0.1 with network.http.happy_eyeballs_enabled = true and network.http.http3.enable = true.
  2. Browse public HTTP/3-advertising sites across a few tabs (e.g. Google Search, GitHub).
  3. Wait ~30 seconds after the UDP/443 burst and reload a page over TCP/HTTP/2.

Actual results

Sites periodically stall for 15-45 seconds while loading, including TCP/HTTP/2 resources.

In local MOZ_LOG, HAR, and proxy log captures:

  • Because the proxy is transparent to Firefox, Happy Eyeballs v3 and [h3only] Alt-Svc probing stay active.
  • Sites returning Alt-Svc: h3=":443" trigger OnMsgSpeculativeConnect with [h3only], fanning out UDP/443 sockets across multiple resolved IPs (e.g. 4 IPs for github.githubassets.com staggered at ~50 ms / ~100 ms / ~200 ms) with no TCP leg to cancel them early, and Netskope silently drops the flows.
  • ~30 seconds later, each timed-out HttpConnectionUDP socket takes ~1s to tear down (nsSocketTransportService::DetachSocket -> HttpConnectionUDP::CloseTransaction) on Socket Thread.
  • Unrelated TCP/HTTP/2 channels stall (Blocked in DevTools/HAR, with zero OS socket activity in proxy logs), then all unstick simultaneously the instant the last HttpConnectionUDP finishes detaching.

Switching to Firefox Developer Edition or setting network.http.http3.enable = false resolves the stalls immediately.

Expected results

When UDP/443 is blocked by a transparent proxy, Happy Eyeballs v3 should fall back to HTTP/2 over TCP without stalling unrelated connections.

Hypothesis

When an NEFilterDataProvider is attached to those dropped UDP flows, closing the socket in XNU (cfil_sock_udp_close_wait) appears to hit the 1000 ms cfil_close_wait_timeout waiting for the filter to detach (similar to Bug 1678446). Because PR_Close() runs synchronously on Socket Thread, closing N dead UDP sockets stalls all networking for roughly N seconds.

(Netskope and CrowdStrike Falcon are just the setup I observed this on, though any macOS transparent proxy or firewall dropping UDP:443 alongside an NEFilterDataProvider content filter would likely hit the same behavior.)

Workaround

Set network.http.http3.enable = false in about:config. It avoids opening UDP/443 sockets and has no downside when HTTP/3 is already blocked.

See also

  • Bug 1953459 ([meta] Happy Eyeballs v3)
  • Bug 2091405 (Enable Happy Eyeballs v3 by default on desktop)
  • Bug 2063452 (Happy Eyeballs v3 [h3only] isolation on UDP-blocking proxy)
  • Bug 1678446 (Prior macOS cfil_sock_close_wait 1s close() stall on Socket Thread)
Assignee: nobody → kershaw
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged] [necko-priority-queue]
Severity: S3 → S4
Priority: P2 → P3
Whiteboard: [necko-triaged] [necko-priority-queue] → [necko-triaged]

The root cause of the stalls is that closing a UDP socket can take about a
second on macOS when a content filter is attached, and we close these
sockets on the socket thread. This patch is a mitigation: when an h3
Alt-Svc validation fails without reaching the alternate, we exclude HTTP/3
for it until the network changes, so we don't keep validating it and
opening sockets that will be slow to close.

See Also: → 2099493
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: