JVM ignores the value passed to -XX:ErrorFile
In the below crash you can see "-XX:ErrorFile=/home/fairoz/Test/hs.log" is being used but crash created in work directory /scratch/fairoz/JI/OOM/hs_err_pid39053.log
/java_re/jdk/9/all/181/binaries/linux-x64/bin/java -Djava.io.tmpdir=/home/fairoz/Test -XX:ErrorFile=/home/fairoz/Test/hs.log -XX:+CrashOnOutOfMemoryError -Xmx10m Wrapper
Aborting due to java.lang.OutOfMemoryError: Java heap space
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (debug.cpp:340), pid=39053, tid=39054
# fatal error: OutOfMemory encountered: Java heap space
#
# JRE version: Java(TM) SE Runtime Environment (9.0+181) (build 9+181)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (9+181, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e" (or dumping to /scratch/fairoz/JI/OOM/core.39053)
#
# An error report file with more information is saved as:
# /scratch/fairoz/JI/OOM/hs_err_pid39053.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)
In the below crash you can see "-XX:ErrorFile=/home/fairoz/Test/hs.log" is being used but crash created in work directory /scratch/fairoz/JI/OOM/hs_err_pid39053.log
/java_re/jdk/9/all/181/binaries/linux-x64/bin/java -Djava.io.tmpdir=/home/fairoz/Test -XX:ErrorFile=/home/fairoz/Test/hs.log -XX:+CrashOnOutOfMemoryError -Xmx10m Wrapper
Aborting due to java.lang.OutOfMemoryError: Java heap space
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (debug.cpp:340), pid=39053, tid=39054
# fatal error: OutOfMemory encountered: Java heap space
#
# JRE version: Java(TM) SE Runtime Environment (9.0+181) (build 9+181)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (9+181, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e" (or dumping to /scratch/fairoz/JI/OOM/core.39053)
#
# An error report file with more information is saved as:
# /scratch/fairoz/JI/OOM/hs_err_pid39053.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)
- relates to
-
JDK-8221738 ErrorFile option does not handle pre-existing error files of the same name
- Resolved
-
JDK-8189674 -Djava.io.tmpdir doesn't work for generating hs_error files
- Closed
-
JDK-8221743 ErrorFile option does not handle pre-existing error files of the same name
- Closed