To troubleshoot a production problem, you might have to analyze multiple snapshots of thread dumps captured at periodic intervals. Each snapshot of thread tends to contain hundreds of threads, sometimes even thousands of threads. Each thread in the thread dump can be in one of the six states:
If you can visualize all the threads states across all the thread dumps snapshots in one single concise view, troubleshooting them may become easier.
‘Thread states’ in the comparative summary report of the fastThread application provides you, this one single concise view.
How to understand the Thread states section?
Thread Name Column
The leftmost column (i.e., ‘Thread’ column) in the table shows the threads’ name. Sometimes thread names can be very long.
In those circumstances, only the initial few characters of the thread’s name will be printed on the table.
To see the thread’s complete name, you can hover the mouse on the name of the thread. A tooltip will pop-up to indicate the full name of the column.
Thread States columns
Suppose if you have uploaded 5 thread dumps, then you will see 5 thread dump columns next to the ‘Thread Name’ column. In these columns, you will be able to see the thread’s state.
Fig: Thread states and their colors
Each thread state is given a particular color, as shown above. Based on the thread state in each thread dump, an appropriate colored cell is printed on the table. When you hover on the cell, a tooltip will pop-up indicating the state of the thread.
Fig: Thread search results page
If you want to see the complete details about the thread in all the thread dumps, you can click on the name of the thread. When you click on it, you will be taken to a new thread search results page. In this page, you will be able to see the thread’s stack trace, thread native Id, thread Id, thread state, locks held by this thread, locks for which this thread is waiting, and a lot more information.
Fig: ‘See all threads’ hyperlink at the bottom of the table
In the ‘Comparative Summary’ page of the fastThread application, only 10 threads states are shown. If you would like to see all the threads states then you need to click on the ‘See all threads>>’ hyperlink at the bottom of the table. When you click on the hyperlink, it will open up a new page where you will be able to see all the threads and their corresponding states in each of the thread dumps.