JDK-8310143 : RandomCommandsTest fails due to unexpected VM exit code after JDK-8282797
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-06-15
  • Updated: 2023-07-12
  • Resolved: 2023-06-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b03Fixed
Related Reports
Relates :  
Description
RandomCommandsTest fails intermittently (with fairly low frequency) with the following exception:

 stdout: [CompileCommand: print compiler/compilercontrol@%/share/pool/subpack/Klass.*nonexistent()V bool print = true
CompileCommand: ControlIntrinsic nonexistent*.$method* const char* ControlIntrinsic = '-maxF'
CompileCommand: An error occurred during parsing
Error: Unrecognized intrinsic detected in ControlIntrinsic: maxF
Line: 'ControlIntrinsic nonexistent* $method* -maxF'

Usage: '-XX:CompileCommand=<option>,<method pattern>' - to set boolean option to true
Usage: '-XX:CompileCommand=<option>,<method pattern>,<value>'
Use:   '-XX:CompileCommand=help' for more information and to list all option.

];
 stderr: [Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
]
 exitValue = 1

java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [1]
	at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:490)
	at compiler.compilercontrol.share.scenario.Scenario.execute(Scenario.java:118)
	at compiler.compilercontrol.share.MultiCommand.test(MultiCommand.java:103)
	at compiler.compilercontrol.mixed.RandomCommandsTest.main(RandomCommandsTest.java:43)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
	at java.base/java.lang.Thread.run(Thread.java:1583)

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

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [1]

Also seen for other intrinsics, e.g.:

Line: 'ControlIntrinsic,*,- (Ljava/lang/Float;)Ljava/lang/Double;,+fabs'
Comments
Changeset: 67fbd873 Author: Tobias Hartmann <thartmann@openjdk.org> Date: 2023-06-21 07:05:41 +0000 URL: https://git.openjdk.org/jdk/commit/67fbd87378a9b3861f1676977f9f2b36052add29
21-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14538 Date: 2023-06-19 11:27:10 +0000
19-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14514 Date: 2023-06-16 10:28:12 +0000
16-06-2023

ILW = Test fails because invalid CompileCommand now exits the VM (test bug), intermittent with single randomized test, no workaround = MLH = P4
15-06-2023

This does reproduce for me: java -XX:CompileCommand=ControlIntrinsic,*,"- (Ljava/lang/Float;)Ljava/lang/Double;",+fabs CompileCommand: ControlIntrinsic *.-(Ljava/lang/Float;)Ljava/lang/Double; const char* ControlIntrinsic = '+fabs' CompileCommand: An error occurred during parsing Error: Unrecognized intrinsic detected in ControlIntrinsic: fabs Line: 'ControlIntrinsic,*,- (Ljava/lang/Float;)Ljava/lang/Double;,+fabs' Usage: '-XX:CompileCommand=<option>,<method pattern>' - to set boolean option to true Usage: '-XX:CompileCommand=<option>,<method pattern>,<value>' Use: '-XX:CompileCommand=help' for more information and to list all option. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. I think it's a regression from JDK-8282797. Before, we would print the same error but not exit the VM, which the test does not expect.
15-06-2023