IBM Support

AIX Core Dump Data Collection

Question & Answer


Question

What data should be collected when a process core dumps on AIX?

Answer

When a process core dumps on AIX, two things are necessary for problem analysis:

1. The binary must have been shipped with AIX as IBM has to be the source code owner. Third party applications must be analyzed by the respective vendor.

2. Data collection has to be done using the "snapcore" command. The core file itself is not sufficient. snapcore will ensure the core file, program binary and all relevant libraries are gathered which allows for analysis outside the customer's environment.

First, determine the name of the failing program and the location of the core file in the detailed Error Report (errpt -a) output.  For instance, a "CORE_DUMP" label with the following contents:

.......
LABEL:          CORE_DUMP
IDENTIFIER:     A924A5FC
Date/Time:       Tue Jun 11 22:58:18 2019
......
USER'S PROCESS ID:
               4194354
FILE SYSTEM SERIAL NUMBER
          16
INODE NUMBER
                132661
CORE FILE NAME
/tmp/core
PROGRAM NAME
java
.......

The core file location is given with the full path. The program name just displays the actual name of the executable file, but the full path to this needs to be supplied to snapcore as well.
The inode number given in the above example is not terribly useful. It is meant to be the inode number of the executable that dropped core but it is relative to what was the current working directory at the time the executable was run. It is possible for a customer to have several revisions of the same program, such as java, on the system. Identifying the correct version can be a challenge and may require the analysis of application logs to ascertain the version used.
The snapcore  command is commonly executed by root, however, if a database binary such as Oracle or DB2 is creating core files it is best to login as the respective user. This sets the environment, such as the PATH and LIBPATH variables, and ensures proper data collection.
Using the above error report example and assuming the java executable exists in /usr/java8/jre/bin:
 
# snapcore /path/to/corefile /path/to/binary
e.g.
# snapcore /tmp/core /usr/java8/jre/bin/java

Creating directory /tmp/snapcore ...

Core file "/tmp/core" created by "java"

pass1() in progress ....

                Calculating space required .
                Total space required is 14391 kbytes ..
                Checking for available space ...
                Available space is 2994064 kbytes

pass1 complete.

pass2() in progress ....

                Collecting fileset information .
                Collecting error report of CORE_DUMP errors ..
                Creating readme file ..
                Creating archive file ...
                Compressing archive file ....

pass2 completed.

Snapcore completed successfully. Archive created in /tmp/snapcore.

 
Note: If you do not give a full path to the executable the snapcore command will search for it using your PATH variable.

The resulting file will be located in /tmp/snapcore and named snapcore_<pid>.pax.Z:

# ls -l /tmp/snapcore
total 12320
-rw-r--r--    1 root     system      6303760 Jul 11 16:42 snapcore_4194354.pax.Z


Rename this file to contain the case number and upload to your support ticket via the known upload procedures, per:

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
15 May 2025

UID

isg3T1025506