Integrated: 8289838: ZGC: OOM before clearing all SoftReferences

Erik Österlund eosterlund at openjdk.org
Wed Nov 2 16:39:40 UTC 2022


On Tue, 11 Oct 2022 09:48:39 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

> should_clear_soft_references() in mainline ZGC is based purely on the cause of the GC, but the GC cause being used to catch that we need to clear soft references is asynchronous. Another GC could start an instant before it is requested, such as a metadata threshold GC for example. Then the metadata threshold GC will be used instead. 
> 
> Even if the other async GC that was requested is also of the kind that requires soft references to be cleared, such as a concurrently requested _z_allocation_stall GC, it is possible that the async GC request is performed after a soft reference was created, after a concurrent thread requests a _z_allocation_stall GC, but before that GC has reached mark_start, implying that the sequence number will look like it already got to run an entire GC before throwing, while in fact it did not.

This pull request has now been integrated.

Changeset: 491d43c1
Author:    Erik Österlund <eosterlund at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/491d43c1876fcb55d090e36a46ff0c02d3a2b3eb
Stats:     8 lines in 1 file changed: 8 ins; 0 del; 0 mod

8289838: ZGC: OOM before clearing all SoftReferences

Reviewed-by: ayang, tschatzl

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

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


More information about the hotspot-gc-dev mailing list