JDK-8247763 : assert(outer->outcnt() == 2) failed: 'only phis' failure in LoopNode::verify_strip_mined()
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,13,14,15,16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-06-17
  • Updated: 2024-11-13
  • Resolved: 2020-06-22
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 13 JDK 15 JDK 16
11.0.10-oracleFixed 13.0.8Fixed 15 b29Fixed 16Fixed
Description
Attached javafuzzer test fails with -
(attached hs_err log)

$ javac *.java
$ java -Xmx1G -Xcomp -Xbatch -XX:CompileOnly=Test Test

#  Internal Error (..../open/src/hotspot/share/opto/loopnode.cpp:1108), pid=13001, tid=13013
#  assert(outer->outcnt() == 2) failed: only phis
#
# JRE version: Java(TM) SE Runtime Environment (15.0+25) (fastdebug build 15-ea+25-1229)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 15-ea+25-1229, compiled mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x114e4c5]  LoopNode::verify_strip_mined(int) const+0xdd5
.............
Command Line: -Xmx1G -Xcomp -Xbatch -XX:CompileOnly=Test Test
..........
Current thread (0x00007f0d94496440):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=13013, stack(0x00007f0d6a4ce000,0x00007f0d6a5cf000)]


Current CompileTask:
C2:  32894   66   !b  4       Test::mainTest (625 bytes)

Stack: [0x00007f0d6a4ce000,0x00007f0d6a5cf000],  sp=0x00007f0d6a5c9210,  free space=1004k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x114e4c5]  LoopNode::verify_strip_mined(int) const+0xdd5
V  [libjvm.so+0x114e6d7]  CountedLoopNode::skip_strip_mined(int)+0x47
V  [libjvm.so+0x113b4aa]  PhaseIdealLoop::do_unroll(IdealLoopTree*, Node_List&, bool)+0x10a
V  [libjvm.so+0x11416e3]  IdealLoopTree::iteration_split_impl(PhaseIdealLoop*, Node_List&) [clone .part.0]+0x353
V  [libjvm.so+0x1141a7b]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x14b
V  [libjvm.so+0x1141956]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x26
V  [libjvm.so+0x114199a]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x6a
V  [libjvm.so+0x1141956]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x26
V  [libjvm.so+0x1169a0d]  PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0xd3d
V  [libjvm.so+0x902eae]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x31e
V  [libjvm.so+0x900230]  Compile::Optimize()+0xd70
V  [libjvm.so+0x901d7c]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x15bc
V  [libjvm.so+0x74f115]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x175
V  [libjvm.so+0x91061e]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x45e
V  [libjvm.so+0x911cb8]  CompileBroker::compiler_thread_loop()+0x6b8
V  [libjvm.so+0x1696f4c]  JavaThread::thread_main_inner()+0x21c
V  [libjvm.so+0x169cd70]  Thread::call_run()+0x100
V  [libjvm.so+0x13a2296]  thread_native_entry(Thread*)+0x116

Comments
Fix request (13u) - will label after testing completed. I would like to backport the fix to jdk13u for parity with jdk11u. I observed the same error running the attached test on the fastdebug build. This bug was fixed by applying this patch. The original patch applied cleanly.
07-05-2021

Fix request (11u) -- will label after testing completed. I would like to downport this for parity with 11.0.10-oracle. Applies clean.
01-09-2020

Changeset: eb758d53 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-06-18 15:44:55 +0000 URL: https://git.openjdk.java.net/lanai/commit/eb758d53
02-07-2020

Changeset: 5adfaa39 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-06-18 15:44:55 +0000 URL: https://git.openjdk.java.net/lanai/commit/5adfaa39
02-07-2020

Changeset: eb758d53 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-06-18 15:44:55 +0000 URL: https://git.openjdk.java.net/panama-foreign/commit/eb758d53
02-07-2020

Changeset: eb758d53 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-06-18 15:44:55 +0000 URL: https://git.openjdk.java.net/amber/commit/eb758d53
02-07-2020

Changeset: 5adfaa39 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-06-18 15:44:55 +0000 URL: https://git.openjdk.java.net/panama-foreign/commit/5adfaa39
02-07-2020

Changeset: 5adfaa39 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-06-18 15:44:55 +0000 URL: https://git.openjdk.java.net/amber/commit/5adfaa39
02-07-2020

Changeset: eb758d53 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-06-18 15:44:55 +0000 URL: https://git.openjdk.java.net/mobile/commit/eb758d53
02-07-2020

Changeset: 5adfaa39 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-06-18 15:44:55 +0000 URL: https://git.openjdk.java.net/mobile/commit/5adfaa39
02-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk15/rev/65a0669e32da User: roland Date: 2020-06-22 08:47:42 +0000
22-06-2020

Roland, could you please have a look?
18-06-2020

ILW = Loop strip mining verification code fails, with java fuzzer test, disable loop strip mining = HLM = P3
18-06-2020