IBM Support

Unix Core File Debugging Tools: dbx and gdb

Technote (FAQ)


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 will output 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 will redirect the screen output to the core_output.txt file.

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

Below are examples of both of tools. Please note:
  • 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 IS (for example the PE or IS elog, Content Engine server and trace logs, Application Server Apache log, etc.).

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


Cross reference information
Segment Product Component Platform Version Edition
Enterprise Content Management FileNet Image Services Image Services AIX, HP-UX, Linux, Solaris 4.1.2, 4.1.1, 4.0, 3.6
Enterprise Content Management FileNet P8 Platform Application Engine AIX, HP-UX, Linux, Solaris 4.0.2, 4.0, 3.5, 3.0
Enterprise Content Management FileNet P8 Platform Content Engine AIX, HP-UX, Linux, Solaris 4.5, 4.0

Document information

More support for: FileNet P8 Platform
Process Engine

Software version: 3.0, 3.5, 4.0, 4.0.2, 4.5

Operating system(s): AIX, HP-UX, Linux, Solaris

Reference #: 1433376

Modified date: 07 December 2016