RFR for JDK-7190106 RMI benchmark fails intermittently because of use of fixed port

Stuart Marks stuart.marks at oracle.com
Fri Nov 1 15:58:29 UTC 2013

On 10/31/13 10:22 PM, Tristan Yan wrote:
> I am working on bug https://bugs.openjdk.java.net/browse/JDK-7190106. Based
> on my research, it looks like the issue of fixed port was already addressed
> by Stuart Marks in other RMI tests which are Java based. I would like to
> reuse his solution, however it does not work for shell based tests.

(Darryl Mocek did the unique port work for the RMI tests.)

Was the patch attached to your message? If so, it didn't get through. Most 
OpenJDK mailing lists strip off attachments before forwarding the message to the 

> 2. My recommendation would be to convert this shell script test into Java
> based test and re-use the dynamic port allocation solution by Stuart Marks to
> address the issue
> 3. Also this test was written with server/client mode in shell script. In the
> past there have been sync issues between server/client which caused the test
> to fail. If we convert the shell script into Java based test, it would avoid
> using "sleep 10" mechanism to allow for server and client to start up and
> also give us better control in synchronizing server and client.

(Background for interested readers.) In general, yes, it's quite difficult to 
make reliable shell tests, especially for multi-process tests like this one. 
There is the unique port issue, and there is also the issue of how long for the 
client to wait until the server is ready. Error handling is also a problem, for 
example, if one of the JVMs gets an unexpected exception, it's easy for shell 
tests to mishandle this case. They might hang or erroneously report success.


If this is a rewrite, it's probably fairly large, so you need to upload it 
somewhere (e.g., cr.openjdk.java.net) and then post a link to it.



More information about the core-libs-dev mailing list