jvm假死现场求大神分析

ahdkk 发布于 2016/10/09 10:57
阅读 4K+
收藏 2

纯Java程序跑的都是线程,没有tomcat,java进程还在,线程也正常,也没有抛出OOM,就是jvm的GC不再回收内存,整个程序假死,通过MAT分析看到了大量的"java.lang.ref.Finalizer"占用内存,求大神帮助分析分析。

假死现场如下:

1.系统内存:

2.jvm相关现场:

MAT分析的部分截图:




补充:有人说要jstack 的详细情况如下:

[root@data2 ~]# jstack 3261
2016-10-09 14:50:04
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.101-b13 mixed mode):


"Attach Listener" #109 daemon prio=9 os_prio=0 tid=0x00007f3840001000 nid=0x6349 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"pool-1-thread-20" #107 prio=5 os_prio=0 tid=0x00007f37c0007000 nid=0xe1e waiting on condition [0x00007f37126e7000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cd680c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"pool-1-thread-21" #108 prio=5 os_prio=0 tid=0x00007f37d8006000 nid=0xe1d waiting on condition [0x00007f37127e8000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cd680c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"pool-1-thread-19" #106 prio=5 os_prio=0 tid=0x00007f37a8026800 nid=0xe1c waiting on condition [0x00007f37128e9000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cd680c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"pool-1-thread-16" #99 prio=5 os_prio=0 tid=0x00007f37b0004000 nid=0xe1b waiting on condition [0x00007f37129ea000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cd680c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"pool-1-thread-14" #100 prio=5 os_prio=0 tid=0x00007f37a400f000 nid=0xe1a waiting on condition [0x00007f3712aeb000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cd680c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"pool-1-thread-12" #101 prio=5 os_prio=0 tid=0x00007f37a000f000 nid=0xe19 waiting on condition [0x00007f3712bec000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cd680c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"pool-1-thread-17" #102 prio=5 os_prio=0 tid=0x00007f37b400a800 nid=0xe18 waiting on condition [0x00007f3712ced000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cd680c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"pool-1-thread-15" #103 prio=5 os_prio=0 tid=0x00007f37ac015800 nid=0xe17 waiting on condition [0x00007f3712dee000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cd680c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"pool-1-thread-13" #104 prio=5 os_prio=0 tid=0x00007f37bc00c800 nid=0xe16 waiting on condition [0x00007f3712eef000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cd680c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"pool-1-thread-18" #105 prio=5 os_prio=0 tid=0x00007f37b800c800 nid=0xe15 waiting on condition [0x00007f3712ff0000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cd680c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"drools-worker-3" #76 daemon prio=5 os_prio=0 tid=0x00007f37d8001000 nid=0xd5e waiting on condition [0x00007f37f4975000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cc803cd0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"drools-worker-2" #74 daemon prio=5 os_prio=0 tid=0x00007f37a000a000 nid=0xd5d waiting on condition [0x00007f37f4a76000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cc803cd0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"drools-worker-1" #75 daemon prio=5 os_prio=0 tid=0x00007f37b8002800 nid=0xd5c waiting on condition [0x00007f37f4b77000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cc803cd0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


"nioEventLoopGroup-2-1" #33 prio=10 os_prio=0 tid=0x00007f37f09ad800 nid=0xd32 runnable [0x00007f37f7afb000]
   java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000005cc806650> (a io.netty.channel.nio.SelectedSelectionKeySet)
- locked <0x00000005cc806670> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000005cc806608> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:596)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:306)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:794)
at java.lang.Thread.run(Thread.java:745)


"DestroyJavaVM" #29 prio=5 os_prio=0 tid=0x00007f38c8008800 nid=0xcbf waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"Thread-3" #24 prio=5 os_prio=0 tid=0x00007f38c8548800 nid=0xd29 in Object.wait() [0x00007f38442a2000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000005cc7ea5b0> (a io.netty.channel.AbstractChannel$CloseFuture)
at java.lang.Object.wait(Object.java:502)
at io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:247)
- locked <0x00000005cc7ea5b0> (a io.netty.channel.AbstractChannel$CloseFuture)
at io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:129)
at io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:28)
at io.netty.util.concurrent.DefaultPromise.sync(DefaultPromise.java:211)
at io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.java:117)
at io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.java:28)
at cn.cstor.cproc.server.http.HttpServer.run(HttpServer.java:47)
at java.lang.Thread.run(Thread.java:745)


