如何调查 JVM 崩溃的原因?

How do I investigate the cause of a JVM crash?(如何调查 JVM 崩溃的原因?)
本文介绍了如何调查 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?

UPDhttp://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 VM 参数、-verbose:gc 和调试 VM 参数.它们可能会干扰 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() 的代码可能会触发相同的崩溃

Code that calls java.lang.Thread#getAllStackTraces() or java.lang.Thread#getStackTrace() may trigger the same crash

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

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Show padding zeros using DecimalFormat(使用 DecimalFormat 显示填充零)
Java decimal formatting using String.format?(使用 String.format 的 Java 十进制格式?)
Sprintf equivalent in Java(Java 中的 Sprintf 等价物)
StAX XML formatting in Java(Java 中的 StAX XML 格式)
Java - format double value as dollar amount(Java - 将双值格式化为美元金额)
Java printf using variable field size?(Java printf使用可变字段大小?)