JDK-8275854 : C2: assert(stride_con != 0) failed: missed some peephole opt
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16,17,18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-10-25
  • Updated: 2022-03-03
  • Resolved: 2021-11-11
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 JDK 18
17.0.4-oracleFixed 18 b24Fixed
Related Reports
Duplicate :  
Relates :  
Description
Crash happened when run the following test 

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/data/openjdk/jdk_dev/src/hotspot/share/opto/loopnode.cpp:780), pid=23848, tid=23868
#  assert(stride_con != 0) failed: missed some peephole opt
#
# JRE version: OpenJDK Runtime Environment (18.0) (slowdebug build 18-internal+0-adhoc.root.jdkdev)
# Java VM: OpenJDK 64-Bit Server VM (slowdebug 18-internal+0-adhoc.root.jdkdev, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xe02fd7]  PhaseIdealLoop::transform_long_counted_loop(IdealLoopTree*, Node_List&)+0x103
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

---------------  S U M M A R Y ------------

Command Line: Test

Host: VM_235_31_centos, AMD EPYC 7K62 48-Core Processor, 16 cores, 31G, CentOS Linux release 7.2 (Final)
Time: Mon Oct 25 15:01:23 2021 CST elapsed time: 1.117192 seconds (0d 0h 0m 1s)

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

Current thread (0x00007fce3c04f3c0):  JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=23868, stack(0x00007fce7e5cb000,0x00007fce7e6cc000)]


Current CompileTask:
C2:   1117  373 %     4       Test::lMeth @ 168 (358 bytes)

Stack: [0x00007fce7e5cb000,0x00007fce7e6cc000],  sp=0x00007fce7e6c5ef0,  free space=1003k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xe02fd7]  PhaseIdealLoop::transform_long_counted_loop(IdealLoopTree*, Node_List&)+0x103
V  [libjvm.so+0xe11e57]  PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0x152d
V  [libjvm.so+0x7ce5da]  PhaseIdealLoop::PhaseIdealLoop(PhaseIterGVN&, LoopOptsMode)+0xf4
V  [libjvm.so+0x7ce7cc]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x46
V  [libjvm.so+0x7c2595]  Compile::Optimize()+0xb95
V  [libjvm.so+0x7bb86a]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0x142c
V  [libjvm.so+0x6afe8c]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x138
V  [libjvm.so+0x7d8d18]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x97e
V  [libjvm.so+0x7d78ab]  CompileBroker::compiler_thread_loop()+0x3df
V  [libjvm.so+0x7f7e45]  CompilerThread::thread_entry(JavaThread*, JavaThread*)+0x69
V  [libjvm.so+0x1249f3f]  JavaThread::thread_main_inner()+0x15f
V  [libjvm.so+0x1249dd6]  JavaThread::run()+0x1fc
V  [libjvm.so+0x1247636]  Thread::call_run()+0x180
V  [libjvm.so+0xfadbd5]  thread_native_entry(Thread*)+0x18f
Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/185 Date: 2022-03-02 16:23:29 +0000
02-03-2022

Fix Request (17u): Should get backported for parity with 17.0.4-oracle. Applies cleanly.
02-03-2022

Changeset: aea09677 Author: casparcwang <casparcwang@tencent.com> Committer: Hui Shi <hshi@openjdk.org> Date: 2021-11-11 10:39:09 +0000 URL: https://git.openjdk.java.net/jdk/commit/aea096770e74b9c0e1556467705ffdd6cf843d9d
11-11-2021

ILW = C2 assertion failure, single JavaFuzzer test, disable compilation of affected method = HLM = P3
25-10-2021