How do I analyze a Java thread dump or javacore?

Solution Verified - Updated

Environment

  • OpenJDK
  • Oracle (Sun) JDK
  • IBM JDK

Issue

  • How do I analyze a Java thread dump?
  • How do I analyze a javacore?
  • Is there any good Java thread dump browser?

Resolution

For OpenJDK or Oracle JDK thread dumps:

For IBM javacore files:

For JBoss/Tomcat thread dumps, Content from github.com is not included.Yatda can provide informative thread dump summaries focusing on threads from the server's request thread pool or boot thread pool.

Most profilers have a feature to generate and browse thread dumps in runtime. For example:

Typically garbage collection logging is enabled and analyzed for the same time period as the thread dumps because garbage collection and threading are directly related. See How do I enable Java garbage collection logging? and How do I analyze Java garbage collection logging?.

Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.