[讨论] java.lang.OutOfMemoryError: for Chunk::new. Out of swap 大家遇到过类似的jvm错吗
jjshanwei
2012-01-18
我有个应用每隔几天莫名奇妙的是java进程突然内存占用高达7G多,然后jvm就会挂掉! 通过分析gc日志,java堆,gc都很正常。报如下错误:
# A fatal error has been detected by the Java Runtime Environment: # # java.lang.OutOfMemoryError: requested 8589934608 bytes for Chunk::new. Out of swap space? # # Internal Error (allocation.cpp:215), pid=12048, tid=1102043456 # Error: Chunk::new # # JRE version: 6.0_22-b04 # Java VM: Java HotSpot(TM) 64-Bit Server VM (17.1-b03 mixed mode linux-amd64 compressed oops) 系统: OS:CentOS release 5.6 (Final) Linux 2.6.18-238.12.1.el5 vm参数: -server -Xms1g -Xmx1g -XX:+AlwaysPreTouch -XX:NewSize=384m -XX:MaxNewSize=384m -XX:PermSize=128m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=8 -XX:MaxTenuringThreshold=8 -XX:+DisableExplicitGC -XX:+ExplicitGCInvokesConcurrent -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -Xloggc:/opt/tomcat7_leaguelib-web/logs/gc.log 烦请各位指点,这个是不是触发了jvm的某个bug? |
|
jjshanwei
2012-01-18
crash 日志:
--------------- T H R E A D --------------- Current thread (0x0000000050a97000): JavaThread "CompilerThread1" daemon [_thread_in_native, id=12068, stack(0x00000000419fd000,0x0000000041afe000)] Stack: [0x00000000419fd000,0x0000000041afe000], sp=0x0000000041af76a0, free space=3e90000000000000018k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x7306a0] V [libjvm.so+0x2f31e8] V [libjvm.so+0x1e1d71] V [libjvm.so+0x1e2341] V [libjvm.so+0x628ce7] V [libjvm.so+0x628aa9] V [libjvm.so+0x62b213] V [libjvm.so+0x62ac2d] V [libjvm.so+0x2b5193] V [libjvm.so+0x2b18e3] V [libjvm.so+0x23b3b6] V [libjvm.so+0x2bb028] V [libjvm.so+0x2ba95e] V [libjvm.so+0x6f49f9] V [libjvm.so+0x6ee4e2] V [libjvm.so+0x5f816f] Current CompileTask: C2:1853 ! org.apache.catalina.servlets.DefaultServlet.serveResource(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Z)V (1251 bytes) --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x00002aaac02d3000 JavaThread ""http-apr-11029"-exec-46" daemon [_thread_blocked, id=16978, stack(0x0000000044e89000,0x0000000044f8a000)] 0x00002aaac0fbd800 JavaThread ""http-apr-11029"-exec-45" daemon [_thread_blocked, id=16977, stack(0x0000000043772000,0x0000000043873000)] 0x00002aaac13fc800 JavaThread ""http-apr-11029"-exec-44" daemon [_thread_blocked, id=16976, stack(0x0000000044b86000,0x0000000044c87000)] 0x00002aaac13fc000 JavaThread ""http-apr-11029"-exec-43" daemon [_thread_blocked, id=16975, stack(0x0000000043f7a000,0x000000004407b000)] 0x00002aaac13c2800 JavaThread ""http-apr-11029"-exec-42" daemon [_thread_blocked, id=24022, stack(0x000000004336e000,0x000000004346f000)] 0x00002aaac13c1800 JavaThread ""http-apr-11029"-exec-41" daemon [_thread_in_Java, id=24021, stack(0x0000000043671000,0x0000000043772000)] 0x00000000516f0000 JavaThread ""http-apr-11029"-exec-40" daemon [_thread_blocked, id=24020, stack(0x0000000043570000,0x0000000043671000)] 0x00000000516ef800 JavaThread ""http-apr-11029"-exec-39" daemon [_thread_blocked, id=24019, stack(0x0000000044a85000,0x0000000044b86000)] 0x0000000053cd6800 JavaThread "transcoder-1-1" [_thread_blocked, id=15050, stack(0x000000004508b000,0x000000004518c000)] 0x0000000051715800 JavaThread "MySQL Statement Cancellation Timer" daemon [_thread_blocked, id=12242, stack(0x0000000045893000,0x0000000045994000)] 0x0000000050b16000 JavaThread "Thread-17" daemon [_thread_blocked, id=12241, stack(0x0000000045792000,0x0000000045893000)] 0x0000000050b15800 JavaThread "Thread-16" daemon [_thread_blocked, id=12240, stack(0x0000000045691000,0x0000000045792000)] 0x0000000053fa5000 JavaThread "Prototyper" daemon [_thread_blocked, id=12176, stack(0x0000000045590000,0x0000000045691000)] 0x0000000052261800 JavaThread "HouseKeeper" daemon [_thread_blocked, id=12175, stack(0x000000004548f000,0x0000000045590000)] 0x0000000053288000 JavaThread "Thread-13" daemon [_thread_blocked, id=12174, stack(0x000000004538e000,0x000000004548f000)] 0x00000000510f7800 JavaThread "Thread-12" daemon [_thread_blocked, id=12173, stack(0x000000004528d000,0x000000004538e000)] 0x0000000050c6b800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=12163, stack(0x000000004518c000,0x000000004528d000)] 0x0000000052010800 JavaThread ""http-apr-11029"-exec-35" daemon [_thread_blocked, id=12149, stack(0x0000000044d88000,0x0000000044e89000)] 0x0000000052b5a000 JavaThread ""http-apr-11029"-exec-30" daemon [_thread_blocked, id=12144, stack(0x0000000044883000,0x0000000044984000)] 0x00000000523b5800 JavaThread ""http-apr-11029"-exec-28" daemon [_thread_blocked, id=12142, stack(0x0000000044681000,0x0000000044782000)] 0x0000000051f7f800 JavaThread ""http-apr-11029"-exec-24" daemon [_thread_blocked, id=12138, stack(0x000000004427d000,0x000000004437e000)] 0x000000005147f800 JavaThread ""http-apr-11029"-exec-23" daemon [_thread_blocked, id=12137, stack(0x000000004417c000,0x000000004427d000)] 0x000000005147d800 JavaThread ""http-apr-11029"-exec-22" daemon [_thread_blocked, id=12136, stack(0x000000004407b000,0x000000004417c000)] 0x000000005143e800 JavaThread ""http-apr-11029"-exec-19" daemon [_thread_blocked, id=12133, stack(0x0000000043d78000,0x0000000043e79000)] 0x00000000538a3800 JavaThread ""http-apr-11029"-exec-17" daemon [_thread_blocked, id=12131, stack(0x0000000043b76000,0x0000000043c77000)] 0x0000000050f39000 JavaThread ""http-apr-11029"-exec-15" daemon [_thread_blocked, id=12129, stack(0x0000000043974000,0x0000000043a75000)] 0x0000000050c5b800 JavaThread ""http-apr-11029"-AsyncTimeout" daemon [_thread_blocked, id=12114, stack(0x0000000042d68000,0x0000000042e69000)] 0x0000000051089800 JavaThread ""http-apr-11029"-Acceptor-0" daemon [_thread_in_native, id=12113, stack(0x0000000042c67000,0x0000000042d68000)] 0x0000000050ffd000 JavaThread ""http-apr-11029"-Sendfile-0" daemon [_thread_blocked, id=12112, stack(0x0000000042b66000,0x0000000042c67000)] 0x000000005116e000 JavaThread ""http-apr-11029"-CometPoller-0" daemon [_thread_blocked, id=12111, stack(0x0000000042a65000,0x0000000042b66000)] 0x0000000051175000 JavaThread ""http-apr-11029"-Poller-0" daemon [_thread_blocked, id=12110, stack(0x0000000042964000,0x0000000042a65000)] 0x00002aaab4402800 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=12109, stack(0x00000000406d1000,0x00000000407d2000)] 0x00002aaab44cd800 JavaThread "jsbf-cacheManagerTask" daemon [_thread_blocked, id=12108, stack(0x00000000412fd000,0x00000000413fe000)] 0x0000000053f9d000 JavaThread "defaultTaskScheduler-3" [_thread_blocked, id=12107, stack(0x0000000042863000,0x0000000042964000)] 0x0000000052552800 JavaThread "defaultTaskScheduler-2" [_thread_blocked, id=12106, stack(0x0000000042762000,0x0000000042863000)] 0x0000000053ba3800 JavaThread "defaultTaskScheduler-1" [_thread_blocked, id=12105, stack(0x0000000040b65000,0x0000000040c66000)] 0x00002aaab4a1f000 JavaThread "Memcached IO over {MemcachedConnection to /10.0.0.112:11211 /10.0.0.227:11211 /10.0.0.226:11211 /10.0.0.217:11211 /10.0.0.159:11211 /10.0.0.116:11211 /10.0.0.115:11211 /10.0.0.114:11211}" [_thread_in_native, id=12104, stack(0x0000000040a64000,0x0000000040b65000)] 0x000000005391a000 JavaThread "Memcached IO over {MemcachedConnection to /10.0.0.112:11211 /10.0.0.227:11211 /10.0.0.226:11211 /10.0.0.217:11211 /10.0.0.159:11211 /10.0.0.116:11211 /10.0.0.115:11211 /10.0.0.114:11211}" [_thread_in_native, id=12103, stack(0x0000000040963000,0x0000000040a64000)] 0x0000000051881000 JavaThread "Memcached IO over {MemcachedConnection to /10.0.0.112:11211 /10.0.0.227:11211 /10.0.0.226:11211 /10.0.0.217:11211 /10.0.0.159:11211 /10.0.0.116:11211 /10.0.0.115:11211 /10.0.0.114:11211}" [_thread_in_native, id=12102, stack(0x0000000040419000,0x000000004051a000)] 0x0000000050ce9800 JavaThread "GC Daemon" daemon [_thread_blocked, id=12071, stack(0x0000000040d6c000,0x0000000040e6d000)] 0x0000000050a99000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=12069, stack(0x0000000042560000,0x0000000042661000)] =>0x0000000050a97000 JavaThread "CompilerThread1" daemon [_thread_in_native, id=12068, stack(0x00000000419fd000,0x0000000041afe000)] 0x0000000050a92000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=12067, stack(0x00000000418fc000,0x00000000419fd000)] 0x0000000050a8f800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=12066, stack(0x00000000417fb000,0x00000000418fc000)] 0x0000000050a8d800 JavaThread "Surrogate Locker Thread (CMS)" daemon [_thread_blocked, id=12065, stack(0x00000000416fa000,0x00000000417fb000)] 0x0000000050a6f000 JavaThread "Finalizer" daemon [_thread_blocked, id=12064, stack(0x000000004245f000,0x0000000042560000)] 0x0000000050a67800 JavaThread "Reference Handler" daemon [_thread_blocked, id=12063, stack(0x000000004235e000,0x000000004245f000)] 0x000000005090f800 JavaThread "main" [_thread_in_native, id=12050, stack(0x0000000040f4d000,0x000000004104e000)] Other Threads: 0x0000000050a63000 VMThread [stack: 0x000000004225d000,0x000000004235e000] [id=12062] 0x0000000050aa4800 WatcherThread [stack: 0x0000000042661000,0x0000000042762000] [id=12070] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap par new generation total 353920K, used 38357K [0x00000000b8000000, 0x00000000d0000000, 0x00000000d0000000) eden space 314624K, 10% used [0x00000000b8000000, 0x00000000ba182ec8, 0x00000000cb340000) from space 39296K, 10% used [0x00000000cb340000, 0x00000000cb7328a8, 0x00000000cd9a0000) to space 39296K, 0% used [0x00000000cd9a0000, 0x00000000cd9a0000, 0x00000000d0000000) concurrent mark-sweep generation total 655360K, used 29094K [0x00000000d0000000, 0x00000000f8000000, 0x00000000f8000000) concurrent-mark-sweep perm gen total 131072K, used 58707K [0x00000000f8000000, 0x0000000100000000, 0x0000000100000000) Dynamic libraries: 40000000-40009000 r-xp 00000000 fd:00 28579609 /usr/java/jdk1.6.0_22/bin/java 40108000-4010a000 rwxp 00008000 fd:00 28579609 /usr/java/jdk1.6.0_22/bin/java 40318000-40319000 ---p 40318000 00:00 0 40319000-40419000 rwxp 40319000 00:00 0 40419000-4041c000 ---p 40419000 00:00 0 4041c000-4051a000 rwxp 4041c000 00:00 0 406d1000-406d4000 ---p 406d1000 00:00 0 406d4000-407d2000 rwxp 406d4000 00:00 0 40862000-40863000 ---p 40862000 00:00 0 40863000-40963000 rwxp 40863000 00:00 0 40963000-40966000 ---p 40963000 00:00 0 40966000-40a64000 rwxp 40966000 00:00 0 40a64000-40a67000 ---p 40a64000 00:00 0 40a67000-40b65000 rwxp 40a67000 00:00 0 40b65000-40b68000 ---p 40b65000 00:00 0 40b68000-40c66000 rwxp 40b68000 00:00 0 40c66000-40c69000 ---p 40c66000 00:00 0 40c69000-40d67000 rwxp 40c69000 00:00 0 40d6c000-40d6f000 ---p 40d6c000 00:00 0 40d6f000-40e6d000 rwxp 40d6f000 00:00 0 40f4d000-40f50000 ---p 40f4d000 00:00 0 40f50000-4104e000 rwxp 40f50000 00:00 0 4104e000-41051000 ---p 4104e000 00:00 0 41051000-4114f000 rwxp 41051000 00:00 0 |
|
RednaxelaFX
2012-01-18
啊,这问题之前貌似见过。
如果这问题会稳定重现的话,试试加一个参数, -XX:CompileCommand=exclude,org/apache/catalina/servlets/DefaultServlet,serveResource 来看看。 |
|
xiaoyu
2012-01-18
RednaxelaFX 写道 啊,这问题之前貌似见过。
如果这问题会稳定重现的话,试试加一个参数, -XX:CompileCommand=exclude,org/apache/catalina/servlets/DefaultServlet,serveResource 来看看。 , 只是跳过会有点性能损耗呀. http://bugs.sun.com/view_bug.do?bug_id=6973402 升级吧(不过估计还会有其他的问题...要不请学RednaxelaFX他们,自己编译JDK.自己打补丁..) |
|
jjshanwei
2012-01-18
这个是jvm 在jit编译时出的问题吗?
我们有很多应用都跑在相同版本1.6.0_22的jre上,就其中一个经常性的出这个错,其他的都很正常! |