net: listening on dual-stack UDP socket sometimes silently fails on macOS #67226
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Darwin
Milestone
Go version
go version go1.22.0 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
I start a dual-stack UDP listener:
Then I send a UDP datagram (from localhost) to this listener and assert that this packet is received. At the same time, I capture all traffic on localhost using Wireshark.
https://gist.github.com/marten-seemann/bfa811133331b9c053137fd5df12638d
What did you see happen?
Running the test 10000 times, I pretty reliably get a test failure on macOS. The datagram is sent (as confirmed by the Wireshark trace), but it never arrives at the listener.
This is not caused by UDP packet loss (which shouldn't happen on localhost anyway). To make sure that this is not the cause of the problem, I added another test (
TestUDPUnconnectedDualStackWithRetransmission
), which retransmits the datagram up to 50 times.This bug is the source of a lot of flakiness in quic-go's test suite. We're running a lot of UDP transfers to test all facets of the protocol, enough to hit this bug on every other CI run or so.
What did you expect to see?
I expect the packet to be received reliably. This test should never fail.
The text was updated successfully, but these errors were encountered: