Integrated: 8286737: Test vmTestbase/gc/gctests/WeakReference/weak006/weak006.java fails: Last soft reference has not been cleared
Leonid Mesnik
lmesnik at openjdk.java.net
Thu May 26 22:40:34 UTC 2022
On Sun, 22 May 2022 22:14:45 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
> The problem is that PSScavenge::invoke() (young gen GC) never tries to clear soft references.
>
> The fix is to update the clear_all_soft_refs to be the same as in full GC if scavenge is run as a part of full GC. Test passed before https://bugs.openjdk.java.net/browse/JDK-8285951 Replace Algorithms.eatMemory(...) with WB.fullGC() in vmTestbase_vm_gc_ref tests because the eatMemory causes a lot of full GC and all references were propagated into old gen.
>
> The failed mem allocation also runs full GC with clear_all_soft_refs = true before throwing OOME so it should be also ok.
This pull request has now been integrated.
Changeset: 6a33974a
Author: Leonid Mesnik <lmesnik at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/6a33974a6b8a629744c6d76c3b4fa1f772e52ac8
Stats: 48 lines in 2 files changed: 14 ins; 27 del; 7 mod
8286737: Test vmTestbase/gc/gctests/WeakReference/weak006/weak006.java fails: Last soft reference has not been cleared
Reviewed-by: ayang
-------------
PR: https://git.openjdk.java.net/jdk/pull/8829
More information about the hotspot-gc-dev
mailing list