IBM Support

Mustgather: Gathering data for OutOfMemoryErrors on Windows

Troubleshooting


Problem

If your Java application experiences OutOfMemory(OOM) errors on a Windows operating system, there are a number of diagnostic data files that are useful for diagnosing the problem. This mustgather document describes about the diagnostic data files to be collected and the procedure to collect the same.

Resolving The Problem

The following set of diagnostic data files need to be collected to diagnose an OutOfMemory error in the Java application:

1. Javacores (Multiple javacore files might be required to diagnose native memory issues)
2. Core dumps (At least two core dumps might be required to diagnose native memory issues)
3. Heapdumps
4. Snap traces for analyzing native OOM errors
5. Verbose GC logs (native_stderr.log)
6. Process logs (ps)

For these diagnostic data files to be created, check that the system is configured correctly as per setup document.

Please collect the diagnostic data files for an OutOfMemory error in the Java application as per the following steps:



1. Collect the javacore, heap dump and snap trace file generated automatically by Java runtime on an OOM occurrence.

NOTE: From Java 6.2.6 SR1 level onwards, collect the core dump produced automatically by Java runtime on an OOM occurence.

2. For Java heap exhaustion issues, collect the javacore, core dump, heap dump and snap trace files generated automatically by using -Xdump option mentioned in setup.

3. For native memory issues, manually generate at least three Java core, core dump, heap dump, and snap trace files by using one of the following methods:
a)Use the key sequence Ctrl-Break in a console window.
b)Use the WSAdmin command if you are running IBM® WebSphere® Application Server.
c)If you have the MKS Toolkit installed, use the command:
kill -3 [PID_of_problem_JVM]
d)Use Windows Task Manager to manually generate the dumps

When you observe the application starting to use excessive amounts of memory, start generating these above files at regular intervals.

The time interval between each generation of files depends on how quickly the application encounters an OOM error. For example, if the application takes 30 minutes to produce an OOM error, issue the kill command at 10-minute intervals.

Please note that all the javacores, core dumps, heap dumps and snap traces will be generated in the current path and the names of them will follow the below format:
Javacore : javacore.<time stamp>.<id>.txt
Core dump : core.<time stamp>.<id>.dmp
Snap trace : snap.<time stamp>.<id>.trc
Heap dump : heapdump.<time stamp>.<id>.phd

For Java 6 and 5 SDK releases,

Run the JExtract tool against the generated core dump file using the following command:
<installpath>\jre\bin\jextract [corefile]

For 64bit JVM enabled with -Xcompressedrefs option, please use
<installpath>/jre/bin/jextract -J-Xcompressedrefs [corefile]

Save the resulting archive file, which has a name in the format of
core.<time stamp>.<id>.dmp.zip

From Java™ 7 SDKs on Windows platforms, you do not need to run the jextract utility.

4. Collect Verbose Garbage Collector data. This data is in the location specified during setup. Alternatively, the data is sent to the stderr output.

5. Collect process size monitoring data. The data is in the location specified during setup.

After collecting all the above diagnostic data files, you can submit them for help with diagnosing the problem.

[{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Out of Memory","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.0;7.1;7.0;6.1;6.0;5.0","Edition":"J2SE","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21222653