RFR JDK-8195703: BasicJDWPConnectionTest.java: 'App exited unexpectedly with 2'
alexey.menkov at oracle.com
Thu Oct 11 17:00:06 UTC 2018
I run the test itself and jdk/com/sun/jdi multiple times.
On 10/10/2018 17:17, serguei.spitsyn at oracle.com wrote:
> Hi Alex,
> It looks good to me.
> How did you test it?
> On 10/10/18 16:25, Alex Menkov wrote:
>> Hi all,
>> please review a fix for
>> I was not able to reproduce the issue, but accordingly the logs in
>> jira root cause is a transport initialization error "Address already
>> in use".
>> The test uses Utils.getFreePort() to select some free port, but it can
>> be race condition when some other app (or other test) uses the port
>> selected before debuggee application starts to listen on it.
>> The fix uses dynamic port allocation and then parses it from the
>> debuggee output.
>> Other changes:
>> - dropped catching exceptions and calling System.exit() - this causes
>> SecurityException in JTReg harness which makes error analysis much
>> - dropped using of Utils.getFreePort() from jdi/DoubleAgentTest.java
>> jdi/BadHandshakeTest.java also uses Utils.getFreePort(), but it
>> handles "Already in use" error re-peeking other free port and
>> restarting debuggee, so I keep it as is.
More information about the serviceability-dev