jvm crash core dump分析

本文介绍了如何分析JVM崩溃时产生的核心转储文件,强调了使用与崩溃时相同版本的JDK、在类似操作系统上进行分析的重要性,并提到了使用gdb、jstack和jmap等工具进行诊断的方法。
摘要由CSDN通过智能技术生成

 

一般会有hs_err_pidxxxxx.log这么个文件,里面记录了core dump文件在哪 

在分析jvm crash 产生的core dump文件需要注意几点:

1、jdk必须使用与crash所处jdk 版本完全一致,因为不同的jdk实现有差异,将会导致gdb或jstack,jmap无法加载,或无法正确加载。至少 jstack,jmap要完全正确加载,自测是需要使用同样的jdk才可以。

2、尽可能在相同的操作系统上,这样gdb才更有可能正确加载各种动态库。

3、基于以上,在出问题的机器上进行排查是最好的。

 

===以下鸟文转自:http://www.javacodegeeks.com/2013/02/analysing-a-java-core-dump.html

但码农都清楚,技术性的文章往往都通俗易懂,没啥语法。

 
 

 

 

In this post, I will show you how you can debug a Java core file to see what caused your JVM to crash. I will be using a core file I generated in my previous post: Generating a Java Core Dump. There are different ways you can diagnose a JVM crash, listed below:

The hs_err_pid log file

When a fatal error occurs in the JVM, it produces an error log file called hs_err_pidXXXX.log, normally in the working directory of the process or in the temporary directory for the operating system. The top of this file contains the cause of the crash and the ‘problematic frame’. For example, mine shows:

$ head hs_err_pid21178.log
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000002b1d00075c, pid=21178, tid=1076017504
#
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值