JDK-8231550 : C2: ShouldNotReachHere() in verify_strip_mined_scheduling
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,11-shenandoah,13,14
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-09-26
  • Updated: 2022-06-27
  • Resolved: 2019-10-07
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 14
11.0.8-oracleFixed 13.0.4Fixed 14 b18Fixed
Related Reports
Relates :  
Relates :  
Description
(synopsis is provisional, until the root cause is found)

Note: this happens even after JDK-8229483, which does not make it duplicate of that issue. Also, there is similar thing seen in valhalla, JDK-8230798. 

Found with fuzzing. Reliably reproduces with the attached testcase (0021.tar.gz). Also seen to happen in 11.

#  Internal Error (/home/shade/trunks/jdk-jdk/src/hotspot/share/opto/loopnode.cpp:4269), pid=2722, tid=2733
#  Error: ShouldNotReachHere()
#
# JRE version: OpenJDK Runtime Environment (14.0) (fastdebug build 14-internal+0-adhoc.shade.jdk-jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 14-internal+0-adhoc.shade.jdk-jdk, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x120657c]  PhaseIdealLoop::verify_strip_mined_scheduling(Node*, Node*)+0x3cc

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

Current thread (0x00007fdf28592000):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=2733, stack(0x00007fdeb856a000,0x00007fdeb866b000)]


Current CompileTask:
C2:    785   79   !   4       Test::vMeth1 (203 bytes)

Stack: [0x00007fdeb856a000,0x00007fdeb866b000],  sp=0x00007fdeb8665200,  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+0x120657c]  PhaseIdealLoop::verify_strip_mined_scheduling(Node*, Node*)+0x3cc
V  [libjvm.so+0x12099e2]  PhaseIdealLoop::build_loop_late_post_work(Node*, bool)+0x362
V  [libjvm.so+0x1209f60]  PhaseIdealLoop::build_loop_late(VectorSet&, Node_List&, Node_Stack&)+0xf0
V  [libjvm.so+0x120dc3a]  PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0x74a
V  [libjvm.so+0x9c94d1]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x2c1
V  [libjvm.so+0x9c6388]  Compile::Optimize()+0x9d8
V  [libjvm.so+0x9c7bf5]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x1205
V  [libjvm.so+0x812a4d]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x10d
V  [libjvm.so+0x9d3d97]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x397
V  [libjvm.so+0x9d4f18]  CompileBroker::compiler_thread_loop()+0x4f8
V  [libjvm.so+0x1833e6a]  JavaThread::thread_main_inner()+0x26a
V  [libjvm.so+0x183bc3b]  JavaThread::run()+0x25b
V  [libjvm.so+0x18393d6]  Thread::call_run()+0xf6
V  [libjvm.so+0x143776e]  thread_native_entry(Thread*)+0x10e

Comments
13u Fix Request Backporting this patch eliminates a C2 bug in loop strip ming. Applies cleanly, tier1 passed
18-05-2020

11u Fix Request Backporting this patch eliminates a C2 bug in loop strip ming. Patch does not apply cleanly to 11u and requires adjustments 11u RFR: https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-March/037321.html
18-03-2020

Checked that regression test compiler/loopstripmining/TestConservativeAntiDep.java passed in jdk14 atr and latest CI.
31-01-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/bada0782842a User: roland Date: 2019-10-07 12:10:08 +0000
07-10-2019

[~ clanger] right. Sorry, I must have confused that one with another bug.
03-10-2019

I removed jdk11u-fix-request as there's not a fix for this yet. Please add this label once there's a materialized backport request.
03-10-2019

initial ILW = C2 assert related to loop strip mining; reproducible with fuzzer test; disable loop strip mining = HML = P2 Hi [~roland], request your help to check this task. Thanks.
30-09-2019