Integrated: 8298377: JfrVframeStream causes deadlocks in ZGC

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


On Thu, 8 Dec 2022 11:23:57 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: 453dbd12
Author:    Stefan Karlsson <stefank at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/453dbd12ee42731d7ebfd1a856338099429277c8
Stats:     24 lines in 2 files changed: 23 ins; 0 del; 1 mod

8298377: JfrVframeStream causes deadlocks in ZGC

Co-authored-by: Erik Österlund <eosterlund at openjdk.org>
Reviewed-by: eosterlund, mgronlun

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

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


More information about the hotspot-jfr-dev mailing list