"Druid-ConnectionPool-Destroy-743778731" #23 daemon prio=5 os_prio=0 tid=0x00007f38c8b48800 nid=0xcec waiting on condition [0x00007f38445a3000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:1942)


"Druid-ConnectionPool-Create-743778731" #22 daemon prio=5 os_prio=0 tid=0x00007f38c8b43800 nid=0xceb waiting on condition [0x00007f38446a4000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00000005cc282a38> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1868)


"Abandoned connection cleanup thread" #21 daemon prio=5 os_prio=0 tid=0x00007f38c8b07000 nid=0xcea in Object.wait() [0x00007f3858155000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
- locked <0x00000005ccf5a018> (a java.lang.ref.ReferenceQueue$Lock)
at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:41)


"commons-pool-EvictionTimer" #20 daemon prio=5 os_prio=0 tid=0x00007f38c8ab3000 nid=0xce9 in Object.wait() [0x00007f38449a5000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.util.TimerThread.mainLoop(Timer.java:552)
- locked <0x00000005cc22dbf0> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:505)


"Service Thread" #17 daemon prio=9 os_prio=0 tid=0x00007f38c8101000 nid=0xce3 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C1 CompilerThread11" #16 daemon prio=9 os_prio=0 tid=0x00007f38c80f5800 nid=0xce2 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C1 CompilerThread10" #15 daemon prio=9 os_prio=0 tid=0x00007f38c80f3800 nid=0xce1 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C1 CompilerThread9" #14 daemon prio=9 os_prio=0 tid=0x00007f38c80f1800 nid=0xce0 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C1 CompilerThread8" #13 daemon prio=9 os_prio=0 tid=0x00007f38c80ef000 nid=0xcdf waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C2 CompilerThread7" #12 daemon prio=9 os_prio=0 tid=0x00007f38c80ed000 nid=0xcde waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C2 CompilerThread6" #11 daemon prio=9 os_prio=0 tid=0x00007f38c80ea800 nid=0xcdd waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C2 CompilerThread5" #10 daemon prio=9 os_prio=0 tid=0x00007f38c80e8800 nid=0xcdc waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C2 CompilerThread4" #9 daemon prio=9 os_prio=0 tid=0x00007f38c80de800 nid=0xcdb waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C2 CompilerThread3" #8 daemon prio=9 os_prio=0 tid=0x00007f38c80dc000 nid=0xcda waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C2 CompilerThread2" #7 daemon prio=9 os_prio=0 tid=0x00007f38c80da000 nid=0xcd9 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C2 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x00007f38c80d8000 nid=0xcd8 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x00007f38c80d5000 nid=0xcd7 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007f38c80d3800 nid=0xcd6 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE


"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f38c80a0800 nid=0xcd4 in Object.wait() [0x00007f386d3e5000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
- locked <0x00000005cc21c738> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)


"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007f38c809c000 nid=0xcd3 in Object.wait() [0x00007f386d4e6000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
- locked <0x00000005cc22dbe0> (a java.lang.ref.Reference$Lock)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)


"VM Thread" os_prio=0 tid=0x00007f38c8094000 nid=0xcd2 runnable 


"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00007f38c801e000 nid=0xcc0 runnable 


"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00007f38c801f800 nid=0xcc1 runnable 


"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00007f38c8021800 nid=0xcc2 runnable 


"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00007f38c8023000 nid=0xcc3 runnable 


"GC task thread#4 (ParallelGC)" os_prio=0 tid=0x00007f38c8025000 nid=0xcc4 runnable 


"GC task thread#5 (ParallelGC)" os_prio=0 tid=0x00007f38c8027000 nid=0xcc5 runnable 


"GC task thread#6 (ParallelGC)" os_prio=0 tid=0x00007f38c8028800 nid=0xcc6 runnable 


"GC task thread#7 (ParallelGC)" os_prio=0 tid=0x00007f38c802a800 nid=0xcc7 runnable 


"GC task thread#8 (ParallelGC)" os_prio=0 tid=0x00007f38c802c800 nid=0xcc8 runnable 


"GC task thread#9 (ParallelGC)" os_prio=0 tid=0x00007f38c802e000 nid=0xcc9 runnable 


"GC task thread#10 (ParallelGC)" os_prio=0 tid=0x00007f38c8030000 nid=0xcca runnable 


"GC task thread#11 (ParallelGC)" os_prio=0 tid=0x00007f38c8032000 nid=0xccb runnable 


"GC task thread#12 (ParallelGC)" os_prio=0 tid=0x00007f38c8033800 nid=0xccc runnable 


