IBM Support

How to read an application core dump with dbx

Question & Answer


Question

How do I read an application core dump using dbx to start debugging the cause of the application crash?

Cause

When an application crashes, by default, a core file is created.

Refer to these links to understand more about different core dump options:

Answer

When a process core dumps on AIX, for problem analysis to be possible, data collection has to be done by using the "snapcore" command. The core file by itself is not sufficient. The snapcore command ensures the core file, the program binary, and all relevant libraries are gathered which allows an analysis to be made outside of the system environment.
 

For AIX Support to fully assist with the analysis, the binary must be shipped from AIX LPPs as IBM has to be the source code owner. Third-party applications must be analyzed by their respective vendor first. AIX support can assist there, but there is no guarantee it can come to a conclusion. 




To read the core file
Use the dbx command:
- /usr/bin/dbx binary is a part of the bos.adt.debug fileset.
- Run dbx on the executable binary that caused the core dump, this command displays the offending call.
# dbx -p /=./ /full/path/to/program /full/path/to/core

Example:
# dbx -p /=./ /usr/sbin/gated /core

IOT/Abort trap in raise at 0xd0120bc0
0xd0120bc0 (raise+0x60) 80410014         lwz   r2,0x14(r1)
(dbx)

a) Run dbx `corefile` subcommand to list more information about the core file:
(dbx) corefile
 Process Name:  /usr/sbin/gated
 Version:       430
 Flags:         FULL_CORE | CORE_VERSION_1 | UBLOCK_VALID | USTACK_VALID | LE_VALID
 Signal:        ABRT
 Process Mode:  32 bit


b) Run dbx `where` subcommand to display the stack trace for the main thread, or thread that caused the core dump:
(dbx) where
raise(??) at 0xd0120bc0
abort() at 0xd017bf64
task_quit(0x4) at 0x10000c20
rip_init() at 0x100881ec
task_proto_inits() at 0x1000645c
main(0x1, 0x2ff22d88) at 0x1000b48c

For more information about dbx and its subcommands, see: dbx Command


SUPPORT

If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract.  

1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue.

2. Capture any logs or data relevant to the situation.

3. Contact IBM to open a case:

   -For electronic support, see the IBM Support Community:
     https://www.ibm.com/mysupport
   -If you require telephone support, see the web page:
      https://www.ibm.com/planetwide/

4. Provide a clear, concise description of the issue.

 - For more information, see: Working with IBM AIX Support: Describing the problem.

5. If the system is accessible, collect a system snap, and upload all of the details and data for your case.

 - For more information, see: Working with IBM AIX Support: Collecting snap data

6. Collect the snapcore for that core file:

- For more information, see: AIX Core Dump Data Collection


[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cvydAAA","label":"Dumps"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Document Information

More support for:
AIX

Component:
Dumps

Software version:
All Version(s)

Document number:
6252395

Modified date:
29 December 2020

UID

ibm16252395

Manage My Notification Subscriptions