JDK-8341831 : PhaseCFG::insert_anti_dependences asserts with "no loads"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 24
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-10-09
  • Updated: 2024-10-21
  • Resolved: 2024-10-14
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 24
24 b20Fixed
Related Reports
Relates :  
Relates :  
Sub Tasks
JDK-8341860 :  
Description
After JDK-8333258, PhaseCFG::insert_anti_dependences asserts with "no loads" when running applications/ctw/modules/java_base_2.java

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/workspace/open/src/hotspot/share/opto/gcm.cpp:772), pid=2897021, tid=2897036
#  assert(!use_mem_state->needs_anti_dependence_check()) failed: no loads
#
# JRE version: Java(TM) SE Runtime Environment (24.0+19) (fastdebug build 24-ea+19-2202)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-ea+19-2202, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xdaead4]  PhaseCFG::insert_anti_dependences(Block*, Node*, bool)+0xa54


Current CompileTask:
C2:64324 10896    b        jdk.internal.misc.Unsafe::writebackMemory (58 bytes)

Stack: [0x00007f91e99fb000,0x00007f91e9afb000],  sp=0x00007f91e9af6690,  free space=1005k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xdaead4]  PhaseCFG::insert_anti_dependences(Block*, Node*, bool)+0xa54  (gcm.cpp:772)
V  [libjvm.so+0xdb637a]  PhaseCFG::schedule_late(VectorSet&, Node_Stack&)+0x9ea  (gcm.cpp:1517)
V  [libjvm.so+0xdb6cef]  PhaseCFG::global_code_motion()+0x3ef  (gcm.cpp:1628)
V  [libjvm.so+0xdb9af1]  PhaseCFG::do_global_code_motion()+0x51  (gcm.cpp:1751)
V  [libjvm.so+0xa2d2a4]  Compile::Code_Gen()+0x2a4  (compile.cpp:2950)
V  [libjvm.so+0xa30190]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1c70  (compile.cpp:885)
V  [libjvm.so+0x878be5]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1d5  (c2compiler.cpp:142)
V  [libjvm.so+0xa3bda8]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x928  (compileBroker.cpp:2303)
V  [libjvm.so+0xa3ca38]  CompileBroker::compiler_thread_loop()+0x478  (compileBroker.cpp:1961)
V  [libjvm.so+0xeedcbc]  JavaThread::thread_main_inner()+0xcc  (javaThread.cpp:759)
V  [libjvm.so+0x1813fa6]  Thread::call_run()+0xb6  (thread.cpp:234)
V  [libjvm.so+0x14f9078]  thread_native_entry(Thread*)+0x128  (os_linux.cpp:858)
Comments
Changeset: a8a8b2de Branch: master Author: Igor Veresov <iveresov@openjdk.org> Date: 2024-10-14 16:44:53 +0000 URL: https://git.openjdk.org/jdk/commit/a8a8b2deba854ac105ed760c09e65701c4d0f6fc
14-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21455 Date: 2024-10-10 15:22:20 +0000
10-10-2024

I can reproduce this with SDE [1] and ReplayCompiles on my machine: sde64 -future -- java -XX:+ReplayCompiles -XX:+ReplayIgnoreInitErrors -XX:ReplayDataFile=replay_modules_java_base_3848_2897021.log I narrowed it down to JDK-8337066. Re-assigning to [~iveresov] [1] https://www.intel.com/content/www/us/en/download/684897/intel-software-development-emulator.html
09-10-2024

Roland, please have a look.
09-10-2024

ILW = Assert during C2 compilation (recent regression), reproducible with CTW and stress flags, no workaround but disable compilation of affected method = HLM = P3
09-10-2024