系统:CentOS5.5 x86
jdk :jdk6-30 x86
tomcat: tomcat6.0.35 for linux
内存:1GB
SWAP:0tongcat中log日志:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb6fd140e, pid=1920, tid=2687040400
#
# JRE version: 6.0_30-b12
# Java VM: Java HotSpot(TM) Client VM (20.5-b03 mixed mode linux-x86 )
# Problematic frame:
# V  [libjvm.so+0x2ac40e]  JVM_ArrayCopy+0xce
#
# An error report file with more information is saved as:
# /opt/www/hs_err_pid1920.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#hs_err_pid1920.log日志:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb6fd140e, pid=1920, tid=2687040400
#
# JRE version: 6.0_30-b12
# Java VM: Java HotSpot(TM) Client VM (20.5-b03 mixed mode linux-x86 )
# Problematic frame:
# V  [libjvm.so+0x2ac40e]  JVM_ArrayCopy+0xce
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#---------------  T H R E A D  ---------------Current thread (0x0981c000):  JavaThread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" daemon [_thread_in_vm, id=1936, stack(0xa023f000,0xa0290000)]siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x00000008---------------  P R O C E S S  ---------------Other Threads:
  0x09112000 VMThread [stack: 0xa0836000,0xa08b7000] [id=1922]
  0x09139000 WatcherThread [stack: 0xa05ae000,0xa062f000] [id=1928]VM state:not at safepoint (normal execution)VM Mutex/Monitor currently owned by a thread: NoneHeap
 def new generation   total 6528K, used 3723K [0xa0ba0000, 0xa12b0000, 0xa60f0000)
  eden space 5824K,  58% used [0xa0ba0000, 0xa0ef0958, 0xa1150000)
  from space 704K,  46% used [0xa1150000, 0xa11a24a8, 0xa1200000)
  to   space 704K,   0% used [0xa1200000, 0xa1200000, 0xa12b0000)
 tenured generation   total 14436K, used 11150K [0xa60f0000, 0xa6f09000, 0xb0ba0000)
   the space 14436K,  77% used [0xa60f0000, 0xa6bd3a18, 0xa6bd3c00, 0xa6f09000)
 compacting perm gen  total 27392K, used 27324K [0xb0ba0000, 0xb2660000, 0xb4ba0000)
   the space 27392K,  99% used [0xb0ba0000, 0xb264f198, 0xb264f200, 0xb2660000)
No shared spaces configured.Code Cache  [0xb4c2f000, 0xb5027000, 0xb6c2f000)
 total_blobs=1706 nmethods=1541 adapters=100 free_code_cache=29408960 largest_free_block=256VM Arguments:
jvm_args: -Djava.util.logging.config.file=/opt/www/tomcat6_1/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/www/tomcat6_1/endorsed -Dcatalina.base=/opt/www/tomcat6_1 -Dcatalina.home=/opt/www/tomcat6_1 -Djava.io.tmpdir=/opt/www/tomcat6_1/temp 
java_command: org.apache.catalina.startup.Bootstrap start
Launcher Type: SUN_STANDARDEnvironment Variables:
JAVA_HOME=/opt/soft/jdk1.6.0_30
CLASSPATH=/opt/www/tomcat6_1/bin/bootstrap.jar
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/soft/jdk1.6.0_30/bin:/home/zoutuo/bin
LD_LIBRARY_PATH=/opt/soft/jdk1.6.0_30/jre/lib/i386/client:/opt/soft/jdk1.6.0_30/jre/lib/i386:/opt/soft/jdk1.6.0_30/jre/../lib/i386
SHELL=/bin/bashSignal Handlers:
SIGSEGV: [libjvm.so+0x469da0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x469da0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x38bdd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x38bdd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGXFSZ: [libjvm.so+0x38bdd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x38bdd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x38f030], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x38ec10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGTERM: [libjvm.so+0x38ec10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x38ec10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
---------------  S Y S T E M  ---------------OS:CentOS release 5.3 (Final)uname:Linux 2.6.32-042stab044.11 #1 SMP Wed Dec 14 16:02:00 MSK 2011 i686
libc:glibc 2.5 NPTL 2.5 
rlimit: STACK 10240k, CORE 0k, NPROC 127162, NOFILE 1024, AS infinity
load average:0.00 0.01 0.00/proc/meminfo:
MemTotal:        1048576 kB
MemFree:          887152 kB
Cached:            48452 kB
Active:           148004 kB
Inactive:           2540 kB
Active(anon):     102088 kB
Inactive(anon):        4 kB
Active(file):      45916 kB
Inactive(file):     2536 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                56 kB
AnonPages:        102092 kB
Shmem:                 4 kB
Slab:               6556 kB
SReclaimable:       3820 kB
SUnreclaim:         2736 kB
CPU:total 1 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3/proc/cpuinfo:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Xeon(R) CPU            5160  @ 3.00GHz
stepping : 6
cpu MHz : 2992.452
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca lahf_lm tpr_shadow
bogomips : 5984.90
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:Memory: 4k page, physical 1048576k(887152k free), swap 0k(0k free)vm_info: Java HotSpot(TM) Client VM (20.5-b03) for linux-x86 JRE (1.6.0_30-b12), built on Nov 10 2011 01:23:40 by "java_re" with gcc 3.2.1-7a (J2SE release)time: Fri Jan 20 21:26:30 2012
elapsed time: 1022 seconds
由于字数限制,删除了上文中部分内容。请问tomcat为什么会挂掉?是运行一段时间后自动挂的我的catalina.properties文件是这样设置的:JAVA_OPTS="-server -Xms800m -Xmx800m  -XX:PermSize=64M -XX:MaxNewSize=256m -XX:MaxPermSize=128m -Djava.awt.headless=true"
请问有什么不妥之处?

解决方案 »

  1.   

    哥 你就直接说看不懂就完了呗,或者说你没遇到过,别上来就说啥也没有,这种不负责任的回答我强烈鄙视。我第一个发的就是挂掉的日志,tomcat的:# # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0xb6fd140e, pid=1920, tid=2687040400 # # JRE version: 6.0_30-b12 # Java VM: Java HotSpot(TM) Client VM (20.5-b03 mixed mode linux-x86 ) # Problematic frame: # V [libjvm.so+0x2ac40e] JVM_ArrayCopy+0xce # # An error report file with more information is saved as: # /opt/www/hs_err_pid1920.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp #
      

  2.   

    兄弟我猜下  是不是你的jre有问题啊
      

  3.   

    这个可能是JVM在优化的时候造成了问题,推荐下面的帖子:
    http://seanhe.iteye.com/blog/905997
      

  4.   

    我用的是jdk6u30版本你好,我看了,我这个错误可能和你的描述有些出入,下面是我的:
    VM_Operation (0x0000000040797d60): ThreadDump, mode: safepoint, requested by thread 0x00007fc61f86d800
      

  5.   

    你好,负载均衡我也想做,可我只有一台机器,而且我试过,不能同时开2个tomcat,只要启动另一个tomcat就出现如下错误:
    Error occurred during initialization of VM
    Could not reserve enough space for code cache
    另外使用java和javac都没有提示,直接就报上面那个错误,一般都会有如下提示:
    Usage: java [-options] class [args...]
               (to execute a class)
       or  java [-options] -jar jarfile [args...]
               (to execute a jar file)where options include:
        -client       to select the "client" VM
        -server       to select the "server" VM
        -hotspot      is a synonym for the "client" VM  [deprecated]
                      The default VM is client.    -cp <class search path of directories and zip/jar files>
        -classpath <class search path of directories and zip/jar files>
                      A ; separated list of directories, JAR archives,
                      and ZIP archives to search for class files.  以下省略N个字使用free命令:
                 total       used       free     shared    buffers     cached
    Mem:       1048576     394088     654488          0          0      47884
    -/+ buffers/cache:     346204     702372
    Swap:            0          0          0我内存还有一大半没有使用,JVM就已经说内存不足了,是怎么回事?我的“tomcat6_1/bin/catalina.sh”里面加了个参数:JAVA_OPTS="-server -Xms128M -Xmx128M -Xss128k -XX:+AggressiveOpts -XX:+UseParallelGC  -XX:+UseBiasedLocking -XX:PermSize=64M -XX:MaxPermSize=128m",我这机器这么配置有什么问题吗?
      

  6.   

    我内存还有一大半没有使用,JVM就已经说内存不足了,是怎么回事?我的“tomcat6_1/bin/catalina.sh”里面加了个参数:JAVA_OPTS="-server -Xms128M -Xmx128M -Xss128k -XX:+AggressiveOpts -XX:+UseParallelGC -XX:+UseBiasedLocking -XX:PermSize=64M -XX:MaxPermSize=128m",我这机器这么配置有什么问题吗?
    =================
    jvm的内存不是你操作系统的内存,
    是不是java某段代码有问题啊,可能是你的某个容器的开辟的空间太小,而你装入的东西超过容器的大小,
      

  7.   

    你好!
    我的容器就是tomcat,而我设置了最大和最小内存是128MB。另外我执行了一个jar文件,最大内存设的是16MB,够小了吧?但我就是执行了这个jar后,java、javac命令都用不了了。
    单独执行tomcat或者单独执行jar,java、javac命令都能正常使用。我也怀疑是JVM的内存原因,但怎么也想不到解决方法!如果我把tomcat的内存设置到512,那我执行jar文件的时候就说没有足够的heap。对于这个问题真是头疼!
      

  8.   

    DDDDDDDDDDDDDDDDDDDDDDDD谁帮着分析下啊