 <p>One way is to wait until the infinite loop shows up, then use <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/share/jstack.html" rel="nofollow"><code>jstack -l &lt;pid&gt;</code></a> to get a stack dump, and analyze that.</p> <p>With a modicum of luck, this should suggest some lines of further inquiry.</p>