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

JFR emergency dump does not recover thread state

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 11, 12, 13, 14
    • hotspot
    • jfr
    • 11
    • b22

      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

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

              Created:
              Updated:
              Resolved: