Java kill suddenly
I am getting this error when writer.optimize() called I have caugh all exceptions but hopeless .writer is an instance of apache lucene Indexwriter and tomcat collapse when optimizing the indexwriter.I am trying to index a large number of file its works for a few number of file but when number of files increase it cause to tomcat fail.
logger.info("Optimizing optimazing...");
this.writer.optimize();
logger.info("Optimizing closing...");
this.writer.close();
logger.info("Optimazide and closed succesfully...");
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fe6f8c38e90, pid=10316, tid=140629887768320
#
# JRE version: 6.0_20-b20
# Java VM: OpenJDK 64-Bit Server VM (19.0-b09 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea6 1.9.7
# Distribution: Ubuntu 10.10, package 6b20-1.9.7-0ubuntu1
# Problematic frame:
# V [libjvm.so+0x54ae90]
#
# 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/
#
--------------- T H R E A D ---------------
Current thread (0x00000000023e0000): JavaThread "CompilerThread0" daemon [_thread_in_native, id=10333, stack(0x00007fe6f2715000,0x00007fe6f2816000)]
siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000008
Registers:
RAX=0x0000000000000000, RBX=0x00007fe6f2812930, RCX=0x00007fe6ec03e9e0, RDX=0x0000000000002000
RSP=0x00007fe6f2811150, RBP=0x00007fe6f2811190, RSI=0x00007fe6e43a20f0, RDI=0x0000000000000000
R8 =0x00007fe6e43f5a70, R9 =0x00007fe6f2812930, R10=0x00007fe6ec6f7948, R11=0x0000000000000000
R12=0x00007fe6edd326b0, R13=0x00007fe6ec6f7948, R14=0x00007fe6f2812950, R15=0x00007fe6ec068990
RIP=0x00007fe6f8c38e90, EFL=0x0000000000010206, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
TRAPNO=0x000000000000000e
Register to memory mapping:
RAX=0x0000000000000000
0x0000000000000000 is pointing to unknown location
RBX=0x00007fe6f2812930
0x00007fe6f2812930 is pointing into the stack for thread: 0x00000000023e0000
"CompilerThread0" daemon prio=10 tid=0x00000000023e0000 nid=0x285d runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
RCX=0x00007fe6ec03e9e0
0x00007fe6ec03e9e0 is pointing to unknown location
RDX=0x0000000000002000
0x0000000000002000 is pointing to unknown location
RSP=0x00007fe6f2811150
0x00007fe6f2811150 is pointing into the stack for thread: 0x00000000023e0000
"CompilerThread0" daemon prio=10 tid=0x00000000023e0000 nid=0x285d runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
RBP=0x00007fe6f2811190
0x00007fe6f2811190 is pointing into the stack for thread: 0x00000000023e0000
"CompilerThread0" daemon prio=10 tid=0x00000000023e0000 nid=0x285d runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
RSI=0x00007fe6e43a20f0
0x00007fe6e43a20f0 is pointing to unknown location
RDI=0x0000000000000000
0x0000000000000000 is pointing to unknown location
R8 =0x00007fe6e43f5a70
0x00007fe6e43f5a70 is pointing to unknown location
R9 =0x00007fe6f2812930
0x00007fe6f2812930 is pointing into the stack for thread: 0x00000000023e0000
"CompilerThread0" daemon prio=10 tid=0x00000000023e0000 nid=0x285d runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
R10=0x00007fe6ec6f7948
0x00007fe6ec6f7948 is pointing to unknown location
R11=0x0000000000000000
0x0000000000000000 is pointing to unknown location
R12=0x00007fe6edd326b0
0x00007fe6edd326b0 is pointing to unknown location
R13=0x00007fe6ec6f7948
0x00007fe6ec6f7948 is pointing to unknown location
R14=0x00007fe6f2812950
0x00007fe6f2812950 is pointing into the stack for thread: 0x00000000023e0000
"CompilerThread0" daemon prio=10 tid=0x00000000023e0000 nid=0x285d runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
R15=0x00007fe6ec068990
0x00007fe6ec068990 is pointing to unknown location
Top of Stack: (sp=0x00007fe6f2811150)
0x00007fe6f2811150: 00007fe6e4522cd0 00007fe6f2811420
0x00007fe6f2811160: 00007fe6f2811190 00007fe6f2812930
0x00007fe6f2811170: 0000000000000002 00007fe6edd326b0
0x00007fe6f2811180: 00007fe6ec5d6430 00007fe6f2811420
0x00007fe6f2811190: 00007fe6f2811200 00007fe6f8c3941b
0x00007fe6f28111a0: 0000000000000002 00007fe600000100
0x00007fe6f28111b0: 00007fe600000001 00007fe6f28132d0
w-p 00021000 08:01 17301749 /lib/ld-2.12.1.so
7fe6fa020000-7fe6fa021000 rw-p 00000000 00:00 0
7fffd5558000-7fffd5579000 rw-p 00000000 00:00 0 [stack]
7fffd55ff000-7fffd5600000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
VM Arguments:
jvm_args: -Djava.util.logging.config.file=/home/murat/Desktop/servers/apache-tomcat-6.0.24/conf/logging.properties -Dhttp.nonProxyHosts=localhost|127.0.0.1|expertPC -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -agentlib:jdwp=transport=dt_socket,address=11550,server=y,suspend=n -Djava.endorsed.dirs=/home/murat/Desktop/servers/apache-tomcat-6.0.24/endorsed -Dcatalina.base=/home/murat/Desktop/servers/apache-tomcat-6.0.24 -Dcatalina.home=/home/murat/Desktop/servers/apache-tomcat-6.0.24 -Djava.io.tmpdir=/home/murat/Desktop/servers/apache-tomcat-6.0.24/temp
java_command: org.apache.catalina.startup.Bootstrap start
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=/usr/lib/jvm/java-6-openjdk
JRE_HOME=/usr/lib/jvm/java-6-openjdk
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
USERNAME=murat
LD_LIBRARY_PATH=/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64
SHELL=/bin/bash
DISPLAY=:0.0
Signal Handlers:
SIGSEGV: [libjvm.so+0x723630], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x723630], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x5e0000], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGXFSZ: [libjvm.so+0x5e0000], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x5e0000], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x5df710], sa_mask[0]=0x00000004, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x5e2180], sa_mask[0开发者_如何学编程]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGTERM: [libjvm.so+0x5e2180], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x5e2180], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
--------------- S Y S T E M ---------------
OS:Ubuntu 10.10 (maverick)
uname:Linux 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 18:42:20 UTC 2011 x86_64
libc:glibc 2.12.1 NPTL 2.12.1
rlimit: STACK 8192k, CORE 0k, NPROC infinity, NOFILE 1024, AS infinity
load average:0.77 0.30 0.14
/proc/meminfo:
MemTotal: 4054828 kB
MemFree: 176928 kB
Buffers: 207640 kB
Cached: 1332820 kB
SwapCached: 17608 kB
Active: 2419624 kB
Inactive: 1004992 kB
Active(anon): 1834536 kB
Inactive(anon): 67792 kB
Active(file): 585088 kB
Inactive(file): 937200 kB
Unevictable: 16 kB
Mlocked: 16 kB
SwapTotal: 11876348 kB
SwapFree: 11687616 kB
Dirty: 3508 kB
Writeback: 32 kB
AnonPages: 1873148 kB
Mapped: 197036 kB
Shmem: 18240 kB
Slab: 157916 kB
SReclaimable: 131452 kB
SUnreclaim: 26464 kB
KernelStack: 3928 kB
PageTables: 32140 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 13903760 kB
Committed_AS: 3427468 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 323536 kB
VmallocChunk: 34359412360 kB
HardwareCorrupted: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 272384 kB
DirectMap2M: 3919872 kB
CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 10, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1
Memory: 4k page, physical 4054828k(176928k free), swap 11876348k(11687616k free)
vm_info: OpenJDK 64-Bit Server VM (19.0-b09) for linux-amd64 JRE (1.6.0_20-b20), built on Feb 23 2011 09:05:53 by "buildd" with gcc 4.4.5
time: Mon Jun 6 22:24:11 2011
elapsed time: 2076 seconds
As Stéphane says, try different JREs to see if you can get a different error message. There's a chance (but hard to quantify) that this is related to reaching a memory limit, but it'll be hard to be sure unless you do get an error saying which one!
Use sun/oracle java jdk, not the open jdk...
Regards, Stéphane
Since it is most likely a bug in the JVM, the first thing I would try is updating your JVM to Java 6 update 25. You could try the Sun/Oracle JVM, but it likely to be the same.
I am assuming you are not using an JNI libraries?
精彩评论