RFR: 8240711: TestJstatdPort.java failed due to "ExportException: Port already in use:"

Alex Menkov alexey.menkov at oracle.com
Mon Mar 16 23:02:08 UTC 2020


Hi Daniil,

Looks like the test is supposed to handle "port in use" issue (see lines 
103-114).
I suppose in case "port in use" jstatd exits, but 
ProcessTools.startProcess() continue to wait for "jstatd started" message.

--alex

On 03/16/2020 12:00, Daniil Titov wrote:
> Please review the change [1] that fixes the intermittent failure of the test.
> 
> The problem here is that if the RMI port is in use than the test keep waiting for "jstatd started (bound to " to appear in the process output and in this case
> It doesn't happen.
> 
> 	at java.util.concurrent.CountDownLatch.await(java.base at 15-internal/CountDownLatch.java:232)
> 	at jdk.test.lib.process.ProcessTools.startProcess(ProcessTools.java:205)
> 	at jdk.test.lib.process.ProcessTools.startProcess(ProcessTools.java:133)
> 	at jdk.test.lib.process.ProcessTools.startProcess(ProcessTools.java:254)
> 	at jdk.test.lib.thread.ProcessThread$ProcessRunnable.xrun(ProcessThread.java:153)
> 	at jdk.test.lib.thread.XRun.run(XRun.java:40)
> 	at java.lang.Thread.run(java.base at 15-internal/Thread.java:832)
> 	at jdk.test.lib.thread.TestThread.run(TestThread.java:123)
> 
> Testing: Mach5 tests for sun/tools/jstatd/ successfully passed.  Tier1-tier3 tests are still in progress.
> 
> [1] http://cr.openjdk.java.net/~dtitov/8240711/webrev.01/
> [2] https://bugs.openjdk.java.net/browse/JDK-8240711
> 
> 
> Thank you,
> Daniil
> 
> 
> 


More information about the serviceability-dev mailing list