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

ErrorFile option does not handle pre-existing error files of the same name

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b21

      Description

      Specifying -XX:ErrorFile=<path> only succeeds if there is not already a file at <path>. When there is, it will silently revert to the default path/filename which is hs_err... in the current directory:

      java -XX:ErrorHandlerTest=13 -XX:ErrorFile=/tmp/hallo
      #
      # A fatal error has been detected by the Java Runtime Environment:
      ..
      #
      # An error report file with more information is saved as:
      # /tmp/hallo

      java -XX:ErrorHandlerTest=13 -XX:ErrorFile=/tmp/hallo
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      ...
      #
      # An error report file with more information is saved as:
      # /shared/projects/openjdk/test/hs_err_pid14685.log
      #

      That is not useful.

      More useful alternatives would be:
      - append or overwrite the existing file
      - create a new file with an appendix ("_<num>" or "_pid")

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stuefe Thomas Stuefe
              Reporter:
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: