是什么导致这种Java崩溃?以及如何防止发生此类崩溃?

时间:2012-03-24 13:55:13

标签: java linux jvm

我的计算机上出现JVM崩溃。这是一个复杂的3D应用程序,具有很强的渲染功能。它一遍又一遍地崩溃了。崩溃日志附在下面:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f0c6ea08856, pid=16993, tid=139691170658048
#
# JRE version: 6.0_22-b22
# Java VM: OpenJDK 64-Bit Server VM (20.0-b11 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea6 1.10.4
# Distribution: Ubuntu 11.04, package 6b22-1.10.4-0ubuntu1~11.04.1
# Problematic frame:

CPU:total 2 (2 cores per cpu, 2 threads per core) family 6 model 37 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht

Memory: 4k page, physical 7990512k(6392940k free), swap 8180732k(8180732k free)

vm_info: OpenJDK 64-Bit Server VM (20.0-b11) for linux-amd64 JRE (1.6.0_22-b22), built on Oct 25 2011 06:09:07 by "buildd" with gcc 4.5.2

time: Sat Mar 24 09:41:44 2012
elapsed time: 412 seconds

Signal Handlers:
SIGSEGV: [libjvm.so+0x7d0fd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x7d0fd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x6837d0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x6837d0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGXFSZ: [libjvm.so+0x6837d0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x6837d0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x6839a0], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x686340], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x686340], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x686340], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x686340], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004

1 个答案:

答案 0 :(得分:2)

启动Eclipse,并使用Eclipse探查器检查应用程序中的内存泄漏。很可能崩溃与内存问题有关(内存不足错误)。

另外一点我忘了提及,在启动时为你的java应用程序分配更多的RAM内存可以提供帮助。但无论如何,检查你的应用程序是否有内存泄漏。

要为java app分配内存,请在启动java app时在命令行中使用-xmx键。