Troubleshooting Guide

Using the Core File

If a program terminates abnormally, a core file is created by the system to store a memory image of the terminated process. Errors such as memory address violations, illegal instructions, bus errors, and user-generated quit signals cause core files to be dumped.

The core file is named "core", and is placed in the directory where the application was running. Note that system core files are distinct from DB2 core files. See Dump Files for information on DB2 core files.

Accessing Core File Information

The dbx system command helps you determine which function caused a core file to be created. This is a simple check that will help you identify whether the database manager or DB2 Connect is in error, or whether an operating system or application error is responsible for the problem.

Notes:

Example of the dbx Command

The following example shows how to use the dbx command to read the core file for a program called "main".

  1. At a command prompt, enter:
    dbx main
    
  2. Output similar to the following appears on your display:
    dbx version 3.1 for AIX.
    Type 'help' for help.
    reading symbolic information ...
    [using memory image in core]
    segmentation.violation in freeSegments at line 136
    136         (void) shmdt((void *) pcAdress[i]);
    (dbx) where
    freeSegments(numSegs = 2, iSetId = 0x2ff7f730, pcAddress = 0x2ff7f758, line
    136
    in "main.c"
    main (0x1, 2ff7f7d4), line 96 in "main.c"
    

    In the above example, the name of the function that caused the core dump is "freeSegments". If the function name begins with "db2", "sql", or "ddcs", it may indicate an error in the database manager or DB2 Connect products.

    The example also illustrates the use of the where subcommand. Enter where at the dbx prompt to display the program path to the point of failure. In this example, the error occurred at line 136 of freeSegments, which was called from line 96 in "main.c".

  3. To end the dbx command, type quit at the dbx prompt.


[ Top of Page | Previous Page | Next Page ]