JDK-8320299 : C2 compilation fails in GCM with "graph should be schedulable"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22,23
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-11-17
  • Updated: 2024-02-09
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.
Other
tbdUnresolved
Related Reports
Blocks :  
Description
The new -XX:+StressIncrementalInlining flag introduced by JDK-8319879 triggers the following assert with an (internal) Apache Cassandra stress test:

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/workspace/open/src/hotspot/share/opto/lcm.cpp:1198), pid=2057689, tid=2057705
#  assert(false) failed: graph should be schedulable
#
# JRE version: Java(TM) SE Runtime Environment (22.0) (fastdebug build 22-internal-2023-11-16-1028177.tobias.hartmann.jdk3)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-internal-2023-11-16-1028177.tobias.hartmann.jdk3, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, serial gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1206425]  PhaseCFG::schedule_local(Block*, GrowableArray<int>&, VectorSet&, long*)+0x30d5

Current CompileTask:
C2:65732 6973   !   4       org.apache.cassandra.db.partitions.AtomicBTreePartition::addAllWithSizeDelta (468 bytes)

Stack: [0x00007fce204c7000,0x00007fce205c7000],  sp=0x00007fce205c2960,  free space=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1206425]  PhaseCFG::schedule_local(Block*, GrowableArray<int>&, VectorSet&, long*)+0x30d5  (lcm.cpp:1198)
V  [libjvm.so+0xd78d40]  PhaseCFG::global_code_motion()+0x9f0  (gcm.cpp:1602)
V  [libjvm.so+0xd7b5a1]  PhaseCFG::do_global_code_motion()+0x51  (gcm.cpp:1644)
V  [libjvm.so+0x9fa444]  Compile::Code_Gen()+0x2a4  (compile.cpp:2949)
V  [libjvm.so+0x9fd382]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1cb2  (compile.cpp:887)
V  [libjvm.so+0x849797]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x207  (c2compiler.cpp:134)
V  [libjvm.so+0xa09340]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x980  (compileBroker.cpp:2292)
V  [libjvm.so+0xa0a0d8]  CompileBroker::compiler_thread_loop()+0x508  (compileBroker.cpp:1951)
V  [libjvm.so+0xec4adc]  JavaThread::thread_main_inner()+0xcc  (javaThread.cpp:720)
V  [libjvm.so+0x17a551a]  Thread::call_run()+0xba  (thread.cpp:220)
V  [libjvm.so+0x14ad64a]  thread_native_entry(Thread*)+0x12a  (os_linux.cpp:787)
Comments
Unfortunately, the current (complete fix) for JDK-8288981 does not solve the issue - it still triggers with my patch.
23-11-2023

Similar to JDK-8296077, this might be a duplicate of JDK-8288981 ([~chagedorn]). ILW = Assert during C2 compilation (bailout in product), single test with stress flag, no workaround but disable compilation of affected method = MLH = P4
17-11-2023

Replay compilation did not work for me (failed with "illegal use of unloaded klass").
17-11-2023