Integrated: 8317689: [JVMCI] include error message when CreateJavaVM in libgraal fails
Doug Simon
dnsimon at openjdk.org
Tue Oct 24 13:34:53 UTC 2023
On Fri, 6 Oct 2023 22:25:48 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
> Creating a new libgraal isolate can fail for a number of reasons. Currently, all that one sees on such a failure is a numeric error code. For example:
>
>
> 2096 20291 4 java.lang.CharacterData::of (136 bytes)
> 2096 20291 4 java.lang.CharacterData::of (136 bytes) COMPILE SKIPPED: Error attaching to libjvmci (err: -1000000024)
>
>
> Native Image has been [enhanced](https://github.com/oracle/graal/blob/14ca57efd35941a3b60c6224285ad8153f77059c/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jni/functions/JNIInvocationInterface.java#L209-L214) to return an error message along with an error code by a non-standard `_createvm_errorstr` argument passed to the `CreateJavaVM` JNI invocation interface function:
>
>
> |--------------------|-----------------------------------------------------------------------------------|
> | _createvm_errorstr | extraInfo is a "const char**" value. |
> | | If CreateJavaVM returns non-zero, then extraInfo is assigned a newly malloc'ed |
> | | 0-terminated C string describing the error if a description is available, |
> | | otherwise extraInfo is set to null. |
> |--------------------|-----------------------------------------------------------------------------------|
>
>
> This PR updates JVMCI to take advantage of this Native Image enhancement.
>
> This is sample `-XX:+PrintCompilation` output from testing this PR on libgraal:
>
> 2096 20291 4 java.lang.CharacterData::of (136 bytes)
> 2096 20291 4 java.lang.CharacterData::of (136 bytes) COMPILE SKIPPED: Error attaching to libjvmci (err: -1000000024, Image page size is incompatible with run-time page size. Rebuild image with -H:PageSize=[pagesize] to set appropriately.)
This pull request has now been integrated.
Changeset: 8879c78d
Author: Doug Simon <dnsimon at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/8879c78d62e3c1f325def56d131f62c479bfdaa9
Stats: 33 lines in 6 files changed: 20 ins; 0 del; 13 mod
8317689: [JVMCI] include error message when CreateJavaVM in libgraal fails
Reviewed-by: phofer, thartmann, never
-------------
PR: https://git.openjdk.org/jdk/pull/16086
More information about the graal-dev
mailing list