Closed Bug 1781453 Opened 4 years ago Closed 25 days ago

Intermittent netwerk/test/unit/test_http3.js | single tracking bug

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: jmaher, Assigned: mkmelin)

References

Details

(Keywords: intermittent-failure, intermittent-testcase, Whiteboard: [necko-triaged])

Attachments

(3 external files)

No description provided.

Additional information about this bug failures and frequency patterns can be found by running: ./mach test-info failure-report --bug 1781453

Whiteboard: [necko-triaged]
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → NEW
Status: NEW → RESOLVED
Closed: 3 years ago → 3 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 3 years ago → 3 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 3 years ago → 2 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 2 years ago → 2 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Status: REOPENED → RESOLVED
Closed: 2 years ago → 1 year ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
See Also: → 2012615
Whiteboard: [necko-triaged][stockwell disable-recommended] → [necko-triaged]

On Windows, an unconnected UDP socket surfaces a previous send's ICMP
"port unreachable" as a ConnectionReset (WSAECONNRESET) on the next
recv. During the QUIC handshake this happens when a datagram is sent
microseconds before the peer's socket is ready -- a loopback race that
shows up reliably on slow/contended CI workers but not on Linux/macOS.

neqo_http3conn_process_input treated only WouldBlock as recoverable and
returned every other recv/send error as fatal (into_nsresult maps
io::ErrorKind::ConnectionReset to NS_ERROR_NET_RESET), so a single stray
ICMP tore the whole HTTP/3 connection down mid-handshake. necko then
fell back to H2 (Alt-Used: 0) and never established the expected h3
route, while plain TCP connections were unaffected -- producing the
intermittent failures in test_http3.js, test_http3_421.js,
test_http3_alt_svc.js, test_http3_trans_close.js and the HTTP/3 proxy
tests on Windows.

Treat ConnectionReset like WouldBlock in both the recv and send loops:
drop the affected datagram and let QUIC retransmit rather than closing
the connection. This mirrors how quinn/Chromium handle the same Windows
behavior by disabling SIO_UDP_CONNRESET.

(Assisted by Claude)

The failures have been perma for Thunderbird Windows on CI for some time. With this change the failures seem gone.

Assignee: nobody → mkmelin+mozilla

The http3server's CONNECT-UDP inner forwarding sockets closed the whole
session whenever poll_recv/poll_send returned an error. On Windows a
ConnectionReset (WSAECONNRESET) from an earlier datagram's ICMP "port
unreachable" is not fatal for a connectionless socket, so this tore down
otherwise-healthy MASQUE tunnels and failed the http3 proxy xpcshell
tests.

Ignore ConnectionReset on the inner socket recv/send and keep the
CONNECT-UDP session alive, letting QUIC retransmit, instead of closing it.

On Windows an unconnected UDP socket surfaces a previous send's ICMP
"port unreachable" as a ConnectionReset (WSAECONNRESET) on a later
recv/send. For the long-lived test http3server this happens constantly,
since every xpcshell test is a short-lived process whose UDP port closes
mid-connection.

The neqo-bin ServerRunner treated any non-WouldBlock socket error as
fatal (Socket::recv propagated it, process_inner's send loop did
return e), so the first such reset ended the run loop and dropped the
listening socket. The persistent MOZHTTP3_PORT server then went dark for
the rest of the suite and every test pointed at it failed with the QUIC
handshake never completing until the 30s timeout.

Treat ConnectionReset like WouldBlock: Socket::recv returns Ok(None), and
process_inner drops the datagram and continues.

This is a local patch to the vendored crate (.cargo-checksum.json updated
accordingly) and should be upstreamed to mozilla/neqo and re-vendored.

(Assisted by Claude)

I believe this bug will be fixed with bug 2065405, which includes https://github.com/mozilla/neqo/pull/3895.

Related: bug 1888457

Depends on: 2065405
See Also: → 1888457
Whiteboard: [necko-triaged][stockwell disable-recommended] → [necko-triaged]
Status: REOPENED → RESOLVED
Closed: 1 year ago → 25 days ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: