[英]what should I do when Java core dumps?
This is the first time I am in this situation with Java.这是我第一次遇到 Java 的这种情况。
Java just core dumps with the following error: Java 只是核心转储,出现以下错误:
#
# A fatal error has been detected by the Java Runtime Environment:
#
[thread 140213457409792 also had an error]# Internal Error (safepoint.cpp:300), pid=4327
, tid=140213211031296
# guarantee(PageArmed == 0) failed: invariant
#
# JRE version: 6.0_24-b24
# Java VM: OpenJDK 64-Bit Server VM (20.0-b12 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea6 1.11.4
# Distribution: Ubuntu 12.04 LTS, package 6b24-1.11.4-1ubuntu0.12.04.1
# An error report file with more information is saved as:
# /tmp/hs_err_pid4327.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-6/
when I tried running it on a mac os, it core dumps at the same place (the JREs must be different)... so it must be something related to the code.当我尝试在 mac os 上运行它时,它的核心转储在同一个地方(JRE 必须不同)......所以它必须与代码相关。 I have no idea how to debug this, this is not an exception, and the log file specified up there does not give me much information.
我不知道如何调试它,这也不例外,那里指定的日志文件没有给我太多信息。 Any ideas what I can do about it to find the bug?
任何想法我可以做些什么来找到错误?
The /tmp/hs_err_pid4327.log file should contain a stack trace of where the core occurred. /tmp/hs_err_pid4327.log 文件应包含内核发生位置的堆栈跟踪。 Unless you are making a JNI call, it is probably a Java bug.
除非您进行 JNI 调用,否则它可能是 Java 错误。
The core dump is telling what you should do...核心转储告诉你应该做什么......
If you would like to submit a bug report, please include instructions how to reproduce the bug and visit: https://bugs.launchpad.net/ubuntu/+source/openjdk-6/
如果您想提交错误报告,请包含如何重现错误的说明并访问: https : //bugs.launchpad.net/ubuntu/+source/openjdk-6/
A quick look makes me think this is already reported.快速浏览让我觉得这已经被报道了。
The bug probably isn't in your code, per se.该错误本身可能不在您的代码中。 It's most likely an environmental issue - perhaps a JVM bug, perhaps some unusual condition, and most likely, both - a bug that occurs rarely, under an odd circumstance.
这很可能是环境问题 - 可能是 JVM 错误,也可能是某些异常情况,最有可能是两者兼有 - 在奇怪的情况下很少发生的错误。
Google for the key elements in the message (eg "safepoint.cpp:100"), look at the other reports, and look for things you have in common or workarounds that may apply.谷歌搜索消息中的关键元素(例如“safepoint.cpp:100”),查看其他报告,并寻找您的共同点或可能适用的解决方法。 In this case, one set of reports suggests that heavy multithreading may contribute to the problem.
在这种情况下,一组报告表明繁重的多线程可能会导致该问题。
Check if you have a hprof file in your application directory.检查您的应用程序目录中是否有 hprof 文件。 Optionally you could dump at will using
(可选)您可以随意转储使用
jmap -dump:file=<file_name> <pid>
and then analyze the dump using MAT http://www.eclipse.org/mat/然后使用 MAT http://www.eclipse.org/mat/分析转储
You could also consider other tools quoted here :您还可以考虑此处引用的其他工具:
Parameters.java:6: error: ';'参数。java:6:错误:';' expected my Method("Liam");
期望我的方法(“利亚姆”); ^ Parameters.java:7: error: ';'
^ 参数.java:7: 错误: ';' expected my Method("Jenny");
期望我的方法(“珍妮”); ^ Parameters.java:8: error: ';'
^ 参数.java:8: 错误: ';' expected my Method("Anja");
期望我的方法(“Anja”); ^ Parameters.java:9: error: reached end of file while parsing } ^
^ 参数。java:9:错误:解析时到达文件末尾} ^
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.