RFR: 8368670: Deadlock in JFR on event register + class load

Erik Gahlin egahlin at openjdk.org
Wed Oct 1 19:57:18 UTC 2025


Could I have a review a PR that prevents a deadlock? The MetadataRepository::isEnabled check is an optimization that allows JFR to instrument disabled event classes lazily.

The available settings object is never modified after it has been created, so it is sufficient to publish it using a volatile.


Testing: jdk/jdk/jfr

Thanks
Erik

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

Commit messages:
 - Fix
 - Use volatile
 - Initial

Changes: https://git.openjdk.org/jdk/pull/27592/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27592&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8368670
  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/27592.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27592/head:pull/27592

PR: https://git.openjdk.org/jdk/pull/27592


More information about the hotspot-jfr-dev mailing list