GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — Port 4.1: Fix flaky DatagramUnicastIPv6MappedTest on macOS (#17981) by normanmaurer · Pull Request #17989 · netty/netty Conversation
Member
Motivation: KQueueDatagramUnicastIPv6MappedTest fails often on the macOS runners The test binds IPv6 channels to the IPv4 wildcard address (which binds This happened a lot as testReceiveEmptyDatagrams never closed its Modifications:
The resends that were added by #17498 do not exist in 4.1, so there is Result: No more flaky failures of DatagramUnicastIPv6MappedTest on macOS.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsMotivation: KQueueDatagramUnicastIPv6MappedTest fails often on the macOS runners because the server never receives a datagram, not even when it is resent. The test binds IPv6 channels to the IPv4 wildcard address (which binds them to `::`) with port 0 and then sends to 127.0.0.1. When macOS selects the ephemeral port for an IPv6 socket it only checks the ports of other IPv6 sockets, so it might select a port that an IPv4 socket is already bound to. For an IPv4 datagram it then prefers the IPv4 socket that is bound to the destination or the wildcard address over the IPv6 socket, so all datagrams for the port are delivered to the IPv4 socket. This happened a lot as testReceiveEmptyDatagrams never closed its channel and socket, which left up to 16 sockets bound to 127.0.0.1 open when KQueueDatagramUnicastTest ran before KQueueDatagramUnicastIPv6MappedTest. This was the case in 27 of the 32 failed macOS jobs we looked at. Modifications: - Let the IPv4 stack select the port in DatagramUnicastIPv6MappedTest, verify that it is not used by an IPv6 socket either and bind to it explicitly. Add links to the XNU source that shows the behavior. - Close the channel and socket in testReceiveEmptyDatagrams. The resends that were added by #17498 do not exist in 4.1, so there is nothing to remove there. Result: No more flaky failures of DatagramUnicastIPv6MappedTest on macOS. Motivation: The testsuite is compiled with -source 6 in 4.1, which does not support try-with-resources, and UncheckedIOException is not available either. Modification: Close the channels in finally blocks and throw IllegalStateException instead. Result: The testsuite compiles again.
|
There was an error while loading. Please reload this page.
✅ All tests passed ✅🏷️ Commit: 17ef78f Learn more about TestLens at testlens.app/docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…) (netty#17989) Motivation: KQueueDatagramUnicastIPv6MappedTest fails often on the macOS runners because the server never receives a datagram, not even when it is resent. The test binds IPv6 channels to the IPv4 wildcard address (which binds them to `::`) with port 0 and then sends to 127.0.0.1. When macOS selects the ephemeral port for an IPv6 socket it only checks the ports of other IPv6 sockets, so it might select a port that an IPv4 socket is already bound to. For an IPv4 datagram it then prefers the IPv4 socket that is bound to the destination or the wildcard address over the IPv6 socket, so all datagrams for the port are delivered to the IPv4 socket. This happened a lot as testReceiveEmptyDatagrams never closed its channel and socket, which left up to 16 sockets bound to 127.0.0.1 open when KQueueDatagramUnicastTest ran before KQueueDatagramUnicastIPv6MappedTest. This was the case in 27 of the 32 failed macOS jobs we looked at. Modifications: - Let the IPv4 stack select the port in DatagramUnicastIPv6MappedTest, verify that it is not used by an IPv6 socket either and bind to it explicitly. Add links to the XNU source that shows the behavior. - Close the channel and socket in testReceiveEmptyDatagrams. The resends that were added by netty#17498 do not exist in 4.1, so there is nothing to remove there. Result: No more flaky failures of DatagramUnicastIPv6MappedTest on macOS.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.