0 Replies Latest reply: Jun 26, 2013 6:28 PM by user12200443 RSS

    Threading / stack dump question

    user12200443

      How do I read a thread dump to see if there is a blocked thread/concurrency issue?

       

      I have the thread dump below from jstack.  Is there something that should jump out at me showing a deadlock?

       

      --- thread dump

      2013-06-26 17:20:20
      Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.45-b01 mixed mode):
      
      "Attach Listener" daemon prio=10 tid=0x00007f9a74001800 nid=0x5eac waiting on condition [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE
      
      "AWT-XAWT" daemon prio=10 tid=0x00007f9a5422f800 nid=0x4ce4 runnable [0x00007f9a4a25d000]
         java.lang.Thread.State: RUNNABLE
           at sun.awt.X11.XToolkit.waitForEvents(Native Method)
           at sun.awt.X11.XToolkit.run(XToolkit.java:579)
           at sun.awt.X11.XToolkit.run(XToolkit.java:543)
           at java.lang.Thread.run(Thread.java:662)
      
      "Java2D Disposer" daemon prio=10 tid=0x00007f9a54042000 nid=0x4ce3 in Object.wait() [0x00007f9a4ad70000]
         java.lang.Thread.State: WAITING (on object monitor)
           at java.lang.Object.wait(Native Method)
           - waiting on  (a java.lang.ref.ReferenceQueue$Lock)
           at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
           - locked  (a java.lang.ref.ReferenceQueue$Lock)
           at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
           at sun.java2d.Disposer.run(Disposer.java:127)
           at java.lang.Thread.run(Thread.java:662)
      
      "rewardSystem-scheduler-1" prio=10 tid=0x00007f9a9cf2b000 nid=0x4ce0 waiting on condition [0x00007f9a9857b000]
         java.lang.Thread.State: TIMED_WAITING (sleeping)
           at java.lang.Thread.sleep(Native Method)
           at java.lang.Thread.sleep(Thread.java:302)
           at org.jboss.netty.akka.util.HashedWheelTimer$Worker.waitForNextTick(HashedWheelTimer.java:403)
           at org.jboss.netty.akka.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:319)
           at java.lang.Thread.run(Thread.java:662)
      
      "rewardSystem-akka.actor.default-dispatcher-2" prio=10 tid=0x00007f9a9c0fe000 nid=0x4cde waiting on condition [0x00007f9a9877d000]
         java.lang.Thread.State: WAITING (parking)
           at sun.misc.Unsafe.park(Native Method)
           - parking to wait for   (a akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinPool)
           at akka.jsr166y.ForkJoinPool.scan(ForkJoinPool.java:1594)
           at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1479)
           at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
      
      "Timer-1" daemon prio=10 tid=0x00007f9a9cf65800 nid=0x4cdc in Object.wait() [0x00007f9a9899a000]
         java.lang.Thread.State: TIMED_WAITING (on object monitor)
           at java.lang.Object.wait(Native Method)
           - waiting on  (a java.util.TaskQueue)
           at java.util.TimerThread.mainLoop(Timer.java:509)
           - locked  (a java.util.TaskQueue)
           at java.util.TimerThread.run(Timer.java:462)
      
      "Timer-0" daemon prio=10 tid=0x00007f9a9cf58000 nid=0x4cdb in Object.wait() [0x00007f9a98a9e000]
         java.lang.Thread.State: TIMED_WAITING (on object monitor)
           at java.lang.Object.wait(Native Method)
           - waiting on  (a java.util.TaskQueue)
           at java.util.TimerThread.mainLoop(Timer.java:509)
           - locked  (a java.util.TaskQueue)
           at java.util.TimerThread.run(Timer.java:462)
      
      "Low Memory Detector" daemon prio=10 tid=0x00007f9a9c09f000 nid=0x4cd9 runnable [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE
      
      "C2 CompilerThread1" daemon prio=10 tid=0x00007f9a9c09c800 nid=0x4cd8 waiting on condition [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE
      
      "C2 CompilerThread0" daemon prio=10 tid=0x00007f9a9c099800 nid=0x4cd7 waiting on condition [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE
      
      "Signal Dispatcher" daemon prio=10 tid=0x00007f9a9c097800 nid=0x4cd6 runnable [0x0000000000000000]
         java.lang.Thread.State: RUNNABLE
      
      "Finalizer" daemon prio=10 tid=0x00007f9a9c07b000 nid=0x4cd5 in Object.wait() [0x00007f9aa1056000]
         java.lang.Thread.State: WAITING (on object monitor)
           at java.lang.Object.wait(Native Method)
           - waiting on  (a java.lang.ref.ReferenceQueue$Lock)
           at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
           - locked  (a java.lang.ref.ReferenceQueue$Lock)
           at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
           at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:171)
      
      "Reference Handler" daemon prio=10 tid=0x00007f9a9c079000 nid=0x4cd4 in Object.wait() [0x00007f9aa1157000]
         java.lang.Thread.State: WAITING (on object monitor)
           at java.lang.Object.wait(Native Method)
           - waiting on  (a java.lang.ref.Reference$Lock)
           at java.lang.Object.wait(Object.java:485)
           at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
           - locked  (a java.lang.ref.Reference$Lock)
      
      "main" prio=10 tid=0x00007f9a9c014800 nid=0x4cce waiting on condition [0x00007f9aa2e99000]
         java.lang.Thread.State: WAITING (parking)
           at sun.misc.Unsafe.park(Native Method)
           - parking to wait for   (a java.util.concurrent.CountDownLatch$Sync)
           at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
           at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:207)
           at akka.actor.ActorSystemImpl$TerminationCallbacks.ready(ActorSystem.scala:716)
           at akka.actor.ActorSystemImpl$TerminationCallbacks.ready(ActorSystem.scala:685)
           at akka.dispatch.Await$.ready(Future.scala:64)
           at akka.actor.ActorSystemImpl.awaitTermination(ActorSystem.scala:584)
           at akka.actor.ActorSystemImpl.awaitTermination(ActorSystem.scala:585)
           at ad.analytics.merchant.service.impl.concurrency.ConcurrentReportGeneratorServiceImpl.generateReports(ConcurrentReportGeneratorServiceImpl.java:64)
           at ad.analytics.merchant.service.impl.MerchantRewardReportServiceImpl.createReports(MerchantRewardReportServiceImpl.java:45)
           at ad.analytics.command.reward.MerchantRewardCommand.execute(MerchantRewardCommand.java:69)
           at ad.analytics.cli.RewardCli.main(RewardCli.java:106)
      
      "VM Thread" prio=10 tid=0x00007f9a9c072800 nid=0x4cd3 runnable 
      
      "GC task thread#0 (ParallelGC)" prio=10 tid=0x00007f9a9c027800 nid=0x4ccf runnable 
      
      "GC task thread#1 (ParallelGC)" prio=10 tid=0x00007f9a9c029800 nid=0x4cd0 runnable 
      
      "GC task thread#2 (ParallelGC)" prio=10 tid=0x00007f9a9c02b000 nid=0x4cd1 runnable 
      
      "GC task thread#3 (ParallelGC)" prio=10 tid=0x00007f9a9c02d000 nid=0x4cd2 runnable 
      
      "VM Periodic Task Thread" prio=10 tid=0x00007f9a9c0b2000 nid=0x4cda waiting on condition 
      
      JNI global references: 2039