RFR (S): 8025228: assert(new_entry->reserved_words() == vs_word_size) fails in nightly
Bengt Rutisson
bengt.rutisson at oracle.com
Wed Sep 25 12:31:29 UTC 2013
Thanks for the review, Jon!
Bengt
On 9/25/13 9:09 AM, Jon Masamitsu wrote:
> Change looks good. Thanks for the fix.
>
> Jon
>
>
> On 9/24/2013 4:32 AM, Bengt Rutisson wrote:
>>
>> Hi everyone,
>>
>> Could I have a couple of reviews for this change?
>>
>> http://cr.openjdk.java.net/~brutisso/8025228/webrev.00/
>>
>> https://bugs.openjdk.java.net/browse/JDK-8025228
>>
>> We hit this assert in VirtualSpaceList::get_new_chunk() when we have
>> an allocation that is larger than VirtualSpaceSize and that is not
>> aligned with vm_allocation_granularity. The reason is that the
>> VirtualSpace will grow with sizes aligned to
>> vm_allocation_granularity but we we only guarantee that the sizes we
>> want to grow with are page aligned. This means that we only hit this
>> assert on platforms (Windows) where vm_allocation_granularity >
>> vm_page_size.
>>
>> Since VirtualSpaceSize is vm_allocation_granularity aligned on all
>> platforms we only hit the assert for allocations larger than that
>> size due to this line:
>>
>> 1224 size_t grow_vs_words =
>> 1225 MAX2((size_t)VirtualSpaceSize,
>> aligned_expand_vs_by_words);
>>
>> The fix is to make sure that the grow_vs_words value is
>> vm_allocation_granularity aligned and not just page size aligned.
>>
>>
>> Testing:
>>
>> Added a unit test that fails this way on Windows before my fix:
>>
>> Running internal VM tests
>> Running test: TestReservedSpace_test()
>> Running test: TestReserveMemorySpecial_test()
>> Running test: TestVirtualSpace_test()
>> Running test: MetaspaceAux_test()
>> # To suppress the following error report, specify this argument
>> # after -XX: or in .hotspotrc: SuppressErrorAt=\metaspace.cpp:1145
>> #
>> # A fatal error has been detected by the Java Runtime Environment:
>> #
>> # Internal Error (...src\share\vm\memory\metaspace.cpp:1145),
>> pid=220, tid=3352
>> # assert(vs_byte_size % os::vm_allocation_granularity() == 0)
>> failed: Not aligned
>>
>> After my fix the test passes on all platforms.
>>
>> Ran the UTE test list vm.quick-pcl.testlist. All test pass.
>>
>> Thanks,
>> Bengt
>>
>>
>
More information about the hotspot-gc-dev
mailing list