RFR: 8340631: assert(reserved_rgn->contain_region(base_addr, size)) failed: Reserved CDS region should contain this mapping region [v12]
Ioi Lam
iklam at openjdk.org
Thu Jan 9 16:03:43 UTC 2025
On Thu, 9 Jan 2025 15:17:53 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> What testing with `UseCompressedClassPointers` set to false, this assert is hit due to memory being released twice during the failure path of CDS archive mapping. This patch makes it so the RW and RO regions are only released once at the end in `MetaspaceShared::release_reserved_spaces()`.
>>
>> This patch hides `unmap_region` as the method should not be called on regions that were reserved. Instead, the region is skipped and we verify that it is indeed in the reserved space. Verified` with tier 1-4 tests.
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
>
> Removed comment
src/hotspot/share/cds/filemap.cpp line 1895:
> 1893: assert(requested_addr != nullptr, "must be specified");
> 1894:
> 1895: r->set_mapped_from_file(false);
Need to add `r->set_in_reserved_space(false);` here, as the `r` can be used twice (first map at requested location; if that fails, map at random location).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22743#discussion_r1909080485
More information about the hotspot-runtime-dev
mailing list