問題描述
我們看到 JVM 有時會因段錯誤而崩潰.我們在日志中看到的唯一錯誤如下.
We are seeing the JVM getting crashed at times with segfault. The only error we see in logs is as below.
任何人都可以通過查看以下錯誤跟蹤來提出建議.
Anyone can suggest something by looking at the below error trace.
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fef7f1d3eb0, pid=42623, tid=0x00007feea62c8700
#
# JRE version: OpenJDK Runtime Environment (8.0_222-b10) (build 1.8.0_222-b10)
# Java VM: OpenJDK 64-Bit Server VM (25.222-b10 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# J 62683 C2 org.apache.ignite.internal.marshaller.optimized.OptimizedObjectOutputStream.writeObject0(Ljava/lang/Object;)V (331 bytes) @ 0x00007fef7f1d3eb0 [0x00007fef7f1d3e00+0xb0]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hsperfdata_pvappuser/hs_err_pid42623.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
<小時>
在嘗試了解此崩潰的原因時 Oracle JVM 文檔 https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/crashes001.html ,這看起來是 5.1.2 Crash in Compiled Code 的問題框架是java框架(有一個J")
While trying to understand the reason for this crash Oracle JVM docs https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/crashes001.html ,this looks to be the case of 5.1.2 Crash in Compiled Code as the problematic frame is java frame(has a "J")
雖然無法進一步了解它,但我們也不確定它什么時候出現,唯一可能的模式是它在 JVM 運行 5-6 天時出現,通常是在星期五.我們使用的是在 RHEL 6.10 上運行的 RedHat 提供的 openjdk-8 ("1.8.0_232") 發行版.
Though could not get much further from it, we also not sure when it comes, the only probale pattern is it comes when JVM is running for 5-6 days so usually on Friday. We are using openjdk-8 ("1.8.0_232") distribution provided by RedHat running on RHEL 6.10.
期待在跟蹤此錯誤時獲得任何領先點.
Looking forward to get any leading point in tracing this error.
推薦答案
當前棧幀有 writeObject0
作為最后調用的方法.native
方法的名稱以 0
結尾有一個命名約定.因此檢查該方法是否確實是原生的.
The current stack frame has writeObject0
as the last called method. There is a naming convention that native
method's names end with 0
. Therefore check whether that method is indeed native.
如果是這樣,它可能是用 C 編寫的,這是一種古老的不安全語言,其程序往往會以不受控制的方式崩潰.這通常會導致 SIGSEGV.
If it is, it is probably written in C, an ancient unsafe language whose programs tend to crash in an uncontrolled way. This often leads to SIGSEGV.
在這種情況下,該方法是用 Java 編寫的.
In this case, that method is written in Java though.
正如您在錯誤消息中所說的,請閱讀 hs_err_pid42623.log 了解更多詳細信息.在該文件中,您將找到有關崩潰代碼的寄存器和一些機器指令.
As you were told in the error message, read hs_err_pid42623.log for further details. In that file you will find the registers and a few machine instructions around the code that crashed.
這篇關于如何知道 JVM 因 Segfault 而崩潰的原因?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!