Monday, November 03, 2008

Video Tutorial on "Detecting and debugging deadlocks"

In this three minute tutorial I'm presenting how to detect and debug Java deadlocks in runtime while having access to the application console. Code for the example can be copy-pasted from the previous post. Remember: to dump the thread stack you have to press Ctrl+Break on Windows and Ctrl+\ on Linux.


More information on this subject can be found here:

Please share your opinions in the comments zone.

2 comments:

Anonymous said...

Please explain jps and jstack as well.
The console is not needed for these tools.
Use jps -lm to get a list of running java processes and jstack pid to create a thread dump.

Przemysław Bielicki said...

Thanks for the info. Maybe I will make a second part of this tutorial someday and explain how to use jps and jstack.