RFR: 8318109: Writing JFR records while a CHT has taken its lock asserts in rank checking

Thomas Schatzl tschatzl at openjdk.org
Thu Oct 19 07:59:29 UTC 2023


Hi all,

  please review this change to fix a lock rank issue after [JDK-8317440](https://bugs.openjdk.org/browse/JDK-8317440). The `JfrStacktrace_lock` rank needs to be adjusted because it may be used when gathering CHT statistics in generational ZGC (afaiu this operation may trigger a relocation which may trigger page allocation which may trigger a JFR event which may trigger JFR trace writing).

The `JfrStacktrace_lock` code seems to be a lock only guarding I/O too, so moving it to the lowest rank seems safe after code inspection, but also tier1-7 testing and around 100 runs of the failed application did not make it fail (reproduction is like 2/100 runs without this change).

Testing: tier1-7, ~100 runs of the failing application with no error

Hth,
  Thomas

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

Commit messages:
 - change jfrstacktrace_lock rank

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

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


More information about the hotspot-jfr-dev mailing list