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

JFR hiding disk full

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 16
    • hotspot
    • jfr

      From JP:
      <--8<-->
      At Datadog we have identified an issue for JFR recordings when the disk of the repository is full.

      root@7269529ba912:/spring-petclinic/scripts# ls -l /tmp/2020_09_25_13_16_25_23/
      total 4036
      -rw-r--r-- 1 root root 3001528 Sep 25 13:17 2020_09_25_13_16_25.jfr
      -rw-r--r-- 1 root root 1130496 Sep 25 13:19 2020_09_25_13_17_25.jfr
      -rw-r--r-- 1 root root 0 Sep 25 13:19 2020_09_25_13_19_44.jfr
      -rw-r--r-- 1 root root 0 Sep 25 13:20 2020_09_25_13_19_45.jfr
      -rw-r--r-- 1 root root 0 Sep 25 13:21 2020_09_25_13_20_25.jfr
      -rw-r--r-- 1 root root 0 Sep 25 13:21 2020_09_25_13_21_25.jfr

      As you can see empty jfr files are created (metadata of the filesystem), but no data, expected. But from the API standpoint we have no information about the situation:
      no error logged from Xlog:jfr for example
      no exception throws from java Api when taking the snapshot for example.
      The size of the Recording (jdk.jfr.Recording#getSize()) is also non zero
      I assume that when a JFR file is written on disk, OS should report an error. This error should be reported one way or another.

      Does that make sense?

      To reproduce, it's relatively easy with a docker container that is filled with a command like:
      dd if=/dev/zero of=largefile.dat bs=1G count=200

      Thanks
      Jean-Philippe
      <--8<-->

      It would be good to not only consider logging the problem, but also exposing it through the APIs, so that there is a chance for tools built on JFR to discover and act on the problem.

            Unassigned Unassigned
            hirt Marcus Hirt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: