RFR: 8264200: java/nio/channels/DatagramChannel/SRTest.java fails intermittently [v2]

Mark Sheppard msheppar at openjdk.java.net
Tue Apr 6 17:09:30 UTC 2021


On Tue, 6 Apr 2021 14:57:38 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Conor Cleary has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8264200: Use charset consistently & correct logs
>
> Marked as reviewed by rriggs (Reviewer).

I note in the senders (ClassicWriter and NioWriter) there are two send invocation while in the receivers there is only one receive invocation. That raises a question as to why there are two send invocations, and which of these a receiver processes - no way of telling if the first has been lost?

now a bit of conjecture:
In theory based on the structure of the test the receiver or reader thread could finish before the writer have executed the second send. So if the receiver has finished, executed close and released their port, making it available for re-allocation in another concurrently executing test, then the second send could be a stray send to another now unrelated UDP end point.

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

PR: https://git.openjdk.java.net/jdk/pull/3354


More information about the nio-dev mailing list