JDK-8291461 : assert(false) failed: bad AD file
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11.0.2,11.0.16,11.0.17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: x86_64
  • Submitted: 2022-07-25
  • Updated: 2022-10-17
  • Resolved: 2022-08-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 11
11.0.18-oracle b01Fixed
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
Reproduce:
$ java -version
openjdk version "11.0.16-internal" 2022-07-19
OpenJDK Runtime Environment (fastdebug build 11.0.16-internal+0-adhoc.root.jdk11u)
OpenJDK 64-Bit Server VM (fastdebug build 11.0.16-internal+0-adhoc.root.jdk11u, mixed mode)

$ java -XX:-TieredCompilation Test
i i1 f = 149,332,1126610698
i13 i14 i15 = 167,-366,3
i16 i17 i18 = 154974697,2,-13
i19 i20 i21 = 1,-1602967,152
i22 i23 i24 = -55,2,67
lArr dArr1 = -20088,4675172230091494219
Test.instanceCount dFld Test.iArrFld = -22316356368,-4522503712511210029,-31771
vMeth1_check_sum: 6995061562579910024
lMeth_check_sum: 1071291809
vMeth_check_sum: 4634577747107210838
i i1 f = 149,332,1126610698
i13 i14 i15 = 167,-366,3
i16 i17 i18 = 466825686,2,-13
i19 i20 i21 = 1,-1602967,152
i22 i23 i24 = -55,2,67
lArr dArr1 = -20088,4675172230091494219
Test.instanceCount dFld Test.iArrFld = -67222898784,-4518000112215972118,-31771
vMeth1_check_sum: -4456620948549731568
lMeth_check_sum: 2142583618
vMeth_check_sum: 112073740385900265
o5672	StoreL	=== o5671 o618 o1105 o5658  [[o5679  359 ]]  @java/lang/Class:exact+120 *, name=instanceCount, idx=8;  Memory: @java/lang/Class:exact+120 *, name=instanceCount, idx=8;

--N: o5672	StoreL	=== o5671 o618 o1105 o5658  [[o5679  359 ]]  @java/lang/Class:exact+120 *, name=instanceCount, idx=8;  Memory: @java/lang/Class:exact+120 *, name=instanceCount, idx=8;

   --N: o1105	AddP	=== _ o1544 o1544 o1545  [[o4055 o620 o4277 o776 o599 o4160 o5672 ]]   Oop:java/lang/Class:exact+120 *
   ANY_REGP  215  addP_rReg_imm
   RREGP  215  addP_rReg_imm
   NO_RAX_REGP  215  addP_rReg_imm
   NO_RBP_REGP  215  addP_rReg_imm
   NO_RAX_RBX_REGP  215  addP_rReg_imm
   RAX_REGP  215  addP_rReg_imm
   RBX_REGP  215  addP_rReg_imm
   RSI_REGP  215  addP_rReg_imm
   RDI_REGP  215  addP_rReg_imm
   R15_REGP  215  addP_rReg_imm
   REX_REGP  215  addP_rReg_imm
   INDIRECT  215  addP_rReg_imm
   INDOFFSET8  105  INDOFFSET8
   INDOFFSET32  115  INDOFFSET32
   INDINDEX  180  INDINDEX
   STACKSLOTP  315  storeSSP
   MEMORY  105  INDOFFSET8
   _AddP_any_RegP_rRegL  170  _AddP_any_RegP_rRegL

      --N: o1544	ConP	=== o0  [[o1105 o1105 o1255 o1255 o1251 o1251 o2049 o2049 o1247 o1247 ]]  #java/lang/Class:exact *  Oop:java/lang/Class:exact *
      IMMP  10  IMMP
      ANY_REGP  100  loadConP
      RREGP  100  loadConP
      NO_RAX_REGP  100  loadConP
      NO_RBP_REGP  100  loadConP
      NO_RAX_RBX_REGP  100  loadConP
      RAX_REGP  100  loadConP
      RBX_REGP  100  loadConP
      RSI_REGP  100  loadConP
      RDI_REGP  100  loadConP
      R15_REGP  100  loadConP
      REX_REGP  100  loadConP
      INDIRECT  100  loadConP
      STACKSLOTP  200  storeSSP
      MEMORY  100  INDIRECT

      --N: o1545	ConL	=== o0  [[o1105 ]]  #long:120
      IMML  20  IMML
      IMML8  5  IMML8
      IMMUL32  10  IMMUL32
      IMML32  15  IMML32
      IMML_127  10  IMML_127
      RREGL  70  loadConUL32
      NO_RAX_RDX_REGL  70  loadConUL32
      NO_RAX_REGL  70  loadConUL32
      NO_RCX_REGL  70  loadConUL32
      RAX_REGL  70  loadConUL32
      RCX_REGL  70  loadConUL32
      RDX_REGL  70  loadConUL32
      STACKSLOTL  170  storeSSL

   --N: o5658	MulReductionVL	=== _ o5669 o5659  [[o5669 o5672 o5678 ]] 
   RREGI  0  RREGI
   RAX_REGI  0  RAX_REGI
   RBX_REGI  0  RBX_REGI
   RCX_REGI  0  RCX_REGI
   RDX_REGI  0  RDX_REGI
   RDI_REGI  0  RDI_REGI
   NO_RCX_REGI  0  NO_RCX_REGI
   NO_RAX_RDX_REGI  0  NO_RAX_RDX_REGI
   STACKSLOTI  100  storeSSI

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/matcher.cpp:1591
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/root/jdk_source/jdk11u/src/hotspot/share/opto/matcher.cpp:1591), pid=72808, tid=72823
#  assert(false) failed: bad AD file
#
# JRE version: OpenJDK Runtime Environment (11.0.16) (fastdebug build 11.0.16-internal+0-adhoc.root.jdk11u)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 11.0.16-internal+0-adhoc.root.jdk11u, mixed mode, compressed oops, g1 gc, linux-amd64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/jiahx/JavaFuzzer/tests/0026/core.72808)
#


