RFR: 8255917: runtime/cds/SharedBaseAddress.java failed "assert(reserved_rgn != 0LL) failed: No reserved region" [v3]

Yumin Qi minqi at openjdk.java.net
Mon Dec 14 20:14:55 UTC 2020


On Mon, 14 Dec 2020 19:56:58 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> @iklam @calvinccheung Thanks for review. I will wait for @tstuefe input for integration.
>
> Hi Yumin, 
> 
> I don't understand the special handling in NMT.
> 
> Unix: We reserve a region, split it, tell NMT about the split (see posix version of os::split_reserved_memory), then later release both parts separately. 
> Windows: 
> 1) use_archive_base_addr = true: we allocate the spaces separately, later release them separately
> 2) use_archive_base_addr = false: we allocate total space, leave it unsplit, then later release the total space.
> 
> Where is this new NMT coding needed? 
> 
> Thanks, Thomas

Hi, Thomas

> I don't understand the special handling in NMT.
> 
> Unix: We reserve a region, split it, tell NMT about the split (see posix version of os::split_reserved_memory), then later release both parts separately.
There is no problem for Linux/Unix here since split does not do the split.
> Windows:
> 
> 1. use_archive_base_addr = true: we allocate the spaces separately, later release them separately
Yes, the two spaces are released separately and NMT will find exact matched regions to remove.
> 2. use_archive_base_addr = false: we allocate total space, leave it unsplit, then later release the total space.
> 
The space reserved as a whole, and we did not do the 'split' on it. The release should be on whole too. When unmapping regions, the released on region in fact did not do anything in nmt since it is within the archive space. Since the new code is release on the whole space (there is no call to release on class_space_rs in this case), so it check if it is > archive_space_rs (with tag of mtClassShared) we know it is for releasing the whole space. The space which is bigger than archive_space_rs with tag of mtClassShared should be only the whole space.

> Where is this new NMT coding needed?
> 
The code is to make the bytes in snapshot correct. That, when all the spaces release, the bytes in the reserved slot should be 'zero'.

Thanks for review.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1750


More information about the hotspot-dev mailing list