debugging Java synchronization
As suggested here you could (if you run the Sun JVM) perform the following steps:
- launch jconsole or jvisualvm (both present in the bin-directory of your JDK-installation,
- attach to the process you suspect has locked up
- go to the Threads pane. There is a "Detect Deadlock" button
You can show the state of object monitors in Eclipse's debugger. You can find a short, clear tutorial here. For each thread, Eclipse can show you the monitors the thread owns and those it is waiting for.
Update 2020-01-20: The link above no longer works. Here's a link to cached version on the Internet Archive.