RFR(S): 8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize

Calvin Cheung calvin.cheung at oracle.com
Wed Oct 22 01:45:11 UTC 2014


On 10/21/2014 4:00 PM, Jiangli Zhou wrote:
> Hi Calvin,
>
> Looks good.
Thanks.
> Could you please add comments for the size check in metaspace.cpp 
> explaining the minimum misc code size estimate is based on 
> MetaspaceShared::generate_vtable_methods().

I'll add the following comment. Let me know if you want to see another 
webrev.

               // the min_misc_code_size estimate is based on 
MetaspaceShared::generate_vtable_methods()
3160     uintx min_misc_code_size = align_size_up(

Calvin

>
> Thanks,
> Jiangli
>
> On 10/21/2014 03:42 PM, Calvin Cheung wrote:
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8038268
>>
>> The fix is to estimate the minimum required size for the misc code 
>> region based on the instructions in the x64 version of 
>> MetaspaceShared::generate_vtable_methods(). If the user's specified 
>> misc code size is less than the minimum required size, the vm will 
>> issue an error message instead of crashing.
>>
>> With the fix, the error message will be:
>> ./bin/java -XX:+UnlockDiagnosticVMOptions 
>> -XX:SharedArchiveFile=./test.jsa -XX:SharedMiscCodeSize=32k -Xshare:dump
>> Java HotSpot(TM) 64-Bit Server VM warning:
>> The shared miscellaneous code space is not large enough
>> to preload requested classes. Use -XX:SharedMiscCodeSize=
>> to increase the initial size of shared miscellaneous code space.
>>
>> webrev: http://cr.openjdk.java.net/~ccheung/8038268/jdk9/webrev/
>>
>> Test:
>>     JPRT
>>     jtreg on the affected test on linux_x64 and windows_x64.
>>
>> thanks,
>> Calvin
>



More information about the hotspot-runtime-dev mailing list