JDK 9 RFR of JDK-8156002: java/nio/channels/SocketChannel/AdaptSocket.java Fails in Mesos on OSX

Daniel Fuchs daniel.fuchs at oracle.com
Fri May 6 07:45:26 UTC 2016

On 5/6/16 8:58 AM, Hamlin Li wrote:
> Please review the patch for
> java/nio/channels/SocketChannel/AdaptSocket.java Fails in Mesos on OSX.
> Root Cause: it's kind of race condition due to linger time and timeout
> time. Even though timeout(10ms) is far less than linger time(100ms), but
> in some condition the linger time is still not long enough.
> Suggested Fix: create a NoResponseServer which will accept connection
> but never response to any input.
> bug: https://bugs.openjdk.java.net/browse/JDK-8156002
> webrev: http://cr.openjdk.java.net/~mli/8156002/webrev.01/

Hi Hamlin,

The idea is very good, but I wonder about the implementation.
calling super(Long.MAX_VALUE) will make the NoResponseServer
wait forever in the accept loop line 223 - while I think that
for the spirit of this test we want the accept loop to
proceed normally, but linger instead in the connection
thread, line 372.

Or am I mistaken?

best regards,

-- daniel

> Thank you
> -Hamlin

More information about the nio-dev mailing list