How do I capture hs_err_pid.log in container environments

Viewed 314

When i run my jar application, the jvm is getting crash with the error

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000000003fd6, pid=7, tid=0x00007ff273404b38
#
# JRE version: OpenJDK Runtime Environment (Zulu 8.60.0.22-SA-linux-musl-x64) (8.0_322-b06) (build 1.8.0_322-b06)
# Java VM: OpenJDK 64-Bit Server VM (25.322-b06 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  0x0000000000003fd6
#
# Core dump written. Default location: /usr/app/core or core.7
#
# An error report file with more information is saved as:
# /usr/app/hs_err_pid7.log
#
# If you would like to submit a bug report, please visit:
#   http://www.azul.com/support/
#

The error says that a report file is saved hs_err_pid7.log, but i'm not able to view it because as soon as the jvm crashes, the container stops running, Is there a way to save this file outside the container?
Thanks

1 Answers

Try to mount persistent volume rather than the bind volume !

Related