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

Emergency dump does not work when disk=false is set

    Details

    • Subcomponent:
      jfr
    • Resolved In Build:
      b14

      Backports

        Description

        Emergency dump does not work when disk=false is set to -XX:StartFlightRecodging.
        I investigated this with strace on Linux x64. HotSpot attempted to open emergency flight record file, but open syscall returned ENOENT as below:

        -------------
        [pid 4929] openat(AT_FDCWD, "/home/ysuenaga/github/garakuta/NativeSEGV/hs_err_pid4928.jfr", O_RDWR|O_CLOEXEC) = -1 ENOENT (No such file or directory)
        -------------

        We need to pass `O_CREAT | O_WRONLY` to `os::open()`.
        (disk=true (default) works fine)


        How to reproduce:

        1. Build testcase
          https://github.com/YaSuenag/garakuta/tree/master/NativeSEGV
            $ export JAVA_HOME=<path>
            $ make

        2. Run testcase
            $ $JAVA_HOME/bin/java -XX:StartFlightRecording=disk=false -Djava.library.path=. NativeSEGV

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mgronlun Markus Grönlund
                  Reporter:
                  ysuenaga Yasumasa Suenaga
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: