JDK-8280587 : C2: assert(inner->is_valid_counted_loop(T_INT) && inner->is_strip_mined()) failed: OuterStripMinedLoop should have been removed
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16,17,18,19
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-01-25
  • Updated: 2022-01-25
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 19
19Unresolved
Related Reports
Relates :  
Description
The attached fuzzer test starts to fail after JDK-8256730 with the following assertion:

To reproduce:
$ java Test.java
$ java Reduced.java

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/a2dc162d-743b-4800-9e92-31f85abb45b1-S136835/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/34f88dd0-7bd6-4265-92f2-1661d2bb98cf/runs/42bdaaa9-524f-4cd5-a4a3-f4d6f30c0c25/workspace/open/src/hotspot/share/opto/loopnode.cpp:2146), pid=16315, tid=16328
#  assert(inner->is_valid_counted_loop(T_INT) && inner->is_strip_mined()) failed: OuterStripMinedLoop should have been removed
#
# JRE version: Java(TM) SE Runtime Environment (18.0+31) (fastdebug build 18-ea+31-2049)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 18-ea+31-2049, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1371b9a]  LoopNode::verify_strip_mined(int) const+0xca
........
Command Line: -Xmx1G Test
........
Current CompileTask:
C2:    729   34       4       Test::vMeth1 (230 bytes)

Stack: [0x00007f6298e41000,0x00007f6298f42000],  sp=0x00007f6298f3b890,  free space=1002k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1371b9a]  LoopNode::verify_strip_mined(int) const+0xca
V  [libjvm.so+0x134cec1]  PathFrequency::to(Node*)+0x12d1
V  [libjvm.so+0x1347e74]  PhaseIdealLoop::loop_predication_follow_branches(Node*, IdealLoopTree*, float, PathFrequency&, Node_Stack&, VectorSet&, Node_List&)+0x574
V  [libjvm.so+0x1348d82]  PhaseIdealLoop::loop_predication_impl(IdealLoopTree*) [clone .part.0]+0xcc2
V  [libjvm.so+0x13492f9]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x109
V  [libjvm.so+0x1349235]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x45
V  [libjvm.so+0x1349235]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x45
V  [libjvm.so+0x1349235]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x45
V  [libjvm.so+0x1349235]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x45
V  [libjvm.so+0x1349235]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x45
V  [libjvm.so+0x1349235]  IdealLoopTree::loop_predication(PhaseIdealLoop*)+0x45
V  [libjvm.so+0x1392f97]  PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0x1327
V  [libjvm.so+0xa8ea5a]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x28a
V  [libjvm.so+0xa8ad3c]  Compile::Optimize()+0x102c
V  [libjvm.so+0xa8cf9e]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x159e
V  [libjvm.so+0x8a5814]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x664
V  [libjvm.so+0xa9d298]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xc88
V  [libjvm.so+0xa9e058]  CompileBroker::compiler_thread_loop()+0x648
V  [libjvm.so+0x19266da]  JavaThread::thread_main_inner()+0x25a
V  [libjvm.so+0x192eaa0]  Thread::call_run()+0x100
V  [libjvm.so+0x160fb34]  thread_native_entry(Thread*)+0x104
Comments
ILW = C2 assertion in loop predication, single fuzzer test, disable compilation of affected method = HLM = P3
25-01-2022