---------- BEGIN SOURCE ----------

---------- END SOURCE ----------


Comments
Fix Request (11u): Should get fixed for parity with 11.0.18-oracle. Fix is trivial, tested and reviewed (see PR).
14-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/1459 Date: 2022-10-13 16:58:38 +0000
14-10-2022

It looks like this is an old bug in MulReductionVLNode::ideal_reg() introduced by JDK-8076276 but never noticed, because a vector reduction test for long multiplication is missing. This bug seems to be fixed (perhaps accidentally) in later releases by JDK-8240248 and JDK-8223347.
09-08-2022

The problem starts with this changeset in OpenJDK 11u: commit dfdfc8fce6852840cbccfa721423958964962012 Author: Sandhya Viswanathan <sandhya.viswanathan@intel.com> Date: Sat Oct 27 10:33:58 2018 -0700 8210764: Update avx512 implementation 8211251: Default mask register for avx512 instructions 8211272: x86_32 build failures after JDK-8210764 (Update avx512 implementation) 8211375: Minimal VM build failures after JDK-8211251 (Default mask register for avx512 instructions) Co-authored-by: Aleksey Shipilev <shade@redhat.com> Reviewed-by: kvn
09-08-2022

ILW = crash in debug build; one test; disable compilation on affected method = MLM = P4
28-07-2022

Reproduces with Oracle JDK for me. I think it depends on the hardware. I ran on a machine with AVX512. If I pass -XX:UseAVX=2 the test passes.
28-07-2022

Moving from hotspot/runtime -> hotspot/compiler since the AD file belongs to the HotSpot Compiler team.
28-07-2022

[~fmatte] Tested with JDK 11.0.16+9 fastdebug build, issue is not reproduced.
28-07-2022

[~sswsharm] issue reported on fastdebug build as there is assert failure. Did you try on fastdebug build?
28-07-2022

