RFR: 8205022: ZGC: SoftReferences not always cleared before throwing OOME
Stefan Karlsson
stefan.karlsson at oracle.com
Thu Jun 14 12:13:07 UTC 2018
Looks good.
StefanK
On 2018-06-14 11:42, Per Liden wrote:
> The spec says "All soft references to softly-reachable objects are
> guaranteed to have been cleared before the virtual machine throws an
> OutOfMemoryError".
>
> We currently have a window/race in ZGC, where we can throw OOME before
> clearing all SoftReferences with a softly-reachable referent. The reason
> is that the current logic only guarantees that we wait with throwing
> OOME until the allocating thread have been part of a complete GC cycle,
> but there is no guarantee that the last GC cycle also cleared
> SoftReferences.
>
> This race is causing rare/intermittent failures in tier2 testing
> (TestSoftRerencesBahviorOnOOME).
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8205022
> Webrev: http://cr.openjdk.java.net/~pliden/8205022/webrev.0/
>
> Testing: tier{1,2,3,4}
>
> /Per
More information about the hotspot-gc-dev
mailing list