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

Hamlin Li mli at openjdk.org
Sat Oct 21 12:10:25 UTC 2023


On Wed, 18 Oct 2023 10:28:46 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> 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

LGTM.

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

Marked as reviewed by mli (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16242#pullrequestreview-1691247115


More information about the hotspot-jfr-dev mailing list