JDK-8347515 : C2: assert(!success || (C->macro_count() == (old_macro_count - 1))) failed: elimination must have deleted one node from macro list
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23,24,25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-01-13
  • Updated: 2025-05-21
  • Resolved: 2025-05-12
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 25
25 b23Fixed
Related Reports
Relates :  
Description
The attached Java Fuzzer test fails after JDK-8324655 with the following assertion:

$ java -XX:-TieredCompilation -Xbatch -XX:CompileCommand=compileonly,*Test*::* Test.java
$ java -XX:-TieredCompilation -Xbatch -XX:CompileCommand=compileonly,*Reduced*::* Reduced.java

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/8862186e-67f1-442a-b654-15b802343ea2-S135/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/577b0e3c-e85b-40ae-953c-cd3bc23414f3/runs/4d42be6f-1f88-4a8e-9e35-1871751f6cdc/workspace/open/src/hotspot/share/opto/macro.cpp:2523), pid=1382095, tid=1382131
#  assert(!success || (C->macro_count() == (old_macro_count - 1))) failed: elimination must have deleted one node from macro list
#
# JRE version: Java(TM) SE Runtime Environment (25.0+1) (fastdebug build 25-http3+1-LTS-4)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-http3+1-LTS-4, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1375648]  PhaseMacroExpand::expand_macro_nodes()+0x2c8
...........
Command Line: -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -XX:-TieredCompilation -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:+StressMacroExpansion -XX:StressSeed=812750017 -XX:+VerifyLoopOptimizations -XX:VerifyIterativeGVN=10 -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/23/37/bundles/linux-x64/jdk-23_linux-x64_bin.tar.gz/jdk-23 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/8862186e-67f1-442a-b654-15b802343ea2-S145/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/5f4b963e-2ddd-482c-8172-69f104a04a41/runs/7444f70f-0682-4eda-a9d8-e1999ae50e43/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_javafuzzer_QuickTest_java/tmp Test
...........
C2:143    3 %  b        Test::vMeth1 @ 47 (239 bytes)

Stack: [0x00007f6064e14000,0x00007f6064f14000],  sp=0x00007f6064f0f350,  free space=1004k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1375648]  PhaseMacroExpand::expand_macro_nodes()+0x2c8  (macro.cpp:2523)
V  [libjvm.so+0xa536dd]  Compile::Optimize()+0xb8d  (compile.cpp:2450)
V  [libjvm.so+0xa5754f]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1b6f  (compile.cpp:852)
V  [libjvm.so+0x89f5f5]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1d5  (c2compiler.cpp:142)
V  [libjvm.so+0xa636d8]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x928  (compileBroker.cpp:2319)
V  [libjvm.so+0xa64418]  CompileBroker::compiler_thread_loop()+0x528  (compileBroker.cpp:1977)
V  [libjvm.so+0xf3314e]  JavaThread::thread_main_inner()+0xee  (javaThread.cpp:777)
V  [libjvm.so+0x187b426]  Thread::call_run()+0xb6  (thread.cpp:232)
V  [libjvm.so+0x1555ce8]  thread_native_entry(Thread*)+0x128  (os_linux.cpp:860)
Comments
Changeset: 0258d999 Branch: master Author: Saranya Natarajan <saranya.natarajan@oracle.com> Committer: Roberto CastaƱeda Lozano <rcastanedalo@openjdk.org> Date: 2025-05-12 08:50:01 +0000 URL: https://git.openjdk.org/jdk/commit/0258d9998ebc523a6463818be00353c6ac8b7c9c
12-05-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24890 Date: 2025-04-25 21:56:10 +0000
29-04-2025

ILW = Crash in macro expansion, single fuzzer test, disable compilation of affected method = HLM = P3
13-01-2025

Assigning to [~thartmann] to reserve for new hire starting in February.
13-01-2025