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

JFR: Auto-generated filename doesn't work with time-limited recording

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 23
    • 11, 17, 21
    • hotspot
    • None
    • jfr
    • b06

      Reproducer:

          public class Main {
            public static void main(String... args) throws Exception {
             Thread.sleep(100_000);
            }
          }
          $ mkdir recordings
          $ java -XX:StartFlightRecording:duration=30s,filename=./recordings Main.java
          $ cd recordings
          $ ls -l
          total 0

      Expected a recording with a filename similar to hotspot-pid-98089-id-1-2024_01_09_22_01_14.jfr

      If the JVM exits before the recording ends, a file with an auto-generated name is written.

      Impact: High, loss of data
      Likelihood: Low, requires JFR and that a duration is specified with a directory.
      Workaround: Medium, specify an explicit filename, or omit duration, but may not be what user wants

      HLM => P3

            egahlin Erik Gahlin
            egahlin Erik Gahlin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: