JDK-8312573 : Failure during CompileOnly parsing leads to ShouldNotReachHere
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17,21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-07-24
  • Updated: 2023-10-09
  • Resolved: 2023-08-02
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 11 JDK 17 JDK 21
11.0.22-oracleFixed 17.0.10-oracleFixed 21.0.1 b06Fixed
Related Reports
Relates :  
Description
java -Xcomp -XX:CompileOnly=,

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (workspace/open/src/hotspot/share/compiler/compilerOracle.cpp:1061), pid=1823394, tid=1823395
#  Error: ShouldNotReachHere()
#
# JRE version:  (21.0+25) (fastdebug build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 21-ea+25-LTS-2118, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xa2240e]  CompilerOracle::parse_compile_only(char*)+0x71e

Stack: [0x00007f4a20a21000,0x00007f4a20b22000],  sp=0x00007f4a20b202b0,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xa2240e]  CompilerOracle::parse_compile_only(char*)+0x71e  (compilerOracle.cpp:1061)
V  [libjvm.so+0xa2258f]  compilerOracle_init()+0x10f
V  [libjvm.so+0xe25a0a]  init_globals()+0xaa
V  [libjvm.so+0x17b0825]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x2c5
V  [libjvm.so+0xf882b5]  JNI_CreateJavaVM+0x75
C  [libjli.so+0x3b0f]  JavaMain+0x8f
C  [libjli.so+0x79d9]  ThreadJavaMain+0x9

The issue was fixed as a side effect of JDK-8027711 in JDK 22 b02. The VM now prints an error:

CompileOnly: An error occurred during parsing
Line: ','
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Since a backport of JDK-8027711 is not an option, we might want to extract a point-fix for JDK < 22.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2169 Date: 2023-10-09 08:16:46 +0000
09-10-2023

Fix request [17u] I backport this for parity with 17.0.10-oracle. Low risk, printing improvement. Trivial resolves needed. Test passes and fails without the fix. SAP nighlty testing passed.
15-09-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1735 Date: 2023-09-13 12:46:04 +0000
13-09-2023

Forgot the fix request. Here it is. Fix Request (21u): Fixes a crash during CompileOnly parsing. The patch applies cleanly and includes a regression test. Tested with tier 1 - 3.
04-08-2023

Changeset: 6f76b65a Author: Tobias Hartmann <thartmann@openjdk.org> Date: 2023-08-02 06:36:48 +0000 URL: https://git.openjdk.org/jdk21u/commit/6f76b65ace50b2361221dddab120e91b057497c1
02-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u/pull/19 Date: 2023-07-27 12:01:05 +0000
27-07-2023