Memory Dump Diagnostic for Java™ is an offline tool for diagnosing root causes behind memory leaks in the Java heap. The tool analyzes common formats of memory dumps (heap dumps) from the JVM in which the WebSphere® Application Server runs. The analysis of memory dumps is targeted toward identifying data structures within the Java heap that might be root causes of memory leaks. The analysis also identifies a summarized set of object groups that contribute significantly to the Java heap footprint of the application. The tool is capable of analyzing very large memory dumps from production-environment application servers that exhibit out-of-memory issues. This tool works with the memory dumps that are generated from WebSphere Application Server, not from the Memory Dump Diagnostic for Java tool. The following dump formats are supported:
Memory leaks can occur in Java applications when object references are unintentionally held onto after the references are no longer needed. This problem prevents the Java garbage collection process from freeing memory, even though the Java language has a built-in garbage collection mechanism that frees the programmer from explicit object deallocation responsibilities. Memory leaks are hard to diagnose in large complex Java applications, because of the large number of objects in the Java heap and because of the complex relationships between these objects.
Two types of analysis mechanisms are available: single-dump analysis and the comparative analysis of two dumps. The tool lists suspected data structures and data types and displays contents of the memory dump in an interactive browser-based Web application. The tool shows footprint analysis results in a graphical layout of significant sets of data types that have similar ownership structures. The tool shows the contents of the memory dump in an interactive tree view for browsing and in two table views of objects and data types, respectively. The tree view enables you to look for all incoming and outgoing references for each object and to see the location of a container object within each data structure with a suspected memory leak.
Analyzing memory dumps in an offline fashion provides a low-overhead mechanism for identifying root causes behind memory leaks. This mechanism is particularly suitable for large applications that are running in production or in stress-test environments, where memory leaks are often detected first.
Verbose garbage collection information helps to rule out basic configuration issues and memory-leak issues from fragmentation or native memory leaks. For more information about how to enable verbose garbage collection on IBM platforms, see IBM developer kits: Diagnosis documentation.
Enabling lightweight memory-leak detection can help with early detection of abnormal memory usage behavior and for automatically triggering heap dumps.
Refer to the documentation that is supplied with the tool when you start from IBM Support Assistant.
The possible root causes of memory leaks are identified. Memory leaks in the Java heap produce java.lang.OutOfMemoryError exceptions in log files. However, not all out-of-memory errors are caused by Java heap memory leaks. Out-of-memory errors can also be caused by the following conditions:
For both of these conditions, the out-of-memory error can occur
in spite of large amounts of free Java heap space. Consequently, the Memory
Dump Diagnostic for Java tool might not be effective in determining
root causes in these cases.