IBM Support

Unix Core File Debugging Tools: dbx and gdb

Question & Answer


Question

How do I use dbx and gdb to debug FileNet P8 and Images Services (IS) core files?

Answer

Core files are produced as a result of a fatal error in a program. A program generates a fatal error when it attempts an operation that violates the rules of the operating system. When this happens, Unix takes a snapshot of the program copy in memory and dumps that data into a core file. The core file debugging tools, such as dbx and gdb, are used to read the information in the core file and provide a stack trace of the processing at the time the error occurred.

Sample usage: AIX systems use the dbx tool, while gdb is available on both the HP and SUN platforms. The first step in collecting a stack trace is to identify the process that produced the core by running the following command:
cstat -n <core_file_name>
This command outputs the name of the program that failed. The core file name is a required parameter when running the cstat command.

cstat, dbx, and gdb send their output to the screen. Therefore, a script shell should first be started to collect the output. For example:
script core_output.txt
This command redirects the screen output to the core_output.txt file.

Use Ctrl+d to stop the script shell once all of the debugging output has been displayed.

Below are examples of both tools. Note that
  • In both examples, cstat provides the name of the process that cored in the command result, both of which are marked with *** below.
  • Both dbx and gdb use the where command to dump the process stack trace of the process that cored.
  • Depending on your environment, you may need to provide full path names when running these tools.
  • Be sure to run the appropriate tool while in the script shell, as shown below.


dbx Example:
script core_output.txt
cstat -n /tmp/core

core file................... /tmp/core
signal..................... (6) used by abort, replace SIGIOT in the future
command.............. VWJs ***
process ID............... 247848
parent process ID..... 47732
process group.......... 18808
real user ID.............. 80
saved user ID........... 80

 
dbx /fnsw/bin/VWJs /tmp/core

dbx> where
dbx> quit
Ctrl+d

gdb Example:
script core_output.txt
cstat -n /fnsw/local/tmp/core

Core file: /fnsw/local/tmp/core
Kernel Version:HP-UX
command : VWJs ***
Core Format Version: 1
Program died due to signal(11) segmentation violation
Process Data Segment: 126976 bytes
Process Stack Segment: 32768 bytes
gdb -quiet -nw /fnsw/bin/VWJs /fnsw/local/tmp/core

gdb> where
gdb> quit
Ctrl+d

Data to collect: The output from the cstat command and the stack trace captured in the script shell output; for example, core_output.txt as shown above. Also provide other applicable logs from FileNet P8 or Image Services (for example, the Process Engine or Image Service elog, Content Engine server and trace logs, Application Server Apache log, and so on).

For more information: More information on the AIX version of dbx can be found on the AIX Information Center. Please also refer to the Operating-specific documentation for these tools.

[{"Product":{"code":"SSNW2F","label":"FileNet P8 Platform"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Process Engine","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"4.5;4.0.2;4.0;3.5;3.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSNVUD","label":"FileNet Image Services"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Image Services","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"4.1.2;4.1.1;4.0;3.6","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSNW2F","label":"FileNet P8 Platform"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Application Engine","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"4.0.2;4.0;3.5;3.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSNW2F","label":"FileNet P8 Platform"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Content Engine","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"4.5;4.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
24 May 2021

UID

swg21433376