[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: RFR: 8237388: serviceability/dcmd/framework/VMVersionTest.java fails with connection refused error.
From: Alex Menkov <amenkov () openjdk ! java ! net>
Date: 2021-05-27 23:09:24
Message-ID: J3x7RsMzO3XDoYpt8TMKPy5Glig7Cb1nN7P0tzEfZ-8=.949e4afc-b9f3-4a1b-9207-0965d0fb8884 () github ! com
[Download RAW message or body]
nsk test framework for testing jdi/jdwp assumes that the test launch debuggee first \
and then creates IOPipe to communicate with debuggee (debugger listens, debugee \
connects to the IOPipe socket). This makes possible failure when debuggee tries to \
connect before debugger starts listening. The fix changes logic of the tests to start \
listening on IOPipe socket before launch debuggee. Other tests which use \
IOPipe/SocketIOPipe and have the same issue (there are a lot of them) will be fixes \
as separate issues.
Couple details about the fix:
- debugee.getPipeServerSocket() just calls binder.getPipeServerSocket(), returned \
ServerSocket can be changed only by DebugeeBinder.prepareForPipeConnection which is \
called by some tests;
- connectingProcess logic is broken. The only place it's used is \
BasicSocketConnection.checkConnectingProcess, which is called from \
SocketConnection.continueAttach. But continueAttach is called from debuggee code \
(listening == false) while connectingProcess is set only from debugger code \
(listening == true). So it didn't work and I dropped it.
Testing: all tests which use IOPipe/SocketIOPipe classes:
- test/hotspot/jtreg/serviceability/dcmd/framework
- test/hotspot/jtreg/vmTestbase/nsk/jdi
- test/hotspot/jtreg/vmTestbase/nsk/jdwp
-------------
Commit messages:
- FIx for serviceability/dcmd/framework tests
Changes: https://git.openjdk.java.net/jdk/pull/4235/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4235&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8237388
Stats: 143 lines in 5 files changed: 74 ins; 51 del; 18 mod
Patch: https://git.openjdk.java.net/jdk/pull/4235.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4235/head:pull/4235
PR: https://git.openjdk.java.net/jdk/pull/4235
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic