JDK-8369991 : Thread blocking during JFR emergency dump must be in safepoint safe state
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 26
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-10-16
  • Updated: 2025-10-31
  • Resolved: 2025-10-22
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 b21Fixed
Related Reports
Causes :  
Relates :  
Description
JDK-8369255 introduced a blocking state to wait for a JFR emergency dump to complete. If it's a Java thread, it cannot wait unless it's in a safepoint safe state (i.e., _thread_blocked or _thread_in_native), else pending VM operations will stall indefinitely.
Comments
Hi Markus [~mgronlun], the issues we see on the ppc64(le) platforms for a while in the failing test jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java for some weeks are unfortunately still there. We get there (at least in the test part with -XX:+CrashOnOutOfMemoryError) the error message java.io.IOException: Not a valid Flight Recorder file. File length is only 0 bytes. Looks like the JFR JfrEmergencyDump::on_vm_error and write_emergency_dump_file is not executed on ppc64 in the crash case, and that's why we end up with a 0-byte file. In the hserr file we see the info that the jfr file will be written (but shortly afterwards in the log an error in another thread) # JFR recording file will be written. Location: /jtregbasejdk/workdir/scratch/0/hs_err_pid2730036.jfr ... [thread 2730068 also had an error] <----- "JFR Periodic Tasks" ------ Timeout during error reporting after 120 s. ------ # [ timer expired, abort... ] I created https://bugs.openjdk.org/browse/JDK-8371014 .
31-10-2025

Changeset: afba6368 Branch: master Author: Markus Grönlund <mgronlun@openjdk.org> Date: 2025-10-22 17:39:41 +0000 URL: https://git.openjdk.org/jdk/commit/afba636869bc297d0c9c29fbe7f2a1eb5929218b
22-10-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/27862 Date: 2025-10-17 09:06:09 +0000
17-10-2025