RFR (S) 8026822: metaspace/flags/maxMetaspaceSize throws OOM of unexpected type ava.lang.OutOfMemoryError: Compressed class space

harold seigel harold.seigel at oracle.com
Fri Oct 25 05:12:44 PDT 2013


Thanks Stefan,

I changed the function to return the size in words.

Harold

On 10/25/2013 3:37 AM, Stefan Karlsson wrote:
> Hi Harold,
>
> On 2013-10-25 02:09, harold seigel wrote:
>> Hi,
>>
>> Please review this updated webrev containing the suggested changes: 
>> http://cr.openjdk.java.net/~hseigel/bug_8026822_1/ 
>> <http://cr.openjdk.java.net/%7Ehseigel/bug_8026822_1/>
>
> *+ size_t Metaspace::class_chunk_size(size_t word_size) {*
> *+   assert(using_class_space(), "Has to use class space");*
> *+   return class_vsm()->calc_chunk_size(word_size) * BytesPerWord;*
> *+ }*
>
> This new function takes a paramater in words and returns a value in 
> bytes. We've had numerous of bugs in the metaspace code because of 
> words vs bytes mixing. Could you change the function to use the same 
> type for the input parameter and return value?
>
> thanks,
> StefanK
>
>>
>> Thanks! Harold
>>
>> On 10/24/2013 2:47 PM, harold seigel wrote:
>>> I checked with Coleen.  She likes the change from "Metadata space" 
>>> to "Metaspace".
>>>
>>> I'll also change it in universe.cpp.
>>>
>>> Thanks, Harold
>>>
>>> On 10/24/2013 2:45 PM, Stefan Karlsson wrote:
>>>> On 10/24/13 8:39 PM, harold seigel wrote:
>>>>> Hi Stefan,
>>>>>
>>>>> Thanks for the review.  I'll make the changes that you suggest, 
>>>>
>>>> Thanks.
>>>>
>>>>> including replacing "Metadata space" with "Metaspace".
>>>>
>>>> Could you wait and see if Coleen is fine with the name change?
>>>>
>>>> If you do go ahead and change the name, don't forget to change this 
>>>> string as well:
>>>> src/share/vm/memory/universe.cpp:    msg = 
>>>> java_lang_String::create_from_str("Metadata space", CHECK_false);
>>>>
>>>> thanks!
>>>> StefanK
>>>>
>>>>>
>>>>> Harold
>>>>>
>>>>> On 10/24/2013 2:22 PM, Stefan Karlsson wrote:
>>>>>> On 10/24/13 7:02 PM, harold seigel wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Please review this fix for bug 8026822.  The fix incorporates 
>>>>>>> the requested chunk size when determining whether the 
>>>>>>> OutOfMemoryError was caused by running out of Metaspace or 
>>>>>>> Compressed class space.
>>>>>>>
>>>>>>> Open webrev at: http://cr.openjdk.java.net/~hseigel/bug_8026822/ 
>>>>>>> <http://cr.openjdk.java.net/%7Ehseigel/bug_8026822/>
>>>>>> 1) I think you want to use loader_data->metaspace_not_null() and 
>>>>>> get rid of the NULL check, just like the caller of 
>>>>>> report_metadata_oome does.
>>>>>> 3328     Metaspace* metaspace = loader_data->metaspace_or_null();
>>>>>> 3329     if (metaspace != NULL) {
>>>>>>
>>>>>> 2) There are some extreme corner cases where this might report 
>>>>>> the incorrect OOME string, but I guess we'll live with those for now.
>>>>>>
>>>>>> 3) Since we now report "Metadata space" when we hit the 
>>>>>> MaxMetaspaceSize or fail to commit memory, regardless of Metadata 
>>>>>> type, would it be better to change the string "Metadata space" to 
>>>>>> the more generic (and actually more used) "Metaspace"?
>>>>>>
>>>>>> thanks,
>>>>>> StefanK
>>>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8026822
>>>>>>>
>>>>>>> The fix was tested with UTE vm.metaspace, vm.mlvm, vm.quick, and 
>>>>>>> jtreg tests on Linux and vm.metaspace tests on Solaris.
>>>>>>>
>>>>>>> Thanks! Harold
>>>>>>
>>>>>
>>>>
>>>
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20131025/84202f94/attachment-0001.html 


More information about the hotspot-runtime-dev mailing list