JDK-8350563 : C2 compilation fails because PhaseCCP does not reach a fixpoint
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-02-24
  • Updated: 2025-04-14
  • Resolved: 2025-04-09
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 b18Fixed
Related Reports
Causes :  
Duplicate :  
Description
java/lang/Character/CheckProp.java intermittently fails during CCP. I can reproduce this by running the test in a loop with "-XX:+UseParallelGC -XX:-TieredCompilation -XX:+UseNUMA" on my Linux x64 machine.

Missed Value optimization:
dist dump
---------------------------------------------
   1  1348  ConI  === 0  [[ 4214 4183 4177 4179 4181 4194 4196 4198 4200 4202 4204 4206 4208 4210 4212 ]]  #int:65535
   1  4215  CastII  === 854 346  [[ 4214 ]]  #int unconditional dependency !jvms: CheckProp::main @ bci:225 (line 57)
   0  4214  AndI  === _ 4215 1348  [[ 433 ]]  !orig=[856] !jvms: CharacterData01::getProperties @ bci:1 (line 71) CharacterData01::getType @ bci:2 (line 83) Character::getType @ bci:5 (line 11840) CheckProp::main @ bci:206 (line 54)
Current type:
top
Optimized type:
int:0
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/workspace/open/src/hotspot/share/opto/phaseX.cpp:1853), pid=167258, tid=167434
#  assert(!failure) failed: PhaseCCP not at fixpoint: analysis result may be unsound.
#
# JRE version: Java(TM) SE Runtime Environment (25.0+12) (fastdebug build 25-ea+12-LTS-1237)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-ea+12-LTS-1237, mixed mode, compressed class ptrs, z gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x15f2e2d]  PhaseCCP::analyze()+0x65d
#

Current CompileTask:
C2:10185  773             CheckProp::main (615 bytes)

Stack: [0x00007facea366000,0x00007facea466000],  sp=0x00007facea461160,  free space=1004k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x15f2e2d]  PhaseCCP::analyze()+0x65d  (phaseX.cpp:1853)
V  [libjvm.so+0xa65974]  Compile::Optimize()+0x754  (compile.cpp:2396)
V  [libjvm.so+0xa69c5f]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1b9f  (compile.cpp:848)
V  [libjvm.so+0x8b4da5]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1d5  (c2compiler.cpp:141)
V  [libjvm.so+0xa76528]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x928  (compileBroker.cpp:2331)
V  [libjvm.so+0xa77268]  CompileBroker::compiler_thread_loop()+0x528  (compileBroker.cpp:1975)
V  [libjvm.so+0xf417de]  JavaThread::thread_main_inner()+0xee  (javaThread.cpp:776)
V  [libjvm.so+0x18962d6]  Thread::call_run()+0xb6  (thread.cpp:231)
V  [libjvm.so+0x156e458]  thread_native_entry(Thread*)+0x128  (os_linux.cpp:877)

This is a regression from JDK-8346664 in JDK 25 b11.
Comments
Changeset: 4954a336 Branch: master Author: Liam Miller-Cushon <cushon@openjdk.org> Date: 2025-04-09 20:20:15 +0000 URL: https://git.openjdk.org/jdk/commit/4954a336f88865a4c9b269ed2c152658275e9221
09-04-2025

Good point, I assigned it to [~cushon] who created the PR on behalf of Matthias Ernst.
03-04-2025

The review is still ongoing due to some intermittent issue detected in our testing. It's about to be fixed and then we can move forward.
02-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23871 Date: 2025-03-03 18:45:52 +0000
03-03-2025

Additional tests: - java/lang/CharSequence/Comparison.java - java/lang/Character/CheckProp.java - java/lang/Character/UnicodeCasingTest.java Many crashes are not producing hs_err files so you have to dig into the core reports to see where the failure occurred.
26-02-2025

We have 21 test failures now linked to this.
26-02-2025

I asked the author of JDK-8346664 to look into this.
24-02-2025

This usually means that a Node that is now optimized by ::Value was not added back to the CCP worklist, although it should (see similar issues like JDK-8333366). ILW = Assertion failure during CCP due to not reaching a fixpoint, intermittent with single test, possibly disable compilation of affected method = HLM = P3
24-02-2025