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

JFR: Unclear exception message when dumping stopped in memory recording

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 20
    • 11, 17, 19
    • hotspot
    • None
    • jfr
    • b18

    Description

      try (Recording r = new Recording()) {
         r.setToDisk(false);
         r.start();
         r.stop()
         r.dump(Path.of("recording.jfr"));;
      }

      results in:

      Exception in thread "main" java.io.IOException: Unexpected error during I/O operation
      at jdk.jfr.internal.WriteableUserPath.doPrivilegedIO(WriteableUserPath.java:139)
      at jdk.jfr.internal.PlatformRecording.dumpStopped(PlatformRecording.java:714)
      at jdk.jfr.internal.PlatformRecording.dump(PlatformRecording.java:707)
      at jdk.jfr.Recording.dump(Recording.java:388)
      at Name.main(Name.java:16)

      Problem is that JFR tries to make a dump file, but there are no chunks in the repository since it's an in memory recording. Documentation should make it clear under what circumstances it's possible to dump a recording. The error message should be changed so user understands why it fails.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: