RFR of JDK-8153543: java/rmi/transport/reuseDefaultPort/ReuseDefaultPort.java fails intermittently

Chris Hegarty chris.hegarty at oracle.com
Tue Nov 22 09:12:23 UTC 2016


> On 22 Nov 2016, at 02:50, Hamlin Li <huaming.li at oracle.com> wrote:
> 
> Would you please review the patch for below bug?
> 
> bug: https://bugs.openjdk.java.net/browse/JDK-8153543
> webrev: http://cr.openjdk.java.net/~mli/8153543/webrev.00/

Looks fine Hamlin.

-Chris.

> Root cause: between "TestLibrary.getUnusedRandomPort()" and "UnicastRemoteObject.exportObject(impl, 0);", there is time window, interloper might step in and get the port.
> Solution: use port 0 to create server socket in RMI socket factory, then pass the exact port back.
> 
> Thank you
> -Hamlin



More information about the core-libs-dev mailing list