When there is a pending exception after a JVMCI upcall into libjvmci, the VM calls the ExceptionDescribe JNI function to print the exception. Unfortunately, this output goes to "a system error-reporting channel" [1] which may not be tty. It also means the output is not in a hs-err log should the VM then exit with a fatal error. This has historically made it harder to triage libgraal bugs (i.e. the console output is usually required in addition to the hs-err crash log).
These shortcomings can be addressed by printing the exception info to a string which can then be added to the JVMCI event log (for hs-err) and/or sent to TTY. It can also be used to enhance the PrintCompilation message issues for a failed compilation.
[1] https://docs.oracle.com/en/java/javase/17/docs/specs/jni/functions.html#exceptiondescribe
These shortcomings can be addressed by printing the exception info to a string which can then be added to the JVMCI event log (for hs-err) and/or sent to TTY. It can also be used to enhance the PrintCompilation message issues for a failed compilation.
[1] https://docs.oracle.com/en/java/javase/17/docs/specs/jni/functions.html#exceptiondescribe
- relates to
-
JDK-8308930 [JVMCI] TestUncaughtErrorInCompileMethod times out
-
- Closed
-
- links to
-
Commit openjdk/jdk/05c095cf
-
Review(master) openjdk/jdk/14000