10 Investigating deadlocks with thread dumps
This chapter covers
- Getting thread dumps using a profiler
- Getting thread dumps using the command line
- Reading thread dumps to investigate issues
In this chapter, we’ll discuss using thread dumps to analyze thread execution at a given moment in time. Often, we use thread dumps in situations in which the application becomes unresponsive, such as in the case of a deadlock. A deadlock occurs when multiple threads pause their execution and wait for each other to fulfill a given condition. If hypothetical thread A waits for thread B to do something, and thread B waits for thread A, neither can continue their execution. In such a case, the app, or at least a part of it, will freeze. We need to know how ...
Get Troubleshooting Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.