RFR (S) 8016075 - Win32 crash with CDS enabled and small heap size
Ioi Lam
ioi.lam at oracle.com
Thu Jun 27 09:19:53 PDT 2013
Chris,
is it OK for me to send you a patch instead? Currently we are not
calling this function during dump time and I don't want to commit any
code that has not been tested.
Harold,
Thanks for the comment. I will modify it as you said.
- Ioi
On 06/27/2013 09:02 AM, Christian Thalinger wrote:
>
> On Jun 27, 2013, at 6:42 AM, harold seigel <harold.seigel at oracle.com
> <mailto:harold.seigel at oracle.com>> wrote:
>
>> Hi Ioi,
>>
>> The changes look good.
>>
>> You can simplify MetaspaceShared::is_in_shared_space(...) to
>> something like:
>>
>> // Return true if given address is in the mapped shared space.
>> bool MetaspaceShared::is_in_shared_space(const void* p) {
>> return UseSharedSpaces &&
>> FileMapInfo::current_info()->is_in_shared_space(p);
>> }
>>
>
> Would it be possible to change that method to also return a valid
> answer when dumping shared spaces? I'd need this for something else
> I'm working on.
>
> -- Chris
>>
>>
>> Thanks, Harold
>>
>> On 6/27/2013 12:10 AM, Ioi Lam wrote:
>>> |Please review a small fix:|
>>> |||
>>> ||http://cr.openjdk.java.net/~iklam/8016075/cds_is_shared_crash_003/||
>>> ||
>>> ||Bug: Win32 crash with CDS enabled and small heap size||
>>> ||
>>> ||http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8016075||
>>> ||https://jbs.oracle.com/bugs/browse/JDK-8016075||
>>> ||
>>> ||Summary of fix:||
>>> ||
>>> || The function MetaspaceShared::is_in_shared_space() was testing
>>> with||
>>> || incorrect bounds. As a resullt, a dynamically loaded
>>> InstanceKlass||
>>> || was incorrectly identified as an InstanceKlass stored in the CDS||
>>> || archive. This caused the following code to fail:||
>>> ||
>>> || bool InstanceKlass::link_class_impl(...) {||
>>> || ...||
>>> || if (!this_oop()->is_shared()) {||
>>> || ResourceMark rm(THREAD);||
>>> ||this_oop->vtable()->initialize_vtable(true, CHECK_false); //<<
>>> failed to execute||
>>> ||this_oop->itable()->initialize_itable(true, CHECK_false);||
>>> || }||
>>> ||
>>> || Hence, Method::vtable_index() could return an incorrect value
>>> for some||
>>> || Methods, leading to various mysterious crashes.||
>>> ||
>>> || The fix is for MetaspaceShared::is_in_shared_space() to
>>> consider the actual used||
>>> || spaces in the CDS archive regions.||
>>> ||
>>> ||Tests:||
>>> ||
>>> || JPRT||
>>> || UTE (vm.runtime.testlist, vm.quick.testlist,
>>> vm.parallel_class_loading.testlist)||
>>> ||
>>> ||Thanks||
>>> ||- Ioi||
>>> ||
>>> |
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130627/eff6be88/attachment-0001.html
More information about the hotspot-runtime-dev
mailing list