RFR: JDK-8305414: gtest/NMTGtests.java is failing various sub-tests [v6]

Andrew Dinn adinn at openjdk.org
Thu Apr 13 07:33:41 UTC 2023


On Thu, 13 Apr 2023 05:53:36 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> With [JDK-8304815](https://bugs.openjdk.org/browse/JDK-8304815) we started to use NMT - if enabled - for better hs-err reporting by asking it to make sense out of otherwise unknown memory locations.
>> 
>> If the location points into or nearby a C-heap block, we now see that. That even works for dead blocks (use after free). For details, see JDK-8304815 and the comments in mallocTracker.cpp.
>> 
>> The change came with its own gtest, which promptly started to fail on some platforms. The reason was an error in MallocTracker::print_pointer_information() that caused us to prematurely return from its search-loop if we encounter unmapped memory. Never happened in my tests, but of course depends on where libc places the test blocks, which makes this error intermittent.
>> 
>> Patch fixes that, and also fixes some debug output in the test.
>> 
>> Tests: Ran the test manually on Linux aarch64; was able to reproduce the errors without patch, no errors with patch.
>
> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update comment

Looks good to me to.

-------------

Marked as reviewed by adinn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13296#pullrequestreview-1382807534


More information about the hotspot-runtime-dev mailing list