JDK-8367623 : [lworld] C2: Ideal Optimization on InlineTypeNode should not be carried out after Macro Expansion
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P3
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2025-09-15
  • Updated: 2025-12-10
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
repo-valhallaUnresolved
Related Reports
Causes :  
Relates :  
Relates :  
Description
There are a lot of crashes with the same failure in the Valhalla CI when additionally running with -XX:VerifyIterativeGVN=1110. The flag was recently merged in but the CI is not run with it by default.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69474/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5a699e05-6f5a-49c8-9c91-b03e8d2b8fae/runs/9950c197-66c6-4c94-8e92-55985b2efcf3/workspace/open/src/hotspot/share/opto/phaseX.cpp:3319), pid=1596181, tid=1596196
#  assert(false) failed: Need to remove from hash before changing edges
#
# JRE version: Java(TM) SE Runtime Environment (26.0+1) (fastdebug build 26-valhalla+1-12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-valhalla+1-12, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, parallel gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0x15e12c0]  Node::set_req_X(unsigned int, Node*, PhaseIterGVN*)+0x2c0
..............
Command Line: -Dtest.vm.opts=-XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/24/36/bundles/linux-aarch64/jdk-24_linux-aarch64_bin.tar.gz/jdk-24 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/tmp -Dtest.tool.vm.opts=-J-XX:MaxRAMPercentage=6.25 -J-Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/24/36/bundles/linux-aarch64/jdk-24_linux-aarch64_bin.tar.gz/jdk-24 -J-Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/tmp -Dtest.compiler.opts= -Dtest.java.opts=-XX:+UseParallelGC -XX:+UseNUMA -XX:VerifyIterativeGVN=1110 -Dtest.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/linux-aarch64-debug.jdk/jdk-26/fastdebug -Dcompile.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/linux-aarch64-debug.jdk/jdk-26/fastdebug -Dtest.timeout.factor=10.0 -Dtest.nativepath=/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/linux-aarch64-debug.test/hotspot/jtreg/native -Dtest.root=/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/src.full/open/test/hotspot/jtreg -Dtest.name=compiler/valhalla/inlinetypes/TestFieldNullMarkers.java -Dtest.verbose=Verbose[p=BRIEF,f=FULL,e=FULL,t=true,m=false] -Dtest.file=/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/src.full/open/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestFieldNullMarkers.java -Dtest.src=/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/src.full/open/test/hotspot/jtreg/compiler/valhalla/inlinetypes -Dtest.src.path=/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/src.full/open/test/hotspot/jtreg/compiler/valhalla/inlinetypes:/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/src.full/open/test/lib:/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/src.full/open/test/hotspot/jtreg -Dtest.classes=/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/0/compiler/valhalla/inlinetypes/TestFieldNullMarkers.d -Dtest.class.path=/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/0/compiler/valhalla/inlinetypes/TestFieldNullMarkers.d:/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/0/test/lib:/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/0 -Dtest.class.path.prefix=/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/0/compiler/valhalla/inlinetypes/TestFieldNullMarkers.d:/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/src.full/open/test/hotspot/jtreg/compiler/valhalla/inlinetypes:/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/0/test/lib:/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/classes/0 -Dtest.modules=java.base/jdk.internal.value java.base/jdk.internal.vm.annotation -Dtest.enable.preview=true --add-modules=java.base --add-exports=java.base/jdk.internal.value=ALL-UNNAMED --add-exports=java.base/jdk.internal.vm.annotation=ALL-UNNAMED -XX:MaxRAMPercentage=6.25 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/24/36/bundles/linux-aarch64/jdk-24_linux-aarch64_bin.tar.gz/jdk-24 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/tmp -XX:+UseParallelGC -XX:+UseNUMA -XX:VerifyIterativeGVN=1110 -Djava.library.path=/opt/mach5/mesos/work_dir/jib-master/install/jdk-26-valhalla+1-12/linux-aarch64-debug.test/hotspot/jtreg/native --enable-preview com.sun.javatest.regtest.agent.MainWrapper /opt/mach5/mesos/work_dir/slaves/7b1a61fd-59de-400e-939e-76c8ba818320-S69478/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3433df56-5467-467b-92f0-e955daaf42d6/runs/0cab079e-c579-4657-8610-9ffbd3b6a29e/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_compiler/compiler/valhalla/inlinetypes/TestFieldNullMarkers.d/main.0.jta
............
C2:11689 1041 % !   4       compiler.valhalla.inlinetypes.TestFieldNullMarkers::main @ 16 (3057 bytes)

Stack: [0x0000ffff88af2000,0x0000ffff88cf0000],  sp=0x0000ffff88cea7f0,  free space=2017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x15e12c0]  Node::set_req_X(unsigned int, Node*, PhaseIterGVN*)+0x2c0  (phaseX.cpp:3319)
V  [libjvm.so+0xe39ec8]  InlineTypeNode::Ideal(PhaseGVN*, bool)+0x308  (inlinetypenode.hpp:110)
V  [libjvm.so+0x15e7414]  PhaseIterGVN::verify_Ideal_for(Node*, bool)+0x128  (phaseX.cpp:1822)
V  [libjvm.so+0x15e800c]  PhaseIterGVN::verify_optimize()+0x6ac  (phaseX.cpp:1088)
V  [libjvm.so+0x15e8c70]  PhaseIterGVN::optimize()+0x290  (phaseX.cpp:1069)
V  [libjvm.so+0x1371e3c]  PhaseMacroExpand::expand_macro_nodes()+0xddc  (macro.cpp:3314)
V  [libjvm.so+0x9c7e58]  Compile::Optimize()+0x1478  (compile.cpp:3036)
V  [libjvm.so+0x9c99d8]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x164c  (compile.cpp:872)
V  [libjvm.so+0x7e4c60]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x2bc  (c2compiler.cpp:143)
V  [libjvm.so+0x9d8638]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x9d4  (compileBroker.cpp:2323)
V  [libjvm.so+0x9d94ec]  CompileBroker::compiler_thread_loop()+0x62c  (compileBroker.cpp:1967)
V  [libjvm.so+0xeeb868]  JavaThread::thread_main_inner()+0x108  (javaThread.cpp:774)
V  [libjvm.so+0x18a34cc]  Thread::call_run()+0xac  (thread.cpp:243)
V  [libjvm.so+0x15513fc]  thread_native_entry(Thread*)+0x12c  (os_linux.cpp:868)
C  [libpthread.so.0+0x7950]  start_thread+0x190

Comments
A pull request was submitted for review. Branch: lworld URL: https://git.openjdk.org/valhalla/pull/1742 Date: 2025-11-17 16:14:27 +0000
19-11-2025