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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 23
    • Affects Version/s: 11, 17, 21
    • Component/s: 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

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

              Created:
              Updated:
              Resolved: