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
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