JDK-8365726 : Test crashed with assert in C1 thread: Possible safepoint reached by thread that does not allow it
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25,26
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-08-19
  • Updated: 2025-08-28
  • Resolved: 2025-08-28
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 :  
Causes :  
Duplicate :  
Description
Test runtime/cds/appcds/aotFlags/AOTFlags.java

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/f7f8bd65-a387-4a2b-b519-702f2fefaf87-S221155/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/96be4d90-0e81-4546-959b-43fdf1ef6651/runs/66304149-ef31-41a4-867a-e0d78d935ed8/workspace/open/src/hotspot/share/runtime/javaThread.cpp:374), pid=3652662, tid=3652685
#  assert(false) failed: Possible safepoint reached by thread that does not allow it
#
# JRE version: Java(TM) SE Runtime Environment (26.0+12) (fastdebug build 26-ea+12-1211)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-ea+12-1211, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0xe96dd8]  JavaThread::check_possible_safepoint() [clone .part.0]+0x30
#
# 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/f7f8bd65-a387-4a2b-b519-702f2fefaf87-S221155/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/750d5a37-84ca-4ae4-a91c-2d24375c5ec7/runs/6df74261-5521-41be-a8ec-eb7b321b34cd/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/scratch/4/core.3652662)
#
# 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: -XX:AOTMode=record -XX:+PrintTieredEvents -XX:AOTConfiguration=hello.aotconfig Hello

Host: AArch64, 16 cores, 31G, Oracle Linux Server release 8.10
Time: Tue Aug 19 00:19:45 2025 UTC elapsed time: 0.840273 seconds (0d 0h 0m 0s)

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

Current thread (0x0000fffe6812b710):  JavaThread "C1 CompilerThread3" daemon [_thread_in_vm, id=3652685, stack(0x0000ffff5460e000,0x0000ffff5480c000) (2040K)]

Stack: [0x0000ffff5460e000,0x0000ffff5480c000],  sp=0x0000ffff5480a270,  free space=2032k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xe96dd8]  JavaThread::check_possible_safepoint() [clone .part.0]+0x30  (javaThread.cpp:374)
V  [libjvm.so+0xe98b08]  JavaThread::check_for_valid_safepoint_state()+0xb8  (javaThread.cpp:374)
V  [libjvm.so+0x14497a4]  Mutex::lock(Thread*)+0x44  (mutex.cpp:119)
V  [libjvm.so+0x18337a8]  MethodTrainingData::make(methodHandle const&, bool, bool)+0x228  (trainingData.hpp:108)
V  [libjvm.so+0x957a44]  CompilationPolicy::print_training_data_on(outputStream*, char const*, Method*)+0xa4  (trainingData.hpp:793)
V  [libjvm.so+0x9580a0]  CompilationPolicy::print_event_on(outputStream*, CompilationPolicy::EventType, Method*, Method*, int, CompLevel)+0x2e0  (compilationPolicy.cpp:539)
V  [libjvm.so+0x958c70]  CompilationPolicy::print_event(CompilationPolicy::EventType, Method*, Method*, int, CompLevel)+0xac  (compilationPolicy.cpp:550)
V  [libjvm.so+0x95b28c]  CompilationPolicy::select_task(CompileQueue*, JavaThread*)+0x121c  (compilationPolicy.cpp:781)
V  [libjvm.so+0x98c438]  CompileQueue::get(CompilerThread*)+0xd8  (compileBroker.cpp:450)
V  [libjvm.so+0x991354]  CompileBroker::compiler_thread_loop()+0x214  (compileBroker.cpp:1944)
V  [libjvm.so+0xe9b708]  JavaThread::thread_main_inner()+0x108  (javaThread.cpp:775)
V  [libjvm.so+0x181028c]  Thread::call_run()+0xac  (thread.cpp:243)
V  [libjvm.so+0x14f28dc]  thread_native_entry(Thread*)+0x12c  (os_linux.cpp:868)
C  [libpthread.so.0+0x7950]  start_thread+0x190
Comments
Changeset: 452b052f Branch: master Author: Igor Veresov <iveresov@openjdk.org> Date: 2025-08-28 15:45:17 +0000 URL: https://git.openjdk.org/jdk/commit/452b052fe343a70bc81bf299d08a9f06a1e30fe9
28-08-2025

JDK-8362530 triggers it from new test case. The code we are fixing is from JDK-8355003 in JDK 25.
28-08-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26964 Date: 2025-08-27 17:04:27 +0000
27-08-2025

ILW = Assert because of potential safepoint in thread that does not allow it, single AOT/CDS test using -XX:+PrintTieredEvents, disable AOT or printing = HLM = P3
20-08-2025

[~iveresov] please look.
19-08-2025