Issue is not reproduced on Oracle JDK OS: Windows 10 JDK 11.0.16: Pass Output: i i1 i12 = 324,-24004,82 i13 i14 l4 = 32701,2,-2937970868 Test.instanceCount Test.sFld Test.fFld = 362,-24004,1267333898 Test.bFld Test.dFld Test.fArrFld = 0,4625908408568622067,4669315665381261312 iArrFld = 0 vMeth2_check_sum: 3569551855281928832 vMeth1_check_sum: 48986661321104 vMeth_check_sum: 2243603341394172741 i i1 i12 = 324,-24614,82 i13 i14 l4 = 32701,2,-2937970868 Test.instanceCount Test.sFld Test.fFld = 362,-24614,1267333594 Test.bFld Test.dFld Test.fArrFld = 0,4625908408568622067,4669315665381261312 iArrFld = 0 vMeth2_check_sum: 7139103710563857664 vMeth1_check_sum: 97989935177680 vMeth_check_sum: 4487206682788178621 i i1 i12 = 324,-25224,82 i13 i14 l4 = -35,2,-2937970868 Test.instanceCount Test.sFld Test.fFld = 362,-25224,1267333288 Test.bFld Test.dFld Test.fArrFld = 0,4625908408568622067,4669315665381261312 iArrFld = 0 vMeth2_check_sum: -7738088507863765120 vMeth1_check_sum: 146973005588240 vMeth_check_sum: 6730810024181998449 i i1 i12 = 324,-25834,82 i13 i14 l4 = -59,2,-2937970868 Test.instanceCount Test.sFld Test.fFld = 362,-25834,1267332984 Test.bFld Test.dFld Test.fArrFld = 0,4625908408568622067,4669315665381261312 iArrFld = 0 vMeth2_check_sum: -4168536652581836288 vMeth1_check_sum: 195954356171184 vMeth_check_sum: 8974413365575632229 i i1 i12 = 324,-26444,82 i13 i14 l4 = -65,2,-2937970868 Test.instanceCount Test.sFld Test.fFld = 362,-26444,1267332678 Test.bFld Test.dFld Test.fArrFld = 0,4625908408568622067,4669315665381261312 iArrFld = 0 vMeth2_check_sum: -598984797299907456 vMeth1_check_sum: 244334904376160 vMeth_check_sum: -7228727366740471659 i i1 i12 = 324,-27054,82 i13 i14 l4 = -66,2,-2937970868 Test.instanceCount Test.sFld Test.fFld = 362,-27054,1267332374 Test.bFld Test.dFld Test.fArrFld = 0,4625908408568622067,4669315665381261312 iArrFld = 0 vMeth2_check_sum: 2970567057982021376 vMeth1_check_sum: 293312556187248 vMeth_check_sum: -4985124025347209979 i i1 i12 = 324,-27664,82 i13 i14 l4 = 16318,2,-2937970868 Test.instanceCount Test.sFld Test.fFld = 362,-27664,1267332068 Test.bFld Test.dFld Test.fArrFld = 0,4625908408568622067,4669315665381261312 iArrFld = 0 vMeth2_check_sum: 6540118913263950208 vMeth1_check_sum: 342289565585552 vMeth_check_sum: -2741520683954134351 i i1 i12 = 324,-28274,82 i13 i14 l4 = 28606,2,-2937970868 Test.instanceCount Test.sFld Test.fFld = 362,-28274,1267331764 Test.bFld Test.dFld Test.fArrFld = 0,4625908408568622067,4669315665381261312 iArrFld = 0 vMeth2_check_sum: -8337073305163672576 vMeth1_check_sum: 391263633559760 vMeth_check_sum: -497917342561244771 i i1 i12 = 324,-28884,82 i13 i14 l4 = 31678,2,-2937970868 Test.instanceCount Test.sFld Test.fFld = 362,-28884,1267331458 Test.bFld Test.dFld Test.fArrFld = 0,4625908408568622067,4669315665381261312 iArrFld = 0 vMeth2_check_sum: -4767521449881743744 vMeth1_check_sum: 440235914440608 vMeth_check_sum: 1745685998831458757 i i1 i12 = 324,-29494,82 i13 i14 l4 = 24254,2,-2937970868 Test.instanceCount Test.sFld Test.fFld = 362,-29494,1267331154 Test.bFld Test.dFld Test.fArrFld = 0,4625908408568622067,4669315665381261312 iArrFld = 0 vMeth2_check_sum: -1197969594599814912 vMeth1_check_sum: 489224786231168 vMeth_check_sum: 3989289340223976237 Crash is reported in OpenJDK 11.0.16, moving it to JDK for the community to look at it.
28-07-2022