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

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

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      svc

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: