RFR: 8293696: java/nio/channels/DatagramChannel/SelectWhenRefused.java fails with "Unexpected wakeup"

Daniel Fuchs dfuchs at openjdk.org
Tue Oct 25 14:19:39 UTC 2022


On Tue, 25 Oct 2022 12:35:15 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.

One improvement that could be done is put the whole code from line 55 to line 94 into a loop and respin if we get a datagram that doesn't correspond to what was sent to the refuser. It could be that we are receiving a datagram from something/somewhere else in which case we could just ignore it, clear all keys, and go back to line 55. Otherwise throw if we detected an error or break the loop if everything occurred as expected.

-------------

PR: https://git.openjdk.org/jdk/pull/10851


More information about the nio-dev mailing list