我的申请正在经历生产现金。崩溃转储表示在GCTASKTHREAD中发生了SIGSEGV

它使用JNI,因此可能有一些记忆损坏的来源,尽管我不确定。

我该如何调试这个问题 - 我虽然做-xx:onerror ...但是我不确定什么会帮助我调试这个问题。

另外,你们中的一些人可以给出一个具体的示例,以了解JNI代码如何使用Sigsegv崩溃GC

编辑:

OS:Suse Linux Enterprise Server 10(X86_64)

vm_info:Java热点(TM)64位服务器VM(11.0-B15),用于Linux-AMD64 JRE(1.6.0_10-B33),建于9月26日2008年9月26日01:10:29 by“ Java_re”,带有GCC 3.2.2( Suse Linux)

编辑:问题在我们禁用超线程后停止发生,有什么想法吗?

有帮助吗?

解决方案

JNI代码中的错误可能会以几种方式发生:

The program crashes during execution of a native method (most common).
The program crashes some time after returning from the native method, often during GC (not so common).
Bad JNI code causes deadlocks shortly after returning from a native method (occasional).

如果您认为自己对用户编写的本机代码和JVM之间的相互作用有问题(即JNI问题),则可以运行诊断方法来帮助您检查JNI过渡。调用这些诊断;启动JVM时,指定-Xcheck:JNI选项。

-Xcheck:JNI选项激活JNI功能围绕JNI功能的一组包装器功能。包装器功能对传入参数执行检查。这些检查包括:

Whether the call and the call that initialized JNI are on the same thread.
Whether the object parameters are valid objects.
Whether local or global references refer to valid objects.
Whether the type of a field matches the Get<Type>Field or Set<Type>Field call.
Whether static and nonstatic field IDs are valid.
Whether strings are valid and non-null.
Whether array elements are non-null.
The types on array elements.

请阅读以下链接http://publib.boulder.ibm.com/infocenter/javasdk/v5r0/index.jsp?topic=/com.ibm.java.diac.diacnostics.50/html/jni_debug.htmlhttp://www.oracle.com/technetwork/java/javase/clopts-139448.html#gbmtq

其他提示

使用Valgrind。这听起来像是记忆腐败。输出将是冗长的,但如果可能的话,尝试将报告隔离到JNI库。

由于错误的线程似乎是gctaskthread,您是否尝试过启用 verbose:gc 并分析输出(最好使用武士等图形工具等)?检查HS_ERR文件后,您是否可以隔离特定的LIB?

另外,您能否提供有关导致问题以及是否容易再现的更多信息?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top