JDK-8316939 : # assert(no_dead_loop) failed: dead loop detected
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2023-09-24
  • Updated: 2023-09-26
Description
ADDITIONAL SYSTEM INFORMATION :
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug-b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#

A DESCRIPTION OF THE PROBLEM :
I ran a modified regression testcase using JDK8u392, I found it crashed under the option -Xcomp, and it will not crashed without the option

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/data/jdk8u/hotspot/src/share/vm/opto/phaseX.cpp:841), pid=18512, tid=0x00007f01c9848700
#  assert(no_dead_loop) failed: dead loop detected
#
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug-b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java  -Xcomp  compiler.c2.TestDeadPhiMergeMemLoop

ACTUAL -
688    ConL    ===  0  [[ 689 ]]  #long:56
 669    CastPP  ===  661  652  [[ 689  671  671  683  689 ]]  #double[int:>=0]:NotNull:exact * !jvms: TestDeadPhiMergeMemLoop::main @ bci:208
 786    If      ===  661  785  [[ 787  788 ]] P=0.000001, C=-1.000000 !orig=[679] !jvms: TestDeadPhiMergeMemLoop::main @ bci:208
 654    ConD    ===  0  [[ 690  664  683 ]]  #dblcon:3.000000
 689    AddP    === _  669  669  688  [[ 690 ]]  !jvms: TestDeadPhiMergeMemLoop::main @ bci:208
 787    IfFalse ===  786  [[ 690  693 ]] #0 !orig=[680] !jvms: TestDeadPhiMergeMemLoop::main @ bci:208
 690    StoreD  ===  787  794  689  654  [[ 715  694  794  747  727 ]]  @double[int:>=0]:exact+any *, idx=9;  Memory: @double[int:>=0]:NotNull:exact[5] *, idx=9; !orig=[709],[741] !jvms: TestDeadPhiMergeMemLoop::main @ bci:208
 794    MergeMem        === _  1  1  1  1  1  1  1  1  690  [[ 608  620  690  694  677  640  658  651  593  593  638  747  727  715 ]]  { - - - - - - N690:double[int:>=0]:exact+any * }  Memory: @BotPTR *+bot, idx=Bot; !orig=570,[599],[630] !jvms: TestDeadPhiMergeMemLoop::main @ bci:182
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/phaseX.cpp:841
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/data/jdk8u/hotspot/src/share/vm/opto/phaseX.cpp:841), pid=18512, tid=0x00007f01c9848700
#  assert(no_dead_loop) failed: dead loop detected
#
# JRE version: OpenJDK Runtime Environment (8.0_392) (build 1.8.0_392-internal-fastdebug-b00)
# Java VM: OpenJDK 64-Bit Server VM (25.392-b00-fastdebug compiled mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/repository/toreport/TestDeadPhiMergeMemLoop_09_23_15_00_06/hs_err_pid18512.log
#
# Compiler replay data is saved as:
# /home/repository/toreport/TestDeadPhiMergeMemLoop_09_23_15_00_06/replay_pid18512.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 139645652600576

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

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

FREQUENCY : always



Comments
Issue is reproduced. Crash is observed on JDK 8 debug build. OS: Windows 10 JDK 8u381: Pass JDK 8u381 Fastdebug: Fail JDK 11.0.20 Fastdebug : Pass JDK 17.0.8 Fastdebug: Pass JDK 21 Fastdebug: Pass ILW = Crash, reproducible on debug build, no known workaround yet = MLM = P4 Moving it to dev team for further analysis
26-09-2023