RFR: 8314476: TestJstatdPortAndServer.java failed with "java.rmi.NoSuchObjectException: no such object in table"

Kevin Walls kevinw at openjdk.org
Thu Aug 24 12:20:26 UTC 2023


On Thu, 24 Aug 2023 11:34:13 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

> Port clashes happening when several tests from test/jdk/sun/tools/jstatd run at the same time on the same machine.
> 
> There is logic in here for detecting this, but it's not working.
> 
> We recently saw this fail with a port in use, and the failure is:
> 
> [Jstatd-Thread] Could not bind //:33859/TestJstatdServer to RMI Registry
> [Jstatd-Thread] java.rmi.NoSuchObjectException: no such object in table
> 
> In JstatdTest.java, the isJstadReady() method (will correct that typo also) checks for "Port already in use", which can be printed by TCPTransport.java.
> But that is not what we see in this failure.
> Should update its test to check for "Could not bind".
> Should limit the retries also.

"Cannot start jstatd.  No free port found." might be too-specific an error to add here, it could be left as "Cannot start jstatd."

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15414#issuecomment-1691568067


More information about the serviceability-dev mailing list