JDK-8341834 : C2 compilation fails with "bad AD file" due to Replicate
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21.0.5-oracle,23,24
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-10-09
  • Updated: 2024-11-11
  • Resolved: 2024-11-06
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 24
24 b23Fixed
Related Reports
Relates :  
Relates :  
Description
java -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -Xcomp -XX:MaxRAMPercentage=4.16667 Test.java

o3316  Replicate  === _ o3118  [[ o3320 ]]  #vectord[2]:{int}

--N: o3316  Replicate  === _ o3118  [[ o3320 ]]  #vectord[2]:{int}

   --N: o3118  AddL  === _ o2118 o3059  [[ o2878 o173 o2762 o3316 o3038 ]] 
   RREGL  0  RREGL
   NO_RAX_RDX_REGL  0  NO_RAX_RDX_REGL
   RAX_REGL  0  RAX_REGL
   RCX_REGL  0  RCX_REGL
   RDX_REGL  0  RDX_REGL
   R11_REGL  0  R11_REGL
   NO_RBP_R13_REGL  0  NO_RBP_R13_REGL
   STACKSLOTL  100  storeSSL

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/workspace/open/src/hotspot/share/opto/matcher.cpp:1748), pid=3810441, tid=3810455
#  assert(false) failed: bad AD file
#
# JRE version: Java(TM) SE Runtime Environment (24.0+18) (fastdebug build 24-ea+18-2073)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-ea+18-2073, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x13a0efe]  Matcher::Label_Root(Node const*, State*, Node*, Node*&)+0x8ce
#

Comments
Changeset: 72a45ddb Branch: master Author: Roland Westrelin <roland@openjdk.org> Date: 2024-11-06 14:49:30 +0000 URL: https://git.openjdk.org/jdk/commit/72a45ddbad9c343200197348ccfcf74105e6fefa
06-11-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21660 Date: 2024-10-23 08:30:15 +0000
23-10-2024

I attached a simplified version of the test (Test2.java): java -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,Test2::test -Xcomp Test2.java I narrowed it down to JDK-8331575 in JDK 23 b16. JDK-8331575 was backported to 21.0.5-oracle so I'm tentatively adding that to the affects version although I can *not* reproduce the issue there.
09-10-2024

Roland, please have a look.
09-10-2024

ILW = Assert crash during compilation because IR node can't be matched (regression, bailout in product), easy to reproduce but edge case, -XX:-SplitIfBlocks or disable compilation of affected method = MMM = P3
09-10-2024