RFR: 8280056: gtest/LargePageGtests.java#use-large-pages failed "os.release_one_mapping_multi_commits_vm" [v2]
Thomas Stuefe
stuefe at openjdk.org
Mon Oct 23 11:50:30 UTC 2023
On Mon, 23 Oct 2023 11:36:09 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
> One more question, can we use the `/proc/self/map` (like what is done in PRINT_MAPPINGS in the tests) for checking the success/failure of `release_memory`? In the log outputs of all failed tests that are attached to this issue, the "B" part of the test report shows a successful release operation.
unfortunately not because if a mapping exists it can be either:
- the one we created in the first place, in which case the test failed since os::release_memory() failed to clean out that mapping
- be created by a concurrent thread or be the second mapping, which means the test succeeded.
Looking at it now, I believe the test can be improved in stability if you just mimic what I did in release_multi_mappings.
There, I create an Area A, then release the middle part of it, leaving the outer mappings intact; then I attempt to mmap into this middle part again. This has a much higher chance of success since for a concurrent thread to grab this address space hole, its mapping needs to fit into this hole, and the hole is tiny.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16240#issuecomment-1775019073
More information about the hotspot-runtime-dev
mailing list