RFR: 8318573: The nsk.share.jpda.SocketConnection should fail if socket was closed.
Leonid Mesnik
lmesnik at openjdk.org
Fri Oct 20 03:28:56 UTC 2023
There are several failure with reason
"Cannot invoke "String.equals(Object)" because "<local1>" is null"
which really caused by reading the command from debugee via socket.
Like:
String command = pipe.readln();
if (!command.equals(AbstractDebuggeeTest.COMMAND_READY)) {
setSuccess(false);
log.complain("TEST BUG: unknown debuggee's command: " + command);
return false;
}
The command is null when socket fails with EOFException which usually means that debugee has been crashed/exited or killed by timeout handler.
However, it is not clear from the error log. So
https://bugs.openjdk.org/browse/JDK-8310940 has different problems with the same NPE symptom.
The fix update error handling to improve logging.
So output loos like:
_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/tmp' \
-Dtest.compiler.opts= \
-Dtest.java.opts= \
-Dtest.jdk=/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/images/jdk \
-Dcompile.jdk=/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/images/jdk \
-Dtest.timeout.factor=4.0 \
-Dtest.nativepath=/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/images/test/hotspot/jtreg/native \
-Dtest.root=/home/lmesnik/ws/jdk-vmTestbase/open/test/hotspot/jtreg \
-Dtest.name=vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002/TestDescription.java \
-Dtest.file=/home/lmesnik/ws/jdk-vmTestbase/open/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002/TestDescription.java \
-Dtest.src=/home/lmesnik/ws/jdk-vmTestbase/open/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002 \
-Dtest.src.path=/home/lmesnik/ws/jdk-vmTestbase/open/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002:/home/lmesnik/ws/jdk-vmTestbase/open/test/hotspot/jtreg/vmTestbase:/home/lmesnik/ws/jdk-vmTestbase/open/test/lib \
-Dtest.classes=/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/classes/0/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002/TestDescription.d \
-Dtest.class.path=/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/classes/0/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002/TestDescription.d:/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/classes/0/vmTestbase:/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/classes/0/test/lib \
-Dtest.class.path.prefix=/home/lmesnik/ws/jdk-vmTestbase/open/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002:/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/classes/0/vmTestbase:/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/classes/0/test/lib \
-XX:MaxRAMPercentage=1.5625 \
-Dtest.boot.jdk=/var/tmp/jib-lmesnik/install/jdk/21/35/bundles/linux-x64/jdk-21_linux-x64_bin.tar.gz/jdk-21 \
-Djava.io.tmpdir=/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/tmp \
-Djava.library.path=/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/images/test/hotspot/jtreg/native \
com.sun.javatest.regtest.agent.MainWrapper /home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002/TestDescription.d/main.0.jta -verbose -arch=linux-x64 -waittime=5 -debugee.vmkind=java -transport.address=dynamic '-debugee.vmkeys="-XX:MaxRAMPercentage=1.5625 -Dtest.boot.jdk=/var/tmp/jib-lmesnik/install/jdk/21/35/bundles/linux-x64/jdk-21_linux-x64_bin.tar.gz/jdk-21 -Djava.io.tmpdir=/home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/tmp' "
TEST RESULT: Failed. Execution failed: `main' threw exception: nsk.share.Failure: Caught EOFException while reading an object from PipeIO Listener Thread connection. Check if debugee process is exited (crashed, killed) before responded.
--------------------------------------------------
Test results: failed: 1
Report written to /home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-results/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java/html/report.html
Results written to /home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java
Error: Some tests failed or other problems occurred.
Finished running test 'jtreg:open/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/dispose/dispose002/TestDescription.java'
Test report is stored in /home/lmesnik/ws/jdk-vmTestbase/build/linux-x64/test-results/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_dispose_dispose002_TestDescription_java
-------------
Commit messages:
- updated SocketConnection.java
Changes: https://git.openjdk.org/jdk/pull/16280/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16280&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8318573
Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/16280.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16280/head:pull/16280
PR: https://git.openjdk.org/jdk/pull/16280
More information about the serviceability-dev
mailing list