If NMT is enabled with gtests (which only can be done with the upcoming JDK-8256844 "Make NMT late-initializable", for which I have a working prototype) we run into new problems with NMT.
One of which is that NMT assumes that we only release regions or parts of regions, but not multiple regions.
Which is perfectly possible, e.g. we can reserve several adjacent regions and release them in one go. Which is done e.g. in the context of NUMA-aware allocation.
To test such a multi-map release, I added a gtest: os_release_multi_mappings_vm. This one runs into an NMT assert with NMT enabled:
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/shared/projects/openjdk/jdk-jdk/source/src/hotspot/share/services/virtualMemoryTracker.cpp:533), pid=264733, tid=264733
# assert(reserved_rgn->contain_region(addr, size)) failed: Not completely contained
which highlights NMTs inability to deal with that.
This surfaces as an assert in a gtest but is of course not limited to gtests.
One of which is that NMT assumes that we only release regions or parts of regions, but not multiple regions.
Which is perfectly possible, e.g. we can reserve several adjacent regions and release them in one go. Which is done e.g. in the context of NUMA-aware allocation.
To test such a multi-map release, I added a gtest: os_release_multi_mappings_vm. This one runs into an NMT assert with NMT enabled:
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/shared/projects/openjdk/jdk-jdk/source/src/hotspot/share/services/virtualMemoryTracker.cpp:533), pid=264733, tid=264733
# assert(reserved_rgn->contain_region(addr, size)) failed: Not completely contained
which highlights NMTs inability to deal with that.
This surfaces as an assert in a gtest but is of course not limited to gtests.
- is blocked by
-
JDK-8308501 Replacement of SortedLinkList in NMT with other more efficient data structures
- Closed
- relates to
-
JDK-8316393 gtest/LargePageGtests.java#use-large-pages-sysV fails os.release_multi_mappings_vm
- Closed
-
JDK-8267341 macos attempt_reserve_memory_at(arg1, arg2, true) failure
- Resolved
-
JDK-8280056 gtest/LargePageGtests.java#use-large-pages failed "os.release_one_mapping_multi_commits_vm"
- Resolved
- links to
-
Review openjdk/jdk/13813