RFR: 8361451: Test vmTestbase/metaspace/stressHierarchy/stressHierarchy012/TestDescription.java fails with OutOfMemoryError: Metaspace
David Holmes
dholmes at openjdk.org
Tue Oct 21 01:55:00 UTC 2025
On Mon, 20 Oct 2025 20:53:16 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> This adds a catch clause for InvocationTargetException that can happen for OOM while invoking MethodHandles code. Thanks to @iklam for diagnosis and fix.
> Tested with the test 100x.
test/hotspot/jtreg/vmTestbase/metaspace/stressHierarchy/common/PerformChecksHelper.java line 140:
> 138: }
> 139: } catch (InvocationTargetException ite) {
> 140: if (ite.getCause() != null && ite.getCause().getMessage().trim().toLowerCase().contains("Metaspace")) {
Surely this can never be true as you converted to lowercase and are searching for uppercase 'M'. ??
And the `trim()` serves no purpose that I can see when you are using `contains`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27907#discussion_r2446522093
More information about the hotspot-dev
mailing list