Java Reference
In-Depth Information
that you want to calibrate. You can find the Manage Calibration Data option by opening
the Profile menu, then choosing Advanced Commands.
11-6. Obtaining a Thread Dump
Problem
Your program seems to “hang” without doing anything, and you suspect that there
might be a deadlock.
Solution
Use JStack to get a thread dump, and then analyze the thread dump for deadlocks. The
following JStack is a thread dump from the class
org.java8recipes.chapter11.recipe11_06.Recipe 11_6 , which cre-
ates a deadlock:
jstack -l 6557
Found one Java-level deadlock:
=============================
"Thread-0":
waiting for ownable synchronizer 0x000000076ab20da0, (a
java.util.concurrent.locks.ReentrantLock$NonfairSync),
which is held by "main"
"main":
waiting for ownable synchronizer 0x000000076ab20dd0, (a
java.util.concurrent.locks.ReentrantLock$NonfairSync),
which is held by "Thread-0"
Java stack information for the threads listed above:
===================================================
"Thread-0":
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x000000076ab20da0> (a
Search WWH ::




Custom Search