JDK-8327741 : JVM crash in hotspot/share/opto/compile.cpp - failed: missing inlining msg
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-03-11
  • Updated: 2024-04-16
  • Resolved: 2024-04-11
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 23
23 masterFixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
I've been working on a fix for a jtreg issue https://bugs.openjdk.org/browse/CODETOOLS-7903621 which incorrectly marks failing tests as PASSED in certain cases (like a VM crash). I ran the JDK tests with a proposed fix for that issue and that now has uncovered that when running the test/hotspot/jtreg/compiler/print/PrintInlining.java test, there's a JVM crash in hotspot/share/opto/compile.cpp. The test however is being reported as PASSED, which hides the issue.

With the fixed jtreg, this is now properly reported as a test error. The JVM crashes as follows:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/src/hotspot/share/opto/compile.cpp:4602), pid=1955664, tid=1955702
#  assert(_print_inlining_stream->size() > 0) failed: missing inlining msg
#
# JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-internal-2024-03-10-1335402.foo.jdk)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-internal-2024-03-10-1335402.foo.jdk, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, parallel gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x9e6fd6]  Compile::print_inlining_update_delayed(CallGenerator*)+0x1c6
#
# Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler_all_gcs/scratch/1/core.1955664)
#
# An error report file with more information is saved as:
# /testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler_all_gcs/scratch/1/hs_err_pid1955664.log
#
# Compiler replay data is saved as:
# /testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler_all_gcs/scratch/1/replay_pid1955664.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Comments
Changeset: 7df49262 Author: Roland Westrelin <roland@openjdk.org> Date: 2024-04-11 07:27:44 +0000 URL: https://git.openjdk.org/jdk/commit/7df492627b933f48750985c26de69be3f86115cb
11-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/18685 Date: 2024-04-09 09:48:54 +0000
09-04-2024

[~kxu], [~roland], could you please have a look?
04-04-2024

This is a regression from JDK-8320237 in JDK 23 b09.
04-04-2024

Reproduces easily with an empty Test.java and java -Xcomp -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining -XX:+UseZGC -XX:+PrintCompilation -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,java.util.stream.StreamOpFlag::* Test.java
04-04-2024

Now that CODETOOLS-7903621 is fixed, I assume this will start to show up in the CI soon.
03-04-2024

Related to JDK-8277055. ILW = Assert during C2 compilation in debug code, rare with diagnostic flag, no workaround but disable flag = MLH = P4
11-03-2024