RFR: 8293696: java/nio/channels/DatagramChannel/SelectWhenRefused.java fails with "Unexpected wakeup" [v2]
Daniel Fuchs
dfuchs at openjdk.org
Thu Oct 27 17:32:27 UTC 2022
On Thu, 27 Oct 2022 16:28:29 GMT, Darragh Clarke <duke at openjdk.org> wrote:
>> Added logging to SelectWhenRefused for an intermittent failure caused by unexpected wakeups, this includes trying to receive data if there is any available to identify where it is coming from.
>>
>> I also set the test to run in othervm mode which should reduce the chances of this failure happening in the first place.
>
> Darragh Clarke has updated the pull request incrementally with one additional commit since the last revision:
>
> added loop to retry in event of interruption from other tests
test/jdk/java/nio/channels/DatagramChannel/SelectWhenRefused.java line 83:
> 81: try {
> 82: ByteBuffer buf = ByteBuffer.allocate(100);
> 83: SocketAddress sa = dc.receive(buf);
This changes the test to use receive instead of read. I am not sure we want to do that. It's true that if we use read we won't be able to tell where the message comes from - but we're connected, so in theory it could only come from the refuser address, which would indicate that some other process has reused the port. So it should be enough to call read() and print the content of the received buffer. @AlanBateman can we use receive() here instead of read() without changing the nature of the test?
-------------
PR: https://git.openjdk.org/jdk/pull/10851
More information about the nio-dev
mailing list