[9] RFR (XS): 8151623: Zap freed Metaspace chunks in non-product binaries

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Wed Mar 23 11:47:53 UTC 2016


Stefan, Jon, thanks again!

Best regards,
Vladimir Ivanov

On 3/22/16 8:37 PM, Jon Masamitsu wrote:
>
>
> On 3/21/2016 8:03 AM, Vladimir Ivanov wrote:
>> Stefan, Jon, thanks for the reviews!
>>
>> Last question: what do you think about moving the constant declaration
>> to globalDefinitions.hpp?
>
> I like that.
>
> Jon
>
>>
>> http://cr.openjdk.java.net/~vlivanov/8151623/webrev.04
>>
>> Best regards,
>> Vladimir Ivanov
>>
>>
>> On 3/15/16 11:51 AM, Stefan Karlsson wrote:
>>> Hi Vladimir,
>>>
>>> On 14/03/16 19:48, Vladimir Ivanov wrote:
>>>> Jon,
>>>>
>>>> Updated version:
>>>> http://cr.openjdk.java.net/~vlivanov/8151623/webrev.03/
>>>
>>> There's a type mismatch here:
>>>
>>> 149 static const size_t metadata_chunk_initialize = 0xf7f7f7f7;
>>> 150
>>> 151 void mangle(juint word_value = metadata_chunk_initialize);
>>> Otherwise, this looks good.
>>>
>>> Thanks,
>>> StefanK
>>>
>>>>
>>>>> 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
>>>> mangled.
>>>>
>>>> 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
>>>> mangling?
>
>


More information about the hotspot-dev mailing list