RFR: 8371014: Dump JFR recording on CrashOnOutOfMemoryError is incorrectly implemented

Markus Grönlund mgronlun at openjdk.org
Fri Jan 9 11:07:17 UTC 2026


On Thu, 8 Jan 2026 21:42:16 GMT, Robert Toyonaga <duke at openjdk.org> wrote:

> Is it better/possible to directly check the rotation lock instead? Maybe it's possible the thread crashed before starting the vm operation, or the lock is held by something else.

Lock testing is inherently racy, and would also include false negatives (i.e., say the rotation lock is currently held during a normal flush / rotation by the JFR Recorder Thread, then its perfectly fine even for the VM Thread to block waiting for it to be released).

It is only the above implication that makes it impossible for the VM Thread to wait on rotation lock release.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29094#discussion_r2675762122


More information about the hotspot-dev mailing list