如何分析hs_err_pidxxx.log文件

如何分析 jvm的崩溃日志

jvm在崩溃的情况下,会生成一个 hs_err_pidxxx.log的文件,这个文件一般生成在java进程的启动目录里。
那么如何分析这个日志呢?

  1. 首先打开文件看到的就是 报错内容概览
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000fffe81979914, pid=17399, tid=0x0000fffe6d7d01e0
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b01) (build 1.8.0_212-8u212-b01-1~deb9u1-b01)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b01 mixed mode linux-aarch64 compressed oops)
# Problematic frame:
# C  [libsw3.so+0x66914]  CCA_DibExecutor::DissectRect(CCA_Rect const*, int&, int&, int&, int&, int&, int&) const+0x54
#
# Core dump written. Default location: /root/TongWeb7.0/bin/core or core.17399
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
	SIGSEGV (0xb) at pc=0x0000fffe81979914, pid=17399, tid=0x0000fffe6d7d01e0 

这一行代码表示出错的进程id号:
SIGSEGV 错误的信号类型
pc 就是IP/PC寄存器值也就是执行指令的代码地址
pid 就是进程id

下面就是jdk的版本和jvm的信息
重点是——- Problematic frame:
它说明jvm 在Crash的时候,正在从哪个库文件执行代码。除了“V”以外,还有可能是“C”、“j”、“v”、“J”。具体的表示意思如下:

Frame类型描述:
C: Native C frame
j: Interpreted Java frame
V: VMframe
v: VMgenerated stub frame
J: Other frame types, including compiled Java frames

然后根据报错的内容去搜索日志文件,比如 ,我这次报错的是
C [libsw3.so+0x66914] ,那么去搜索 libsw3.so,便可以在日志中找到在这里插入图片描述这样就可以直接判断出是哪个jar里的代码出现了问题。
2.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值