8198928: (so) SocketChannel connect may deadlock if closed at around same time that connect fails
Brian Burkhalter
brian.burkhalter at oracle.com
Tue Mar 6 16:45:43 UTC 2018
On Mar 6, 2018, at 6:14 AM, Alan Bateman <Alan.Bateman at oracle.com> 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.
Presumably CloseDuringConnect fails regularly without the source code changes applied?
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180306/cbb1bcc8/attachment-0001.html>
More information about the nio-dev
mailing list