一般会有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 #