JDK-8219517 : assert(false) failed: infinite loop in PhaseIterGVN::optimize
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12,13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-02-21
  • Updated: 2019-10-04
  • Resolved: 2019-03-13
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 JDK 12 JDK 13 Other
11.0.5Fixed 12-poolResolved 13 b12Fixed openjdk8u232Fixed
Description
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (src/hotspot/share/opto/phaseX.cpp:1186), pid=18066, tid=18086
#  assert(false) failed: infinite loop in PhaseIterGVN::optimize
#
# JRE version: Java(TM) SE Runtime Environment (13.0) (fastdebug build 13-internal+0-jdk13-jdk.433)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 13-internal+0-jdk13-jdk.433, mixed mode, tiered, z gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1403cba]  PhaseIterGVN::transform_old(Node*)+0x1ea
#

Command Line: -XX:MaxRAMPercentage=8 -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.net=ALL-UNNAMED -Dseed=9953585797664665 -XX:MaxRAMPercentage=50 applications.runthese.Runner -duration 30 -runlist RunTheseTestList.dat

Current thread (0x00007f9dd424edc0):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=18086, stack(0x00007f9dae27a000,0x00007f9dae37b000)]

Current CompileTask:
C2: 343204 84453       4       java.time.OffsetDateTime::ofInstant (50 bytes)

Stack: [0x00007f9dae27a000,0x00007f9dae37b000],  sp=0x00007f9dae376480,  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+0x1403cba]  PhaseIterGVN::transform_old(Node*)+0x1ea
V  [libjvm.so+0x13fd8cc]  PhaseIterGVN::optimize()+0x8c
V  [libjvm.so+0x964e35]  Compile::Optimize()+0x135
V  [libjvm.so+0x966b90]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0xe90
V  [libjvm.so+0x79c72d]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x10d
V  [libjvm.so+0x9732d5]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x3f5
V  [libjvm.so+0x9743f8]  CompileBroker::compiler_thread_loop()+0x498
V  [libjvm.so+0x1647c0a]  JavaThread::thread_main_inner()+0x26a
V  [libjvm.so+0x164f94e]  JavaThread::run()+0x1ae
V  [libjvm.so+0x164d426]  Thread::call_run()+0xf6
V  [libjvm.so+0x135c1ed]  thread_native_entry(Thread*)+0x10d
Comments
Fix Request (11u and 8u): fix applies cleanly. Tested with tier1. This change fixes a rare corner case in c2 that can cause a c2 crash. It was fixed in the development branch in march of 2019 and there was no follow up that I know of.
21-08-2019

http://cr.openjdk.java.net/~neliasso/8219517/webrev.01/
08-03-2019

I removed the ZGC label.
06-03-2019

Actually - I reproduce it without ZGC :/ My repro is jbb, not RunThese as this report was filed against.
01-03-2019

[~pliden] sent me one more set of hs_err and replay files, and they reproduce the problem.
01-03-2019

I was able to reproduce this once with SPECjbb2015 on my local machine, but it doesn't happen every run. Like 1 in 20 so far.
22-02-2019

ILW = Assert in C2 loop opts due to infinite loop, with ZGC (experimental) and RunThese, use different GC or disable compilation of affected method = HLM = P3
21-02-2019