JDK-8213605 : compiler/gcbarriers/TestMembarDependencies.java fails in -agentvm mode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8u202
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: generic
  • Submitted: 2018-11-09
  • Updated: 2018-12-17
  • Resolved: 2018-12-17
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Command used: ./jtreg/bin/jtreg -verbose:summary -conc:auto -a -ignore:quiet -timeoutFactor:5 -agentvm -jdk:./jdks/jdk1.8.0_202 -dir:./openjdk8/jdk8u202-b03/hotspot/test compiler/gcbarriers/TestMembarDependencies.java

java version "1.8.0_202-ea"
Java(TM) SE Runtime Environment (build 1.8.0_202-ea-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b02, mixed mode)

Error Log:
stderr: [Error: Could not find or load main class compiler.membars.TestMembarDependencies
]
 exitValue = 1

java.lang.RuntimeException: Expected to get exit value of [0]

	at com.oracle.java.testlibrary.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:362)
	at compiler.membars.TestMembarDependencies.main(TestMembarDependencies.java:49)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:246)
	at java.lang.Thread.run(Thread.java:748)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test

----------System.out:(1/377)----------
Command line: [/export/home/aginfra/muneer/jtest/jdks/jdk1.8.0_202/bin/java -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -XX:-BackgroundCompilation -XX:+PrintOpto -XX:CompileCommand=compileonly,compiler.membars.TestMembarDependencies::test* -XX:CompileCommand=dontinline,compiler.membars.TestMembarDependencies::test_m1 compiler.membars.TestMembarDependencies run ]
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0]


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0]
Comments
Closing as duplicate of JDK-8180904
17-12-2018

I think this should be fixed with a bulk fix for all tests listed in JDK-8180904.
11-12-2018

The problem is that ProcessTools.executeTestJvm does not add -cp (see JDK-8187806 [1]). This was fixed in later Java versions. Simple test fix: diff -r 0c637249d934 test/hotspot/jtreg/compiler/gcbarriers/TestMembarDependencies.java --- a/test/hotspot/jtreg/compiler/gcbarriers/TestMembarDependencies.java Mon Dec 10 09:37:18 2018 +0100 +++ b/test/hotspot/jtreg/compiler/gcbarriers/TestMembarDependencies.java Tue Dec 11 10:17:51 2018 +0100 @@ -47,6 +47,7 @@ "-XX:-TieredCompilation", "-XX:-BackgroundCompilation", "-XX:+PrintOpto", "-XX:CompileCommand=compileonly,compiler.membars.TestMembarDependencies::test*", "-XX:CompileCommand=dontinline,compiler.membars.TestMembarDependencies::test_m1", + "-cp", System.getProperty("java.class.path"), TestMembarDependencies.class.getName(), "run"); // C2 should not crash or bail out from compilation oa.shouldHaveExitValue(0);
11-12-2018

This test case introduced from 8u202 b02 only.
26-11-2018