Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotspot_jre: runtime/NMT/NMTWithCDS.java fails with Execution failed: `main' threw exception: java.lang.RuntimeException: 'Unable to use shared archive' missing from stdout/stderr #124

Closed
sophia-guo opened this issue Oct 2, 2017 · 3 comments

Comments

@sophia-guo
Copy link
Contributor

sophia-guo commented Oct 2, 2017

18:18:56 ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'Unable to use shared archive' missing from stdout/stderr
18:18:56 REASON: User specified action: run main NMTWithCDS 
18:18:56 TIME:   0.124 seconds
18:18:56 messages:
18:18:56 command: main NMTWithCDS
18:18:56 reason: User specified action: run main NMTWithCDS 
18:18:56 Mode: agentvm
18:18:56 Agent id: 3
18:18:56 elapsed time (seconds): 0.124
18:18:56 configuration:
18:18:56 Boot Layer
18:18:56   class path: /home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdkbinary/j2sdk-image/jre/bin/../../lib/tools.jar
18:18:56               /home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/TestConfig/lib/jtreg/lib/javatest.jar
18:18:56               /home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/TestConfig/lib/jtreg/lib/jtreg.jar
18:18:56 
18:18:56 Test Layer
18:18:56   class path: /home/jenkins/workspace/openjdk8_test_x86-64_linux/jvmtest/OpenJDK_Playlist/SE80/work/classes/2/runtime/NMT/NMTWithCDS.d
18:18:56               /home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/OpenJDK_Playlist/openjdk-jdk/hotspot/test/runtime/NMT
18:18:56               /home/jenkins/workspace/openjdk8_test_x86-64_linux/jvmtest/OpenJDK_Playlist/SE80/work/classes/2/testlibrary
18:18:56               /home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/OpenJDK_Playlist/openjdk-jdk/hotspot/test/testlibrary
18:18:56 
18:18:56 rerun:
18:18:56 HOME=/home/jenkins \
18:18:56 LANG=en_US.UTF-8 \
18:18:56 PATH=/bin:/usr/bin \
18:18:56     /home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdkbinary/j2sdk-image/jre/bin/../../bin/java \
18:18:56         -Dtest.class.path.prefix=/home/jenkins/workspace/openjdk8_test_x86-64_linux/jvmtest/OpenJDK_Playlist/SE80/work/classes/2/runtime/NMT/NMTWithCDS.d:/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/OpenJDK_Playlist/openjdk-jdk/hotspot/test/runtime/NMT:/home/jenkins/workspace/openjdk8_test_x86-64_linux/jvmtest/OpenJDK_Playlist/SE80/work/classes/2/testlibrary \
18:18:56         -Dtest.src=/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/OpenJDK_Playlist/openjdk-jdk/hotspot/test/runtime/NMT \
18:18:56         -Dtest.src.path=/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/OpenJDK_Playlist/openjdk-jdk/hotspot/test/runtime/NMT:/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/OpenJDK_Playlist/openjdk-jdk/hotspot/test/testlibrary \
18:18:56         -Dtest.classes=/home/jenkins/workspace/openjdk8_test_x86-64_linux/jvmtest/OpenJDK_Playlist/SE80/work/classes/2/runtime/NMT/NMTWithCDS.d \
18:18:56         -Dtest.class.path=/home/jenkins/workspace/openjdk8_test_x86-64_linux/jvmtest/OpenJDK_Playlist/SE80/work/classes/2/runtime/NMT/NMTWithCDS.d:/home/jenkins/workspace/openjdk8_test_x86-64_linux/jvmtest/OpenJDK_Playlist/SE80/work/classes/2/testlibrary \
18:18:56         -Dtest.vm.opts='-ea -esa -Xmx512m' \
18:18:56         -Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx512m' \
18:18:56         -Dtest.compiler.opts= \
18:18:56         -Dtest.java.opts= \
18:18:56         -Dtest.jdk=/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdkbinary/j2sdk-image/jre/bin/../.. \
18:18:56         -Dcompile.jdk=/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdkbinary/j2sdk-image/jre/bin/../.. \
18:18:56         -Dtest.timeout.factor=4.0 \
18:18:56         -classpath /home/jenkins/workspace/openjdk8_test_x86-64_linux/jvmtest/OpenJDK_Playlist/SE80/work/classes/2/runtime/NMT/NMTWithCDS.d:/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/OpenJDK_Playlist/openjdk-jdk/hotspot/test/runtime/NMT:/home/jenkins/workspace/openjdk8_test_x86-64_linux/jvmtest/OpenJDK_Playlist/SE80/work/classes/2/testlibrary:/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/OpenJDK_Playlist/openjdk-jdk/hotspot/test/testlibrary:/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdkbinary/j2sdk-image/jre/bin/../../lib/tools.jar:/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/TestConfig/lib/jtreg/lib/javatest.jar:/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdk-test/TestConfig/lib/jtreg/lib/jtreg.jar \
18:18:56         NMTWithCDS
18:18:56 STDOUT:
18:18:56 Command line: [/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdkbinary/j2sdk-image/jre/bin/../../bin/java -XX:SharedArchiveFile=./sample.jsa -Xshare:dump ]
18:18:56 STDERR:
18:18:56  stdout: [];
18:18:56  stderr: [Error: VM option 'SharedArchiveFile' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.
18:18:56 Error: Could not create the Java Virtual Machine.
18:18:56 Error: A fatal exception has occurred. Program will exit.
18:18:56 ]
18:18:56  exitValue = 1
18:18:56 
18:18:56  stdout: [];
18:18:56  stderr: [Error: VM option 'SharedArchiveFile' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.
18:18:56 Error: Could not create the Java Virtual Machine.
18:18:56 Error: A fatal exception has occurred. Program will exit.
18:18:56 ]
18:18:56  exitValue = 1
18:18:56 
18:18:56 java.lang.RuntimeException: 'Unable to use shared archive' missing from stdout/stderr 
18:18:56 
18:18:56 	at com.oracle.java.testlibrary.OutputAnalyzer.shouldContain(OutputAnalyzer.java:134)
18:18:56 	at NMTWithCDS.main(NMTWithCDS.java:51)
18:18:56 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:18:56 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
18:18:56 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
18:18:56 	at java.lang.reflect.Method.invoke(Method.java:498)
18:18:56 	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:230)
18:18:56 	at java.lang.Thread.run(Thread.java:748)
18:18:56 
18:18:56 JavaTest Message: Test threw exception: java.lang.RuntimeException
18:18:56 JavaTest Message: shutting down test
18:18:56 
18:18:56 
18:18:56 TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'Unable to use shared archive' missing from stdout/stderr

Similar tests failure:
runtime/memory/ReserveMemory.java
ACTION: main -- Failed. Execution failed: main' threw exception: java.lang.RuntimeException: 'SIGSEGV' missing from stdout/stderr serviceability/jvmti/TestRedefineWithUnresolvedClass.java Failed. Execution failed: main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0]

@karianna karianna added the bug label Oct 3, 2017
@akolarkunnu
Copy link
Contributor

This is a duplicate of openjdk bug https://bugs.openjdk.java.net/browse/JDK-8180936

@smlambert
Copy link
Contributor

Closing as now listed in summary issue #345

@zzambers
Copy link
Contributor

zzambers commented Mar 27, 2023

This aggregate bug is little unfortunate . What connects excluded tests referencing this issue is that they use OutputAnalyzer class from testlibrary. This class is used to spawn process and check its stdout/stderr/exit code. However to analyze these, exception/stack trace is not the interesting part. (exception is just saying what was not found in stdout/stderr etc..)

What is more interesting is actual STDOUT/STDERR. In original problem it is following:

...
18:18:56 STDOUT:
18:18:56 Command line: [/home/jenkins/workspace/openjdk8_test_x86-64_linux/openjdkbinary/j2sdk-image/jre/bin/../../bin/java -XX:SharedArchiveFile=./sample.jsa -Xshare:dump ]
18:18:56 STDERR:
18:18:56  stdout: [];
18:18:56  stderr: [Error: VM option 'SharedArchiveFile' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.
18:18:56 Error: Could not create the Java Virtual Machine.
18:18:56 Error: A fatal exception has occurred. Program will exit.
18:18:56 ]
18:18:56  exitValue = 1
18:18:56 
18:18:56  stdout: [];
18:18:56  stderr: [Error: VM option 'SharedArchiveFile' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.
18:18:56 Error: Could not create the Java Virtual Machine.
18:18:56 Error: A fatal exception has occurred. Program will exit.
18:18:56 ]
18:18:56  exitValue = 1
...

Unfortunately it is not clear what was problem with other tests referencing this issue. (Original issue was JDK-8180936 as commented higher, other issues are unclear)

Anyway all problems seem to be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants