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

JFR emergency dump does not recover thread state

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11, 12, 13, 14
    • Fix Version/s: 14
    • Component/s: hotspot
    • Subcomponent:
      jfr
    • Introduced In Version:
      11
    • Resolved In Build:
      b22

      Description

      If JFR is running when JVM crashes, JFR will dump data to hs_err_pid<PID>.jfr . It would perform in prepare_for_emergency_dump(). However this function transits thread state to "_thread_in_vm".

      If the crash occurs in JNI code, we cannot see some messages in hs_err log.


      * With -XX:StartFlightRecording
      ```
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      #
      ```

      * Without -XX:StartFlightRecording
      ```
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      # The crash happened outside the Java Virtual Machine in native code.
      # See problematic frame for where to report the bug.
      #
      ```

      We can reproduce it as below:

      1. Clone reproducer
        $ git clone https://github.com/YaSuenag/garakuta.git

      2. Build reproducer
        $ cd garakuta/NativeSEGV
        $ make JAVA_HOME=/path/to/jdk

      3. Run reproducer
        $ java -XX:StartFlightRecording -Djava.library.path=. NativeSEGV

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ysuenaga Yasumasa Suenaga
                Reporter:
                ysuenaga Yasumasa Suenaga
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: