Category thread dump patterns

usainBolt

THREAD DUMP ANALYSIS PATTERN – ATHLETE

Description Threads in ‘runnable’ state consume CPU. So when you are analyzing thread dumps for high CPU consumption, threads in ‘runnable’ state should be thoroughly reviewed. Typically in thread dumps several threads are classified in ‘RUNNABLE’ state. But in reality several of them wouldn’t be actually running, rather they would be just waiting. But still JVM classifies them in ‘RUNNABLE’ state. You […]

shutterstock_138231128

Thread Dump Analysis Pattern – THREAD MILL

Description You might have experienced the application’s CPU to spike up suddenly & spike wouldn’t go down until JVM is recycled. You restart the JVM, after certain time period CPU consumption would once again start to spike up. Then you will have to recycle the JVM once again. Have you experienced it? If you have smile on your […]

traffic_Jam

Thread Dump Analysis Pattern – Traffic Jam

Description Thread-A could have acquired the lock-1 and then would never release it.  Thread-B could have acquired lock-2 and waiting on this lock-1. Thread-C could be waiting to acquire lock-2. This kind of transitive blocks between threads can make entire application unresponsive. See the real-world example below. Example Below is an real-world example taken from a major travel application. Here […]

P1010219

THREAD DUMP ANALYSIS PATTERN – Several Scavengers

Fig: Illustrating too many street cleaners Description Based on the type of GC algorithm (Serial, parallel, G1, CMS) used, default number of garbage collection threads gets created. Details on default number of threads that will be created is documented below. Sometimes too many extraneous GC threads would get created based on the default configuration. We have seen scenarios where 128, […]

circular-deadlock-2

Circular Deadlock

Description Dinning Philosophers is a classic computer science problem that happens in concurrent programming. Dinning philosophers problem will result in circular deadlock problem. Circular deadlock is a variant of deadlock problem. Once deadlock happens, only way to recover from the situation is to restart JVM. Please refer to above diagram. In the diagram you can see […]

deadlock-2

Deadlock

  Description Wikipedia aptly defines deadlock is a situation in which two or more competing actions are each waiting for the other to finish, and thus neither ever does. If deadlock happens in a JVM, only way to recover from the situation is to restart the JVM. Example Here is a sample code which simulates […]

shutterstock_250911328

THREAD DUMP ANALYSIS PATTERN – LEPRECHAUN TRAP

Fig: Leprechaun Trap Description Unlike other objects, GC process will not immediately garbage collect the objects which has finalize method implemented on them, even though there aren’t any active reference to it. Instead as first step, those objects are added to an internal queue of java.lang.ref.Finalizer object. There is a low priority Finalizer thread which […]

shutterstock_79360696

THREAD DUMP ANALYSIS PATTERN – STOCK TICKER

Description In thread dump analysis, one of the key parameter to watch out is: Thread Count. You need to know the application’s thread count consumption under normal scenario. This understanding will help you in following scenarios: 1. To gauge severity of the issue: When application experiences any problem, thread count will help to gauge the severity […]

add (2)

THREAD DUMP ANALYSIS PATTERN – ADDITIVES

Description It’s highly recommended to capture 3 threads dumps in an interval of 10 seconds to uncover any problem in the JVM. If in the 2nd and 3rd thread dump if additional threads starts to go in to a particular state, then those threads and their stack traces has to be studied in detail. It may or […]

shutterstock_240915760

THREAD DUMP ANALYSIS PATTERN – REPETITIVE STRAIN INJURY (RSI)

Description Whenever significant number of threads exhibit same/repetitive stack trace then those stack trace has to be investigated. It may be indicative of performance problems. Whenever there are any performance problems or bottlenecks in the application most of the threads will start to accumulate on the problematic area. Here are few such scenarios: Say your SOR or external service […]

shutterstock_87533230

THREAD DUMP ANALYSIS PATTERN – ALL ROADS LEAD TO ROME

Description If several threads in a thread dump ends up working on one single method, then it might be of concern. Most of the times, if there is a problem (say poorly responding data source, un-relinquished lock, infinite looping threads …) then significant number of threads will end up in one single method. That particular […]

shutterstock_131953838

THREAD DUMP ANALYSIS PATTERN – ATHEROSCLEROSIS

Description If threads are blocking momentarily then it’s not a problem. However if they are blocking for a prolonged period, then it’s of concern. It’s indicative of some problem in the application. Typically blocked threads would make application unresponsive. Threads that remain in same method and in ‘BLOCKED’ state between 3 threads dump which are captured […]