RFR (S): 8067339: PLAB reallocation might result in failure to allocate object in that recently allocated PLAB

Thomas Schatzl thomas.schatzl at oracle.com
Fri Aug 14 08:29:32 UTC 2015

Hi all,

  can I have reviews for the following small fix: if G1 reallocates a
PLAB for an object of size X, it allocates a new PLAB of size Y. 

PLABs are required to contain enough space for the object plus some
alignment reserve; so if X >= Y - alignment-reserve, G1 failed to
allocate this object it just allocated the PLAB for into that PLAB,
resulting in an evacuation failure although there is actually enough

As far as I know this has been a rare occurrence until now because
current PLAB sizing tended to maximize PLAB sizes, and it is rare to
have such large objects, but with future changes that actually try to
size the PLABs so that the expected waste is kept, I noticed a few cases
of that issue occurring. So this needs to be fixed.

The fix is to consider the required alignment reserve in the PLAB
allocation request.

This is a day one G1 bug.

JPRT, vm.gc testlist, lots of testing.


More information about the hotspot-gc-dev mailing list