JDK-8359378 : aarch64: crash when using -XX:+UseFPUForSpilling
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 24
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • CPU: aarch64
  • Submitted: 2025-06-12
  • Updated: 2025-09-25
  • Resolved: 2025-09-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 26
26 masterFixed
Related Reports
Causes :  
Description
Reproducer:
void main() {
        var map = new ConcurrentHashMap<Object, Object>();
        map.put(1, 0);
}

Compiling that and running it with java -Xcomp -XX:-TieredCompilation -XX:+UseFPUForSpilling Test results in a crash, I appended a hs_err log but you probably won't need it.

I assume that the assertion and the ShouldNotReachHere() at https://github.com/openjdk/jdk/blob/1fcede053cca360c96606c1034b2a365a4fada82/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp are wrong with FPU spilling enabled. 

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (barrierSetAssembler_aarch64.cpp:428), pid=1112888, tid=1112904
#  Error: ShouldNotReachHere()
#
# JRE version: OpenJDK Runtime Environment (25.0+26) (build 25-ea+26-3358)
# Java VM: OpenJDK 64-Bit Server VM (25-ea+26-3358, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0x448094]  BarrierSetAssembler::refine_register(Node const*, int)+0xd4

Current CompileTask:
C2:241  133   !b        java.util.concurrent.ConcurrentHashMap::replaceNode (437 bytes)

Stack: [0x0000ee2d39c04000,0x0000ee2d39e02000],  sp=0x0000ee2d39dfdc60,  free space=2023k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x448094]  BarrierSetAssembler::refine_register(Node const*, int)+0xd4  (barrierSetAssembler_aarch64.cpp:428)
V  [libjvm.so+0x44c778]  BarrierSetC2::compute_liveness_at_stubs() const+0x378
V  [libjvm.so+0x728bdc]  G1BarrierSetC2::late_barrier_analysis() const+0x1c
V  [libjvm.so+0xc8937c]  PhaseOutput::Output()+0x794
V  [libjvm.so+0x5f6328]  Compile::Code_Gen()+0x560
V  [libjvm.so+0x5f8480]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1170
V  [libjvm.so+0x51af44]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x140
V  [libjvm.so+0x5ff990]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x324
V  [libjvm.so+0x600bfc]  CompileBroker::compiler_thread_loop()+0x3fc
V  [libjvm.so+0x8a95a8]  JavaThread::thread_main_inner() [clone .part.0]+0xa4
V  [libjvm.so+0xe2b808]  Thread::call_run()+0xa8
V  [libjvm.so+0xc70488]  thread_native_entry(Thread*)+0xd8
Comments
Changeset: 2b451131 Branch: master Author: Boris Ulasevich <bulasevich@openjdk.org> Date: 2025-09-25 13:35:36 +0000 URL: https://git.openjdk.org/jdk/commit/2b451131a57dc7080c4ccb77d6cb5a96ee24d891
25-09-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/27350 Date: 2025-09-17 16:19:12 +0000
17-09-2025

Roberto, could you please have a look?
16-06-2025

It's a regression from JDK-8334060.
16-06-2025

ILW = Crash during C2 compilation, easy to reproduce on AArch64 with non-default -XX:+UseFPUForSpilling, use different GC or disable compilation of affected method = HLM = P3
16-06-2025

from the hs_err: Stack: [0x0000ee2d39c04000,0x0000ee2d39e02000], sp=0x0000ee2d39dfdc60, free space=2023k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x448094] BarrierSetAssembler::refine_register(Node const*, int)+0xd4 (barrierSetAssembler_aarch64.cpp:428) V [libjvm.so+0x44c778] BarrierSetC2::compute_liveness_at_stubs() const+0x378 V [libjvm.so+0x728bdc] G1BarrierSetC2::late_barrier_analysis() const+0x1c V [libjvm.so+0xc8937c] PhaseOutput::Output()+0x794 V [libjvm.so+0x5f6328] Compile::Code_Gen()+0x560 V [libjvm.so+0x5f8480] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1170 looks related to late barrier expansion, and compilation. Moving to compiler team for evaluation.
13-06-2025