如何在jvm GCTaskThread中调试SIGSEGV [英] how to debug SIGSEGV in jvm GCTaskThread

查看:622
本文介绍了如何在jvm GCTaskThread中调试SIGSEGV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程式正在体验生产中的现金。
崩溃转储指示在GCTaskThread中发生了SIGSEGV

My application is experiencing cashes in production. The crash dump indicates a SIGSEGV has occurred in GCTaskThread

它使用JNI,因此可能有一些内存损坏的来源,虽然我不能确定。

It uses JNI, so there might be some source for memory corruption, although I can't be sure.

我如何调试这个问题 - 我虽然做了-XX:OnError ...但我不知道什么会帮助我调试这个。

How can I debug this problem - I though of doing -XX:OnError... but i am not sure what will help me debug this.

另外,你可以给一个具体的例子来说明JNI代码如何使用SIGSEGV来崩溃GC

Also, can some of you give a concrete example on how JNI code can crash GC with SIGSEGV

/ strong>:

EDIT:

操作系统:SUSE Linux Enterprise Server 10(x86_64)

OS:SUSE Linux Enterprise Server 10 (x86_64)

vm_info:Java HotSpot )用于linux-amd64 JRE(1.6.0_10-b33)的64位服务器VM(11.0-b15),构建于2008年9月26日01:10:29由java_re与gcc 3.2.2(SuSE Linux)

vm_info: Java HotSpot(TM) 64-Bit Server VM (11.0-b15) for linux-amd64 JRE (1.6.0_10-b33), built on Sep 26 2008 01:10:29 by "java_re" with gcc 3.2.2 (SuSE Linux)

EDIT
我们禁用超线程之后,问题是否停止,任何想法?

EDIT: The issue stop occurring after we disable the hyper threading, any thoughts?

推荐答案

JNI代码中的错误可以通过以下几种方式发生:

Errors in JNI code can occur in several ways:

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选项。

If you think that you have a problem with the interaction between user-written native code and the JVM (that is, a JNI problem), you can run diagnostics that help you check the JNI transitions. to invoke these diagnostics; specify the -Xcheck:jni option when you start up the JVM.

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

The -Xcheck:jni option activates a set of wrapper functions around the JNI functions. The wrapper functions perform checks on the incoming parameters. These checks include:

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.doc.diagnostics.50/html/jni_debug.html
http://www.oracle。 com / technetwork / java / javase / clopts-139448.html#gbmtq

Pls read the following links http://publib.boulder.ibm.com/infocenter/javasdk/v5r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.50/html/jni_debug.html http://www.oracle.com/technetwork/java/javase/clopts-139448.html#gbmtq

这篇关于如何在jvm GCTaskThread中调试SIGSEGV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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