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

Use `os::ThreadCrashProtection` to protect AsyncGetCallTrace from crashing

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • tbd
    • None
    • hotspot
    • None
    • svc

      The call stack sampling in JFR is protected from crashing the VM by using `os::ThreadCrashProtection` [1]. AsyncGetCallTrace should also be secured in non-assertion mode using the same technique. This would prevent calling AsyncGetCallTrace from crashing the VM in the event of an error.

      The preconditions of `os::ThreadCrashProtection` hold for AsyncGetCallTrace as good as they hold for JFR sampling, as both share most of their code.

      [1] https://github.com/openjdk/jdk/blob/965ea8d9cd29aee41ba2b1b0b0c67bb67eca22dd/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp#L166

            jbechberger Johannes Bechberger
            jbechberger Johannes Bechberger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: