RFR: 8371320: runtime/ErrorHandling/PrintVMInfoAtExitTest.java fails with unexpected amount for Java Heap reserved memory
Paul Hübner
phubner at openjdk.org
Thu Nov 13 09:37:05 UTC 2025
On Thu, 13 Nov 2025 08:08:16 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:
>> Hi all,
>>
>> In [JDK-8364741](https://bugs.openjdk.org/browse/JDK-8364741) it was discovered that asan reserves a bit more heap. The test got patched by checking for asan and adjusting the expectation, respectively.
>>
>> It turns out that, rarely, we do reserve more memory even without asan enabled. This change updates the test:
>> a) to ensure that some sort of reservation size is reported; and
>> b) to extract the reserved amount and assert that it is no less than the committed amount
>>
>> Testing: Ran tier1. Stress tested the individual test with 5x100 repetitions per platform (Linux x64, AArch64; macOS x64, AArch64; Windows x64).
>
> test/hotspot/jtreg/runtime/ErrorHandling/PrintVMInfoAtExitTest.java line 61:
>
>> 59: output_detail.shouldMatch("Java Heap \\(reserved=[0-9]+KB, committed=" + committed_kb + "KB\\)");
>> 60: // Check reserved >= committed.
>> 61: String reserved_kb_string = output_detail.firstMatch("reserved=([0-9]+)KB, committed=" + committed_kb + "KB", 1);
>
> This will likely always match the "Java Heap" line, but should we be more explicit and add "Java Heap" like this?
> Suggestion:
>
> String reserved_kb_string = output_detail.firstMatch("Java Heap \(reserved=([0-9]+)KB, committed=" + committed_kb + "KB\)", 1);
Good shout.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28179#discussion_r2522574951
More information about the hotspot-runtime-dev
mailing list