RFR (XS): 8151623: Zap freed Metaspace chunks in non-product binaries
jon.masamitsu at oracle.com
Tue Mar 15 21:46:34 UTC 2016
On 3/14/2016 11:48 AM, Vladimir Ivanov wrote:
> Updated version:
>> If there is a mistake in the mangling of a Metablock, that would
>> show up when the Metaspace shrinks. Can you check that the testing
>> has some Metaspace shrinking. I think that -Xlog:gc*=trace would
>> show the needed output.
> Thanks for the hint! It found one problem with -Xlog:gc*=trace itself:
> BlockFreelist keeps the tree of free blocks inside Metachunks and
> dumps the content from the destructor.
> Mangling breaks it because it happens earlier and destroys the free
> list structure by the time BlockFreelist destructor is called.
> I fixed it by dumping the free list content before Metachunks are
> I ran a stress test on class loading and ensured there's no memory
> leak in Metaspace.
> Best regards,
> Vladimir Ivanov
> PS: maybe add a -Xlog:gc,metaspace,freelist=trace event for metachunk
Hopefully the mangling will be an uninteresting event. I didn't see
trace events in
other mangling code so I'd say wait and see if it is ever missed.
More information about the hotspot-dev