IBM Support

MustGather: Required settings to generate full core files on Linux

Troubleshooting


Problem

When a crash occurs, the most important diagnostic data to obtain is the process core file. In order to ensure this is generated for the Java Virtual Machine (JVM) on Linux there are a number of settings that need to be in place. The majority of the JVM settings are in place by default, but operating system settings also need to be in place, and these vary by distribution and Linux version.

Resolving The Problem

The following settings need to be in place:
Operating system settings
To obtain full core files set the following ulimit options:

ulimit -c unlimited turn on corefiles with unlimited size
ulimit -n unlimited allows an unlimited number of open file descriptors
ulimit -u unlimited sets the user memory limit to unlimited
ulimit -f unlimited sets the file limit to unlimited

The current ulimit settings can be displayed using:

ulimit -a

These values are the "soft" limit, and are done on a per user basis. These cannot exceed the "hard" limit value.

In order to display and change the "hard" limits, the same ulimit commands can be run using the additional -H flag.

Note: As of Java 5.0 GA, the ulimit -c value value for the soft limit will be ignored and the hard limit value used in order to help ensure generation of the core file.

Core file generation can be disabled by using the following Java command line option:

-Xdump:system:none


Java Virtual Machine settings
To generate core files on crash events, check that the the JVM is set to produce a core file when a crash occurs, run the following:

java -Xdump:what

which should produce the following:

dumpFn=doSystemDump
events=gpf+abort
filter=
label=/u/cbailey/sdk/jre/bin/core.%Y%m%d.%H%M%S.%pid.dmp
range=1..0
priority=999
request=nodumps


The values above are the default settings. At least events=gpf must be set in order to generate a core file when a crash occurs.

Options can be changed and/or set using the command line option:

-Xdump:system[:=, ...]


Available disk space
It is also important to ensure that there is enough disk space available for the core file to be written. The JVM allows the core file to be written to any directory that is specified in the label option.

For example:

-Xdump:system:label=/u/cbailey/sdk/jre/bin/core.%Y%m%d.%H%M%S.%pid.dmp

In order for the core file to be written to this location, there must be sufficient disk space (up to 2GB may be required), and the correct permissions for the Java process to write to that location.

[{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Debugging Options","Platform":[{"code":"PF016","label":"Linux"}],"Version":"5.0","Edition":"J2SE","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21222437