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)