如何调查JVM崩溃的原因? [英] How do I investigate the cause of a JVM crash?

查看:923
本文介绍了如何调查JVM崩溃的原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一天前,经过几个月的正常工作后,我们的Java应用程序偶尔会出现以下错误:

One day ago, after a few months of normal working, our java app starts to crash occasionally with the following error:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (safepoint.cpp:247), pid=2075, tid=140042095163136
#  guarantee(PageArmed == 0) failed: invariant
#
# JRE version: 6.0_23-b05
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.0-b09 mixed mode linux-amd64 compressed oops)
# An error report file with more information is saved as:
# /var/chat/jSocketer/build/hs_err_pid2075.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

我在hs_err_pid2075.log中看到有一个活动的线程处理网络通信。然而,在过去几个月没有任何应用或环境变化。也没有任何负载增长。
我能做什么来理解,崩溃的原因是什么?是否有任何常见步骤来调查jvm崩溃?

I looked in hs_err_pid2075.log and saw that there was an active thread, that processed a network communication. However there wasn't any application or environment changes done in the last few months. Also there wasn't any load growth. What can I do to understand, what is the reason of crash? Are there any common steps to investigate a jvm crash?

UPD
http://www.wuala.com/ubear/public

推荐答案

崩溃是在JVM中,不是在外部本地代码。但是,它崩溃的操作是由外部DLL启动的。

The crash is in the JVM, not in external native code. However, the operation it crashed on has been initiated by and external DLL.

hs_err_pid文件中的这一行解释了崩溃的操作:

This line in the hs_err_pid file explains the operation that crashed:

VM_Operation (0x00007f5e16e35450): GetAllStackTraces, mode: safepoint, requested by thread 0x0000000040796000

现在线程0x0000000040796000是

Now, thread 0x0000000040796000 is

0x0000000040796000 JavaThread "YJPAgent-Telemetry" daemon [_thread_blocked, id=2115, stack(0x00007f5e16d36000,0x00007f5e16e37000)]

这是由Yourkit创建的线程。 GetAllStackTraces是分析器需要调用以进行抽样的东西。如果您删除了分析器,则不会发生崩溃。

which is a thread created by Yourkit. "GetAllStackTraces" is something that a profiler needs to call in order to do sampling. If you remove the profiler, the crash will not happen.

使用此信息无法说明导致崩溃的原因,但您可以尝试以下操作:删除所有 - XX虚拟机参数,-verbose:gc和调试虚拟机参数。它们可能会干扰JVM的性能分析界面。

With this information It's not possible to say what causes the crash, but you can try the following: Remove all -XX VM parameters, -verbose:gc and the debugging VM parameters. They might interfere with the profiling interface of the JVM.

更新

调用 java.lang.Thread#getAllStackTraces() java.lang.Thread#getStackTrace()相同的崩溃

这篇关于如何调查JVM崩溃的原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