JDK-8335393 : C2: assert(!had_error) failed: bad dominance
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23,24
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-07-01
  • Updated: 2024-08-05
  • Resolved: 2024-07-25
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 b09Fixed
Related Reports
Relates :  
Description
The attached Java Fuzzer test starts to fail after JDK-8319793:

To reproduce:
$ java -XX:CompileCommand=compileonly,*Test*::* -Xbatch -XX:PerMethodTrapLimit=0 Test.java
$ java -XX:CompileCommand=compileonly,*Reduced*::* -Xbatch -XX:PerMethodTrapLimit=0 Reduced.java

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (c:\sb\prod\1719526677\workspace\open\src\hotspot\share\opto\loopnode.cpp:5909), pid=24072, tid=76060
#  assert(!had_error) failed: bad dominance
#
# JRE version: Java(TM) SE Runtime Environment (23.0+30) (fastdebug build 23-ea+30-2313)
............
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=1548865359 -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0 -XX:+VerifyLoopOptimizations -XX:VerifyIterativeGVN=10 -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=c:\ade\mesos\work_dir\jib-master\install\jdk\22\36\bundles\windows-x64\jdk-22_windows-x64_bin.zip\jdk-22 -Djava.io.tmpdir=c:\sb\prod\1719564196\testoutput\test-support\jtreg_closed_test_hotspot_jtreg_applications_javafuzzer_MediumTest_java\tmp -XX:+CreateCoredumpOnCrash Test
............
Current CompileTask:
C2:904    7 % !b        Test::mainTest @ 236 (627 bytes)

Stack: [0x0000001602f00000,0x0000001603000000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xc95921]  os::win32::platform_print_native_stack+0x101  (os_windows_x86.cpp:235)
V  [jvm.dll+0xf59c6b]  VMError::report+0x149b  (vmError.cpp:1010)
V  [jvm.dll+0xf5c30e]  VMError::report_and_die+0x80e  (vmError.cpp:1845)
V  [jvm.dll+0xf5ca34]  VMError::report_and_die+0x64  (vmError.cpp:1610)
V  [jvm.dll+0x557e4b]  report_vm_error+0x5b  (debug.cpp:193)
V  [jvm.dll+0xb0b2dc]  PhaseIdealLoop::compute_lca_of_uses+0x45c  (loopnode.cpp:5909)
V  [jvm.dll+0xb07928]  PhaseIdealLoop::build_loop_late_post_work+0x98  (loopnode.cpp:6285)
V  [jvm.dll+0xb0774e]  PhaseIdealLoop::build_loop_late+0x31e  (loopnode.cpp:6214)
V  [jvm.dll+0xb05f9c]  PhaseIdealLoop::build_and_optimize+0x7ec  (loopnode.cpp:4704)
V  [jvm.dll+0x4f942d]  PhaseIdealLoop::verify+0xfd  (loopnode.hpp:1187)
V  [jvm.dll+0x4e5123]  Compile::Optimize+0xa03  (compile.cpp:2409)
V  [jvm.dll+0x4e24a5]  Compile::Compile+0x1165  (compile.cpp:854)
V  [jvm.dll+0x3f28d9]  C2Compiler::compile_method+0x179  (c2compiler.cpp:145)
V  [jvm.dll+0x4ff787]  CompileBroker::invoke_compiler_on_method+0x747  (compileBroker.cpp:2306)
V  [jvm.dll+0x4fcdfb]  CompileBroker::compiler_thread_loop+0x33b  (compileBroker.cpp:1962)
V  [jvm.dll+0x7fff26]  JavaThread::thread_main_inner+0x266  (javaThread.cpp:760)
V  [jvm.dll+0xebd277]  Thread::call_run+0x1b7  (thread.cpp:230)
V  [jvm.dll+0xc93fa6]  thread_native_entry+0xd6  (os_windows.cpp:553)
C  [ucrtbase.dll+0x2268a]  (no source info available)
C  [KERNEL32.DLL+0x17ac4]  (no source info available)
C  [ntdll.dll+0x5a4e1]  (no source info available)
Comments
Changeset: 3baff2af Branch: master Author: Roland Westrelin <roland@openjdk.org> Date: 2024-07-25 09:26:11 +0000 URL: https://git.openjdk.org/jdk/commit/3baff2af6a30cc6cb2e0d4391db1cf7e61c33f64
25-07-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20140 Date: 2024-07-11 15:42:32 +0000
11-07-2024

[~roland] can you have a look?
01-07-2024

ILW = Bad graph, single fuzzer failure, disable compilation of affected method = HLM = P3
01-07-2024