RFR: 8373439: Deadlock between flight recorder & VMDeath

Bara' Hasheesh duke at openjdk.org
Mon Dec 15 10:23:40 UTC 2025


On Mon, 15 Dec 2025 09:40:37 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

> A third alternative is to avoid destroying native JFR at shutdown 

I think for this option it's better to wait on Markus as you mentioned

-------

For the other options, I don't like the first option of `isInShutdown` as some APIs, are designed to run fine after the flag is set, such as the `stop` API

As for the internal checked exception, the exception by it self won't be sufficient, as the recoding also needs to be transformed into a "dummy recording" as from a user perspective the application continued normally so the recording "started", otherwise this recording becomes a deadlock hazard 

Now the aspect of a "dummy recording" is interesting, what do you think about adding a new `RecordingState`  we call it dummy, which we add checks for where is needed within the various APIs

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28767#discussion_r2618813671


More information about the hotspot-jfr-dev mailing list