Analyzing thread dump
Thread dump analysis is one of the more important techniques of troubleshooting. The Java language is designed as a multi-threaded language. Many business-critical Java applications are designed as to run in multiple threads. This way, your program can perform many different tasks simultaneously. For example, connecting to database, fetching data, processing algorithms, and so on. All these tasks can be performed without waiting on finishing the previous task as each task can run in its own thread. Hence, thread dump can give us a snapshot of each thread’s current execution step in the JVM. It can provide some information about each thread like, such as its id
, name
, current state
, and call stack
. The call stack
can give us information about the monitor it has locked on as well as if that thread is waiting on other monitor to be released. This can expose the problematic areas that are causing various problems like deadlock. If you don't know what deadlock is, let’s...