> On 16 Nov 2016, at 07:36, Hamlin Li <huaming...@oracle.com> wrote:
> 
> Would you please review below fix?
> 
> bug: https://bugs.openjdk.java.net/browse/JDK-8168975
> webrev: http://cr.openjdk.java.net/~mli/8168975/webrev.00/

The approach builds on the mechanism put in for 8168975, and seems
reasonable. 

The system property being used to “pass” the port number is specific to
the test, and not JDK related so should not be named
java.nio.channels.spi.SelectorProviderPort.  Maybe something like
openjdk.test.RMIDSelectorProvider.port ?

-Chris.

> Root Cause: There is a time window between RMID.start() and RMID.restart(), 
> interloper can step in and bind to the port used by RMID in RMID.start().
> 
> Solution:   Modify RMID.java to use inherited channel when calling 
> RMID.restart. And extend RMIDSelectorProvider.java to try to bind to specific 
> port, no matter 0 or none-zero(for RMID.restart) in a while loop, if timeout 
> just call System.exit to exit rmid and let test fail.
> 
> 
> Thank you
> -Hamlin

Reply via email to