Review request (XS): JDK-8009282: Assertion "assert(used_and_free == capacity_bytes) failed: Accounting is wrong" failed with -XX:+Verbose -XX:+TraceMetadataChunkAllocation

Mikael Gerdin mikael.gerdin at oracle.com
Tue Mar 12 09:42:20 UTC 2013


Tao

On 2013-03-12 01:54, Tao Mao wrote:
> Looks good to me, too. As safety check, did you test the change clear on
> any machine you previously were able to reproduce the bug?

Yes I did.
I also did a JPRT stree run.

I've put this in the jprt queue now.

Thanks for the reviews Stefan, Jon and Tao.
/Mikael

> Tao
>
> On 3/11/2013 11:35 AM, Jon Masamitsu wrote:
>> Looks good.
>>
>> Jon
>>
>> On 03/11/13 06:12, Mikael Gerdin wrote:
>>> Hi,
>>>
>>> Please review this small fix for an incorrect assert that can trigger
>>> when we run out of metaspace memory.
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~mgerdin/8009282/webrev.0/
>>>
>>>
>>> The reasoning behind this change is that when running with the
>>> command line flags specified in the bug report we call
>>> MetaspaceAux::print_on when we're about to throw an
>>> j.l.OutOfMemoryError. At that point another thread may be successful
>>> in allocating metaspace memory in another class loader or smaller
>>> memory chunks which are available.
>>>
>>> The assert condition must only hold when the VM is at a safe point
>>> and no other thread may be allocating metaspace memory.
>>>
>>> Thanks
>>> /Mikael
>



More information about the hotspot-gc-dev mailing list