RFR: 8313899: JVMCI exception Translation can fail in TranslatedException.<clinit> [v2]
Doug Simon
dnsimon at openjdk.org
Thu Aug 10 13:56:37 UTC 2023
> In a test that stresses metaspace (such as `vmTestbase/vm/mlvm/hiddenloader/stress/oome/metaspace/Test.java`) that also uses `-Xcomp -XX:-TieredCompilation`, we've seen a failure in `TranslatedException.<clinit>` due to exhausted metaspace:
>
> java.lang.OutOfMemoryError: Metaspace
> at jdk.internal.vm.TranslatedException.encodeThrowable(java.base at 21/TranslatedException.java:176)
> at jdk.internal.vm.TranslatedException.<clinit>(java.base at 21/TranslatedException.java:61)
> at jdk.internal.vm.VMSupport.encodeThrowable(java.base at 21/VMSupport.java:171)
>
> This PR pushes a fix such that this exception is properly handled in the VM (i.e. causing a compilation bailout) instead of leading to a VM crash.
>
> The PR includes 2 bits of debug code guarded by system properties that enable the handling to be tested in libgraal. The test itself is not included as libgraal is not part of OpenJDK.
Doug Simon has updated the pull request incrementally with two additional commits since the last revision:
- guard test-only code with ASSERT instead of !PRODUCT
- omit test-only code in product build
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/15198/files
- new: https://git.openjdk.org/jdk/pull/15198/files/529258a8..f160cb80
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=15198&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=15198&range=00-01
Stats: 17 lines in 4 files changed: 17 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/15198.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15198/head:pull/15198
PR: https://git.openjdk.org/jdk/pull/15198
More information about the hotspot-compiler-dev
mailing list