RFR: 8298377: JfrVframeStream causes deadlocks in ZGC [v3]

Stefan Karlsson stefank at openjdk.org
Thu Jan 19 13:54:05 UTC 2023


> The JfrVFrameStream is used while generating stack traces for events. One of the events are the ZPage allocation event. This event is sometimes sent when ZGC is relocating. The current implementation of JfrVFrameStream uses WalkContinuation::include, which causes JFR to walk the continuation and perform GC barriers. This is problematic, since ZGC has a requirement that we never perform load barriers while running the relocation code. If we do, we might end up performing other reloctions from the the relocation code, and in some cases that causes dead locks.
> 
> I propose that JFR doesn't walk the continuations when sending events. An alternative could be to limit this to ZGC, but I'd like to get some feedback around that from JFR / Loom devs.
> 
> We've been testing this patch in the Generational ZGC repository.

Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:

  Review comment from Markus

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11586/files
  - new: https://git.openjdk.org/jdk/pull/11586/files/9fe191e2..b6b504e3

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11586&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11586&range=01-02

  Stats: 15 lines in 1 file changed: 10 ins; 5 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/11586.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11586/head:pull/11586

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


More information about the hotspot-jfr-dev mailing list