RFR (S): 8025228: assert(new_entry->reserved_words() == vs_word_size) fails in nightly
jon.masamitsu at oracle.com
Wed Sep 25 00:09:16 PDT 2013
Change looks good. Thanks for the fix.
On 9/24/2013 4:32 AM, Bengt Rutisson wrote:
> Hi everyone,
> Could I have a couple of reviews for this change?
> 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,
> The fix is to make sure that the grow_vs_words value is
> vm_allocation_granularity aligned and not just page size aligned.
> 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.
More information about the hotspot-gc-dev