8198928: (so) SocketChannel connect may deadlock if closed at around same time that connect fails
Alan Bateman
Alan.Bateman at oracle.com
Tue Mar 6 14:14:55 UTC 2018
On 06/03/2018 10:51, Hamlin Li wrote:
>
> :
>
>>
>> In the mean-time, maybe we can address your concern by just replacing
>> the use of Utils.getFreePort in this test with its own
>> refusingEndpoint method. I've updated the webrev in place so you can
>> see if you agree. If we get Utils.getFreePort fixed then we can
>> replace this usage, probably other cases like this in other tests too.
> For this test, I think another way is to use reserved/unused ports as
> the free port, e.g. port 1, port 4, ... [1]
I agree as it seems unlikely that something will start a listener on a
system port (<1024) while the tests are running. For now, the
refusingEndpoint() method in the test probes the system ports. If the
test infrastructure library is updated to provide something better than
the current getFreePort then we can move it to use that.
-Alan
More information about the nio-dev
mailing list