JDK-8260650 : test failed with "assert(false) failed: infinite loop in PhaseIterGVN::optimize"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8,11,17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,windows
  • CPU: x86_64
  • Submitted: 2021-01-29
  • Updated: 2023-09-25
  • Resolved: 2021-03-16
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 17
17 b14Fixed
Related Reports
Duplicate :  
Relates :  
Description
The following closed test failed in the JDK17 CI:

vmTestbase/vm/compiler/regression/b6227033/b6227033.java

Here's a snippet from the log file:

 3935-->  15952  ConI  ===  0  [[]]  #int:2533609
 3936-->  15953  ConI  ===  0  [[]]  #int:2535562
 3937-->  15954  ConI  ===  0  [[]]  #int:2537514
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/phaseX.cpp:1139
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S154437/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/e88f95ae-b55a-4767-8e2d-197ee2db8388/runs/88aef479-33de-49f4-a317-c0875746a3c0/workspace/open/src/hotspot/share/opto/phaseX.cpp:1139), pid=9554, tid=9569
#  assert(false) failed: infinite loop in PhaseIterGVN::optimize
#
# JRE version: Java(TM) SE Runtime Environment (17.0+8) (fastdebug build 17-ea+8-LTS-486)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 17-ea+8-LTS-486, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x15c3bcd]  PhaseIterGVN::transform_old(Node*)+0x24d
#
# Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S77131/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/cbff2a0e-253e-443e-8e02-61958f9ec560/runs/1c32a898-ca4a-4374-b7d0-c4f35fd65278/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_vmTestbase_vm_compiler_regression/scratch/1/core.9554)
#
# An error report file with more information is saved as:
# /opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S77131/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/cbff2a0e-253e-443e-8e02-61958f9ec560/runs/1c32a898-ca4a-4374-b7d0-c4f35fd65278/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_vmTestbase_vm_compiler_regression/scratch/1/hs_err_pid9554.log
#
# Compiler replay data is saved as:
# /opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S77131/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/cbff2a0e-253e-443e-8e02-61958f9ec560/runs/1c32a898-ca4a-4374-b7d0-c4f35fd65278/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_vmTestbase_vm_compiler_regression/scratch/1/replay_pid9554.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
----------System.err:(1/145)----------
Java HotSpot(TM) 64-Bit Server VM warning: outputStream::do_vsnprintf output truncated -- buffer length is 2000 bytes but 2054 bytes are needed.
----------rerun:(43/10163)*----------

Here's the crashing thread's stack:

---------------  T H R E A D  ---------------

Current thread (0x00007f9dc4328f70):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=9569, stack(0x00007f9db4255000,0x00007f9db4356000)]


Current CompileTask:
C2:   5936 1460    b        vm.compiler.regression.b6227033.b6227033::stack_overflow (40865 bytes)

Stack: [0x00007f9db4255000,0x00007f9db4356000],  sp=0x00007f9db43514d0,  free space=1009k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x15c3bcd]  PhaseIterGVN::transform_old(Node*)+0x24d
V  [libjvm.so+0x15bbfbe]  PhaseIterGVN::optimize()+0x7e
V  [libjvm.so+0xa19146]  Compile::Optimize()+0x216
V  [libjvm.so+0xa1c170]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x1840
V  [libjvm.so+0x8483fc]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1dc
V  [libjvm.so+0xa2c051]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xea1
V  [libjvm.so+0xa2ccd8]  CompileBroker::compiler_thread_loop()+0x5a8
V  [libjvm.so+0x18508d6]  JavaThread::thread_main_inner()+0x256
V  [libjvm.so+0x1857240]  Thread::call_run()+0x100
V  [libjvm.so+0x1541e46]  thread_native_entry(Thread*)+0x116

The test task's JVM args are:

-Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation
Comments
Changeset: 996079b9 Author: Igor Veresov <iveresov@openjdk.org> Date: 2021-03-16 21:42:55 +0000 URL: https://git.openjdk.java.net/jdk/commit/996079b9
16-03-2021

ILW = Assert during C2 compilation, single test at tier6/7, no workaround but disable compilation of affected method = HLM = P3
01-02-2021

[~iveresov] please, look. Always reproduced after you policy changes with flags listed in Description.
29-01-2021

Starts failing after JDK-8251462.
29-01-2021