RFR: 8255917: runtime/cds/SharedBaseAddress.java failed "assert(reserved_rgn != 0LL) failed: No reserved region"
Yumin Qi
minqi at openjdk.java.net
Fri Dec 11 20:11:09 UTC 2020
Hi, Please review
(This is redo for https://github.com/openjdk/jdk/pull/1657)
Windows mapping for file into memory could not happen to reserved memory. In mapping CDS archive we first reserve enough memory then before mapping, release them. For cds archive and using class space, need split the whole space into two spaces. To do so, we need release the whole first then do the reserve again on the split, which is problematic that there is possibility other thread or system can kick in to take the released space.
The fix is the first step of two steps:
1) Do not split reserved memory;
2) Remove splitting memory.
This fix is first step, for Windows and use requested mapping address, reserved for cds archive and ccs on a contiguous space separately, so there is no need to call split. If any reservation failed, go to other way, but do not do the 'real' split for the whole reserved space, keep the whole region reserved and released as a whole.
Also fixed issues that when loading shared archive failed, bitmap region should be unmapped or it will cause mismatch in reserved/committed size calculation for NMT.
Fixed reserved region name for adding committed region for NMT, it should use the reserved region name not "Unknown" the default.
A test case added for testing the failed case which is caused by mismatch of class path.
Tests:tier1-5,tier7
-------------
Commit messages:
- 8255917: runtime/cds/SharedBaseAddress.java failed "assert(reserved_rgn != 0LL) failed: No reserved region"
Changes: https://git.openjdk.java.net/jdk/pull/1750/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1750&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8255917
Stats: 190 lines in 8 files changed: 143 ins; 10 del; 37 mod
Patch: https://git.openjdk.java.net/jdk/pull/1750.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1750/head:pull/1750
PR: https://git.openjdk.java.net/jdk/pull/1750
More information about the hotspot-dev
mailing list