Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8308151

[JVMCI] capture JVMCI exceptions in hs-err

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 21
    • hotspot
    • b25

      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

            dnsimon Douglas Simon
            dnsimon Douglas Simon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: