eclipse+linux 64位+jdk 64位(libjvm.so+0x1f125a问题解决)

我在Ubuntu 64位下使用eclipse时,出现如下错误:

#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fe6cab2b25a, pid=2220, tid=140627523454720
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0-b22 mixed mode linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1f125a]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

......

Current CompileTask:
C2:2122      org.eclipse.core.internal.dtree.DataTreeNode.forwardDeltaWith([Lorg/eclipse/core/internal/dtree/AbstractDataTreeNode;[Lorg/eclipse/core/internal/dtree/AbstractDataTreeNode;Lorg/eclipse/core/internal/dtree/IComparator;)[Lorg/eclipse/core/internal/dtree/AbstractDataTreeNode; (469 bytes)

上述问题导致eclipse一直崩溃,让我无法工作,所以用libjvm.so+0x1f125a作为关键字上网搜索解决办法:

http://www.newt.com/debian/blog.html

上述网址相关内容摘抄如下:

Although Eclipse seemed to be well-behaved on a 64-bit etch system with Java 6, after upgrading to lenny, it started crashing all the time. I found that the crashes went away after uninstalling Subclipse. But I found a better workaround. My crashes had the following signature:

#  SIGSEGV (0xb) at pc=0x00007f762d5c225a, pid=2534, tid=1091451216
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0-b23 mixed mode
linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1f125a]
...
Current CompileTask:
C2:715
      org.eclipse.core.internal.dtree.DataTreeNode.forwardDeltaWith(
          [Lorg/eclipse/core/internal/dtree/AbstractDataTreeNode;
          [Lorg/eclipse/core/internal/dtree/AbstractDataTreeNode;
          Lorg/eclipse/core/internal/dtree/IComparator;)
      [Lorg/eclipse/core/internal/dtree/AbstractDataTreeNode;
      (469 bytes)
    

I was able to work around this problem by not compiling the method listed above. I launch eclipse from a script, so I added -XX:CompileCommandFile to eclipse's args as follows:

exec ./eclipse "$@" -vmargs -Xmx1500M -XX:MaxPermSize=256M \
    -XX:CompileCommandFile=/usr/local/etc/hotspot
    

The file /usr/local/etc/hotspot contains:

exclude org/eclipse/core/internal/dtree/DataTreeNode forwardDeltaWith
    

This file is handy if you have several methods to list. If you only have one, you can do this instead:

-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith
    

Finally, you can add either of these arguments to your eclipse.ini in Eclipse's installation directory.

上面描述了如何解决这个问题,下面网址中说明了问题的原因及两种解决办法:

http://hi.baidu.com/jackflit/item/17f48325f9d88445469962a0

今天服务器出现了如下错误

# # An unexpected error has been detected by Java Runtime Environment:

# # SIGSEGV (0xb) at pc=0x0000002a95db725a, pid=13448, tid=1086814560

# # Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0-b22 mixed mode linux-amd64)

# Problematic frame: # V [libjvm.so+0x1f125a]

# # If you would like to submit a bug report, please visit:

# http://java.sun.com/webapps/bugreport/crash.jsp

# The crash happened outside the Java Virtual Machine in native code.

# See problematic frame for where to report the bug.

# --------------- T H R E A D ---------------

Current thread (0x0000002b5ba17800): JavaThread "CompilerThread1" daemon [_thread_in_native, id=13463, stack(0x0000000040b77000,0x0000000040c78000)]

...

Current CompileTask: C2:2415 com.xxx.mmo.gameserver.itemenhance.ItemForge4.getEquipitemFuncType()[I (250 bytes)

这段话说明了两个问题

1. 出错的是hotspot的compiler线程,而不是用户线程

2. 编译器线程在动态编译 ItemForge4的getEquipitemFuncType方法

    导致这个问题的原因可能是当前虚拟机的compiler有bug,在编译getEquipitemFuncType的时候出错了

    解决方案有两个

1. 修改java启动参数,使用其它的虚拟机,比如-server, -client -Xint

2. 或者禁止对这个方法进行运行时再编译

    具体方法如下

1. 在进程工作目录下(通常是user.dir系统变量目录),创建.hotspot_compiler文件

2. 文件中填写以下内容 exclude com/xxx/mmo/gameserver/itemenhance/ItemForge4 getEquipitemFuncType

3. 保存文件

4. 再次启动进程

    如果启动后输出

CompilerOracle: exclude com/xxx/mmo/gameserver/itemenhance/ItemForge4 getEquipitemFuncType

则说明一切正常这样运行时不会再编译这个方法,可能就避免了编译时的错误


通过上面的解释说明,更加清楚遇到类似问题该如何解决。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值