RFR (S): 8025228: assert(new_entry->reserved_words() == vs_word_size) fails in nightly

Bengt Rutisson bengt.rutisson at oracle.com
Tue Sep 24 13:49:37 UTC 2013


Thanks, Mikael.

Bengt

On 9/24/13 1:52 PM, Mikael Gerdin wrote:
> Bengt,
>
> On 09/24/2013 01:32 PM, 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.
>
> Great!
> Ship it!
>
>>
>> Thanks,
>> Bengt
>>
>




More information about the hotspot-gc-dev mailing list