RFR: 8356228: NMT does not record reserved memory base address correctly
Gerard Ziemski
gziemski at openjdk.org
Thu Jun 12 15:42:34 UTC 2025
On Tue, 10 Jun 2025 11:23:14 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
> The problem here stems from the following facts:
> 1) When requesting an aligned virtual memory, the size may be extended to meet the alignment requirements. The extra size from the two ends are released afterward.
> 2) NMT ignores tracking of releasing CDS regions that are contained in larger regions, because they should be in a specific order.
> 3) In linux-aarch64 environment, the alignment size is 64K, reserve operations may fall into cases as 1) above.
>
> So, if ArchiveBuffer memory is reserved with CDS tag, there might be some released regions that NMT ignored and then later complains their intersection with other regions (e.g., thread stack regions observed in the issue).
>
> Solution is to reserve the memory with no tag (mtNone) and if it succeeds change the tag of the region to CDS for further trackings.
>
> Tests:
> linux-x64: runtime/NMT jtreg tests passed
> linux-aarch64: tier1 to tier3 passed
Do we need to bother with this fix then? Should we wait for the VMATree and just verify?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25719#issuecomment-2967341763
More information about the hotspot-runtime-dev
mailing list