JDK-8333252 : C2: assert(assertion_predicate_has_loop_opaque_node(iff)) failed: must find OpaqueLoop* nodes
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-05-30
  • Updated: 2024-06-07
  • Resolved: 2024-06-05
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 23
23 b26Fixed
Related Reports
Relates :  
Description
java -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -Xcomp Test.java

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/workspace/open/src/hotspot/share/opto/loopPredicate.cpp:354), pid=2883624, tid=2883666
#  assert(assertion_predicate_has_loop_opaque_node(iff)) failed: must find OpaqueLoop* nodes

Current CompileTask:
C2:427   17 %  b  4       Test::mainTest @ 236 (671 bytes)

Stack: [0x0000ffff7c3d7000,0x0000ffff7c5d5000],  sp=0x0000ffff7c5cf840,  free space=2018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x10cc5e4]  PhaseIdealLoop::get_assertion_predicates(Node*, Unique_Node_List&, bool)+0x4b0  (loopPredicate.cpp:354)
V  [libjvm.so+0x11002e8]  PhaseIdealLoop::collect_useful_template_assertion_predicates_for_loop(IdealLoopTree*, Unique_Node_List&)+0x1e8  (loopnode.cpp:4376)
V  [libjvm.so+0x110d0b0]  PhaseIdealLoop::eliminate_useless_template_assertion_predicates()+0x1ac  (loopnode.cpp:4355)
V  [libjvm.so+0x1116d30]  PhaseIdealLoop::build_and_optimize()+0x7d0  (loopnode.cpp:4735)
V  [libjvm.so+0x8d1950]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x2e0  (loopnode.hpp:1115)
V  [libjvm.so+0x8cd864]  Compile::Optimize()+0xeb4  (compile.cpp:2392)
V  [libjvm.so+0x8d0078]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1484  (compile.cpp:853)
V  [libjvm.so+0x72bd30]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x17c  (c2compiler.cpp:142)
V  [libjvm.so+0x8dbd8c]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x7cc  (compileBroker.cpp:2303)
V  [libjvm.so+0x8dc8d4]  CompileBroker::compiler_thread_loop()+0x514  (compileBroker.cpp:1961)
V  [libjvm.so+0xd3f34c]  JavaThread::thread_main_inner()+0xcc  (javaThread.cpp:759)
V  [libjvm.so+0x159f840]  Thread::call_run()+0xac  (thread.cpp:225)
V  [libjvm.so+0x12f6be4]  thread_native_entry(Thread*)+0x130  (os_linux.cpp:846)
C  [libpthread.so.0+0x7950]  start_thread+0x190
Comments
Changeset: c5c08678 Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2024-06-05 15:37:31 +0000 URL: https://git.openjdk.org/jdk/commit/c5c0867881a43c81e88453274ac12e45454685a4
05-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19500 Date: 2024-05-31 12:33:04 +0000
31-05-2024

I attached a reduced version of the test TestSimple.java.
30-05-2024

Regression from JDK-8330386. [~chagedorn], please have a look. ILW = Assert during C2 compilation (regression), reproducible with JavaFuzzer generated test, no known workaround but disable compilation of affected method or loop predication = HLM = P3
30-05-2024