RFR: 8286737: Test vmTestbase/gc/gctests/WeakReference/weak006/weak006.java fails: Last soft reference has not been cleared [v2]

Albert Mingkun Yang ayang at openjdk.java.net
Thu May 26 22:31:45 UTC 2022


On Tue, 24 May 2022 22:49:52 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.
>
> Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix

Thank you for the revision.

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

Marked as reviewed by ayang (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8829



More information about the hotspot-gc-dev mailing list