RFR: 8359959: Test runtime/NMT/VirtualAllocTestType.java failed: '\\[0x[0]*7f7dc4043000 - 0x[0]*7f7dc4083000\\] reserved 256KB for Test' missing from stdout/stderr
David Holmes
dholmes at openjdk.org
Thu Jun 19 12:31:44 UTC 2025
On Thu, 19 Jun 2025 09:14:14 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
> The test expects that two disjunct regions are reserved but checked it incompletely.
> It is fixed by reserving a region with triple required size and then released the middle part.
>
> Since it (reserving two regions that become adjacent) is not happening always, the test failed occasionally at different tiers.
>
> Tested local linux-x64-debug.
test/hotspot/jtreg/runtime/NMT/VirtualAllocTestType.java line 65:
> 63:
> 64: // If the second mapping happens to be adjacent to the first mapping, reserve another mapping and release the second mapping; for
> 65: // this test, we want to see two disjunct mappings.
The comment no longer seems quite accurate.
test/hotspot/jtreg/runtime/NMT/VirtualAllocTestType.java line 66:
> 64: // If the second mapping happens to be adjacent to the first mapping, reserve another mapping and release the second mapping; for
> 65: // this test, we want to see two disjunct mappings.
> 66: if ((addr2 == addr1 + reserveSize) || (addr2 + reserveSize == addr1)) {
Suggestion:
if ((addr2 == addr1 + reserveSize) || (addr2 == addr1 - reserveSize)) {
I find this formulation somewhat clearer in indicating `addr2` is adjacent after, or adjacent before `addr1`.
test/hotspot/jtreg/runtime/NMT/VirtualAllocTestType.java line 72:
> 70:
> 71: wb.NMTReleaseMemory(addr1, reserveSize);
> 72: wb.NMTReleaseMemory(addr2, reserveSize);
Just to be clear we are only releasing the original mappings to keep things consistent? And we could do this before reserving the new three region mapping - right?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25894#discussion_r2156896654
PR Review Comment: https://git.openjdk.org/jdk/pull/25894#discussion_r2156894465
PR Review Comment: https://git.openjdk.org/jdk/pull/25894#discussion_r2156901328
More information about the hotspot-runtime-dev
mailing list