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

Leonid Mesnik lmesnik at openjdk.java.net
Tue May 24 22:49:52 UTC 2022


> 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

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8829/files
  - new: https://git.openjdk.java.net/jdk/pull/8829/files/13ede35b..83bebc43

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8829&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8829&range=00-01

  Stats: 12 lines in 4 files changed: 3 ins; 3 del; 6 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8829.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8829/head:pull/8829

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



More information about the hotspot-gc-dev mailing list