JDK-8353944 : C2 crash: Not monotonic in PhaseCCP::verify_type
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2025-04-07
  • Updated: 2025-09-29
  • Resolved: 2025-04-08
Related Reports
Duplicate :  
Description
Test: applications/javafuzzer/JF_5000Tests.java🎲

java -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -Xcomp Test_765.java

 1494  CastII  === 1141 955  [[ 1493 ]]  #int unconditional dependency
 1063  AddI  === _ 1043 48  [[ 1383 1493 1164 1459 1497 1495 1043 1154 1499 1348 1134 1144 ]]  !orig=[1458],... !jvms: Test_765::vMeth1 @ bci:105 (line 84)
 1493  AndI  === _ 1063 1494  [[ 1144 ]]  !orig=[1117] !jvms: Test_765::vMeth1 @ bci:126 (line 86)
told = int:0
tnew = top

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/03ecc23a-edd5-4bb5-a333-4ff8ea07fd7c-S622/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/6154f5c6-1bef-44ea-bc7a-403c702834a8/runs/69624066-772a-4727-9c0e-2da5b1943506/workspace/open/src/hotspot/share/opto/phaseX.cpp:1790), pid=2810155, tid=2810174
#  fatal error: Not monotonic
#
# JRE version: Java(TM) SE Runtime Environment (25.0+18) (fastdebug build 25-ea+18-LTS-2010)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-ea+18-LTS-2010, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0x14776e4]  PhaseCCP::verify_type(Node*, Type const*, Type const*)+0x1a4
#
# Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S35229/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/6ef74136-b9db-4002-af27-f51b1978b2c4/runs/bf9302bb-2f30-435a-bff8-87b91b0aa73c/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_javafuzzer_JF_5000Tests_java/scratch/0/generated/javafuzzer_tests/core.2810155)
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

---------------  S U M M A R Y ------------

Command Line: -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -Xcomp Test_765

Host: AArch64, 8 cores, 30G, Oracle Linux Server release 9.4
Time: Mon Apr  7 18:48:59 2025 UTC elapsed time: 0.292077 seconds (0d 0h 0m 0s)

---------------  T H R E A D  ---------------

Current thread (0x0000ffff8c263c40):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=2810174, stack(0x0000ffff5b1ae000,0x0000ffff5b3ac000) (2040K)]


Current CompileTask:
C2:292   12   !b  4       Test_765::vMeth1 (325 bytes)

Stack: [0x0000ffff5b1ae000,0x0000ffff5b3ac000],  sp=0x0000ffff5b3a6a00,  free space=2018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x14776e4]  PhaseCCP::verify_type(Node*, Type const*, Type const*)+0x1a4  (phaseX.cpp:1790)
V  [libjvm.so+0x147bde4]  PhaseCCP::analyze()+0x314  (phaseX.cpp:1833)
V  [libjvm.so+0x908cc0]  Compile::Optimize()+0x73c  (compile.cpp:2452)
V  [libjvm.so+0x90b5b0]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x165c  (compile.cpp:860)
V  [libjvm.so+0x755bb4]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x2c0  (c2compiler.cpp:141)
V  [libjvm.so+0x919c94]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x990  (compileBroker.cpp:2307)
V  [libjvm.so+0x91a94c]  CompileBroker::compiler_thread_loop()+0x608  (compileBroker.cpp:1951)
V  [libjvm.so+0xddc2e8]  JavaThread::thread_main_inner()+0x104  (javaThread.cpp:772)
V  [libjvm.so+0x16e6160]  Thread::call_run()+0xac  (thread.cpp:231)
V  [libjvm.so+0x13f8894]  thread_native_entry(Thread*)+0x130  (os_linux.cpp:877)
C  [libc.so.6+0x806d8]  start_thread+0x2d8
Comments
Thanks [~mbaesken] and sorry for the late reply. I was on vacation.
29-09-2025

I created https://bugs.openjdk.org/browse/JDK-8367967 .
18-09-2025

Hi [~thartmann] today we see the same assertion on Linux aarch64 . Is it maybe related to new HS coding? Should I open a new JBS issue for this ? Test java/foreign/TestUpcallStress.java triggers this (fastdebug was used for running tests) . # Internal Error (/priv/jenkins/client-home/workspace/openjdk-jdk-dev-linux_aarch64-dbg/jdk/src/hotspot/share/opto/phaseX.cpp:2763), pid=1089937, tid=1089972 # fatal error: Not monotonic # # JRE version: OpenJDK Runtime Environment (26.0) (fastdebug build 26-internal-adhoc.sapmachine.jdk) # Java VM: OpenJDK 64-Bit Server VM (fastdebug 26-internal-adhoc.sapmachine.jdk, mixed mode, sharing, tiered, compressed oops, compact obj headers, g1 gc, linux-aarch64) # Problematic frame: # V [libjvm.so+0x157a6c4] PhaseCCP::verify_type(Node*, Type const*, Type const*)+0x1a4 # # --------------- T H R E A D --------------- Current thread (0x0000ff5b2024d160): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=1089972, stack(0x0000ff5aeec08000,0x0000ff5aeee06000) (2040K)] Current CompileTask: C2:21575 3680 4 jdk.internal.foreign.Utils::computePaddedStructLayout (159 bytes) Stack: [0x0000ff5aeec08000,0x0000ff5aeee06000], sp=0x0000ff5aeee009e0, free space=2018k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x157a6c4] PhaseCCP::verify_type(Node*, Type const*, Type const*)+0x1a4 (phaseX.cpp:2763) V [libjvm.so+0x15829bc] PhaseCCP::analyze()+0x2bc (phaseX.cpp:2806) V [libjvm.so+0x996868] Compile::Optimize()+0x768 (compile.cpp:2481) V [libjvm.so+0x999084] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1664 (compile.cpp:859) V [libjvm.so+0x7dd3dc] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x2c8 (c2compiler.cpp:147) V [libjvm.so+0x9a7bf8] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xaa4 (compileBroker.cpp:2342) V [libjvm.so+0x9a8974] CompileBroker::compiler_thread_loop()+0x600 (compileBroker.cpp:1986) V [libjvm.so+0xeb23f8] JavaThread::thread_main_inner()+0x104 (javaThread.cpp:775) V [libjvm.so+0x19b54fc] Thread::call_run()+0xac (thread.cpp:243) V [libjvm.so+0x14faa14] thread_native_entry(Thread*)+0x130 (os_linux.cpp:898) C [libc.so.6+0x8595c]
17-09-2025

Narrowed it down to JDK-8346664. This is a duplicate of JDK-8350563.
08-04-2025