-
Bug
-
Resolution: Fixed
-
P4
-
11, 13
-
b21
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")
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")
- csr for
-
JDK-8221743 ErrorFile option does not handle pre-existing error files of the same name
- Closed
- relates to
-
JDK-8224023 Redo the fix for ErrorFile option does not handle pre-existing error files of the same name
- Resolved
-
JDK-8189672 -XX:ErrorFile doesn't work
- Closed
-
JDK-8223885 hs_err and replay file may contain garbage when overwriting existing file
- Resolved