I am debugging a legacy Java application, and the thread dump (obtained via jstack
) contains some entries like the following:
"Thread-8" prio=10 tid=0x0000000055f2c800 nid=0x49bf runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
That's it. No stack trace.
What's going on here? How do I locate the Java code executing in this thread?
To find the long running threads, highlight all the thread dumps you want to check, and then click on the binoculars: In the pop up dialogue, click start detection, and you'll get your long running threads just below the dumps themselves: In my example, each thread dump has 157 threads.
At the same time, we can find these handles in the locked ownable synchronizers of their respective threads. Basically, this means that we can see which locks our threads are waiting for and which thread owns those locks. This helps us troubleshoot concurrency issues including deadlocks.
The thread isn't (or wasn't) executing Java code. It's handling tasks not implemented in Java that weren't directly requested by any Java caller. For example, if the corresponding OS thread just caught a signal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With