RFR: 8364741: [asan] runtime/ErrorHandling/PrintVMInfoAtExitTest.java fails because output differs slightly
Afshin Zafari
azafari at openjdk.org
Fri Oct 31 12:59:03 UTC 2025
On Fri, 31 Oct 2025 09:28:58 GMT, Paul Hübner <phubner at openjdk.org> wrote:
>> When running the test runtime/ErrorHandling/PrintVMInfoAtExitTest.java with asan enabled binaries on Linux x86_64, we fail with this error :
>> `
>> java.lang.RuntimeException: 'Java Heap (reserved=65536KB, committed=65536KB)' missing from stdout/stderr`
>>
>> instead we see in the log e.g. :
>> `Java Heap (reserved=67584KB, committed=65536KB)`
>>
>> so it looks like adding asan to the build changes those memory values a bit.
>> We should disable this test when using asan enabled binaries .
>
> test/hotspot/jtreg/runtime/ErrorHandling/PrintVMInfoAtExitTest.java line 32:
>
>> 30: * @modules java.base/jdk.internal.misc
>> 31: * @requires vm.flagless
>> 32: * @requires !vm.asan
>
> Instead of disabling the test entirely, could we check for `Java Heap` or (`Java Heap` and `committed=65536KB`)? I'm not too fussed either way, but this seems like a useful sanity test to have so maybe we could just refactor it a bit. @afshin-zafari does asan ever impact the `committed` memory in NMT?
The unexpected value is for `reserved` and not `committed`. But any way, ASAN should/could not impact internal NMT memory regions, at least directly.
The question here is why there is extra 2048K bytes in reserved memory, comparing with non-asan build?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28055#discussion_r2481326324
More information about the hotspot-runtime-dev
mailing list