"GC task thread#13 (ParallelGC)" os_prio=0 tid=0x00007f38c8035800 nid=0xccd runnable 


"GC task thread#14 (ParallelGC)" os_prio=0 tid=0x00007f38c8037000 nid=0xcce runnable 


"GC task thread#15 (ParallelGC)" os_prio=0 tid=0x00007f38c8039000 nid=0xccf runnable 


"GC task thread#16 (ParallelGC)" os_prio=0 tid=0x00007f38c803b000 nid=0xcd0 runnable 


"GC task thread#17 (ParallelGC)" os_prio=0 tid=0x00007f38c803c800 nid=0xcd1 runnable 


"VM Periodic Task Thread" os_prio=0 tid=0x00007f38c8103800 nid=0xce4 waiting on condition 


JNI global references: 305

加载中
0
whaon
whaon
free内存为0?
ahdkk
ahdkk
这个不碍事
0
mycms2013
mycms2013
你把jstack的详细信息在打印一下,不要使用参数-F
ahdkk
ahdkk
我打印了补充在问题的最下边了
0
mycms2013
mycms2013
初步判断是你使用druid去访问数据库的时候问题,你看你mysql的连接总数,是不是打满了。然后在把你用linux的版本和jvm的版本,都给说一下,你加我qq我给你分析一下:845885222
ahdkk
ahdkk
加你qq了,你可以远程看看
0
阿_嚏
阿_嚏

http://it.deepinmind.com/gc/2014/05/13/debugging-to-understand-finalizer.html

我怎么感觉你的问题跟这篇文章说的很像,希望有所帮助

ahdkk
ahdkk
这个我也找到了,但是我没有重写任何finalize(),还是有点不一样
0
颓废的幻想者
颓废的幻想者
你这种情况肯定是 频繁创建对象导致,首先知道 finalizer 这个函数是相当于挽救 被回收对象的时候调用,给他们一个机会不被回收,待回收的对象会放到一个F-Queue 里。F-Queue里的,不是对象本身,而是一个 Finalizer 对象,当一些特殊情况下,比如在一个循环里,不停的创建对象,创建完了没有其他任何的引用,这样,这些对象都被标记为可回收的状态,会有很多的 Finalizer 对象存在,而处理 Finalizer 对象的线程比主线程的优先级要低,创建的速度大于了回收的速度,可能会积攒很多 Finalizer 对象在内存里,这个时候是有可能内存溢出的
ahdkk
ahdkk
你是看了有一篇博客吧,我一开始也这么认为,但是我的没有oom
0
颓废的幻想者
颓废的幻想者
可以把 代码发出来看看 应该是有缺陷
ahdkk
ahdkk
我会把核心的worker方法贴到问题的最下面的
0
sxgkwei
sxgkwei
感觉是写的代码有问题啊。
ahdkk
ahdkk
我会把核心的run方法贴到问题的最下面的
0
Gillian_Male
Gillian_Male

1,查看以下你的进程是否占用过高的cpu资源;2,如果过高,根据进程id查看cpu使用率较高的几个线程,把线程号转成16进制,对比线程栈里的nid,看看具体是哪段代码有问题。3,按道理说,应该是代码层面的问题,不好确定

0
巴林的狗尾草
巴林的狗尾草
感觉你们都跑偏了,既然是假死,首先把进程状态打印出来,使用jconsole或者什么工具,看下你的线程哪些线程现在是block的,还有你说GC停了,上面的东西没法判断GC是不是停了,至于你那个占用内存。。。25.8M,你确定很占内存?
巴林的狗尾草
巴林的狗尾草
回复 @ahdkk : 25.8的内存占用,其实就是图片上面显示的那个finalizer的引用,我觉着不多,现在具体的表现是啥?程序启动之后CPU跑满?load average具体数值是多少?100%(按照核数可以变大的),然后假死的现象是什么?怎么判断的?日志中断了么?多加些日志看看线程是死了么?从你截图还有jvm的状态都没有看到什么问题。
ahdkk
ahdkk
1.当程序停下的时候cpu使用量很低很低,我看过 2.没有现成block,上面贴的有线程状态,可以看到 3.我没说内存占用高,只是MAT的分析结果显示gc守护现成的占用比例较高
0
f
freezingsky
我看到大量的blockingQueue操作,这一块的代码实现是基本 自旋锁完成的。不知道是不是使用不当,造成CPU长期空载。
返回顶部
顶部