Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Tutorial for diagnosing invalid file headers for the Standalone Multi-User library

Diagnostics checks have been added to the Standalone Multi-User (FPUTFGET) library to help track down incorrect header values in the even that a data file is writing unexpected values to the header. The checks are controlled by setting the following environment variables before running a process that uses the Standalone Multi-User library.

  1. To enable checking of the header fields when reading and writing the header, set the environment variable FAIRCOM_CHECK_HEADER_VALUES to "yes". For example: setenv FAIRCOM_CHECK_HEADER_VALUES yes
  2. To enable diagnostic logging of cases where the first segment file descriptor is cleared when closing a file, set the environment variable FAIRCOM_CHECK_FILE_CLOSE to "yes". For example: setenv FAIRCOM_CHECK_FILE_CLOSE yes
  3. When the diagnostic checks that are controlled by the FAIRCOM_CHECK_HEADER_VALUES and FAIRCOM_CHECK_FILE_CLOSE environment variables are enabled, and the environment variable FAIRCOM_PROCESS_DUMP_TYPE has been set to one of the following values prior to initializing the database engine, then when a diagnostic check fails, the library creates a process dump:
    1. Setting FAIRCOM_PROCESS_DUMP_TYPE to "stack" enables creation of a process stack dump. For example:

    setenv FAIRCOM_PROCESS_DUMP_TYPE stack

    On Unix systems, the library uses the pstack utility to create the stack dump. The stack dump is written to the file pstack_<seqnum>.<pid>.txt, where <seqnum> is a sequential number that the library increments on each stack dump creation (starting with the value 1), and <pid> is the process ID of the process.

    On Windows systems, the library uses the procdump utility to create a minidump. The minidump is written to the file procdump_stack_<seqnum>.<pid>.dmp, where <seqnum> is a sequential number that the library increments on each stack dump creation (starting with the value 1), and <pid> is the process ID of the process.

    1. Setting FAIRCOM_PROCESS_DUMP_TYPE to "full" enables creation of a full process dump. For example:

    setenv FAIRCOM_PROCESS_DUMP_TYPE full

    On Unix systems, the library uses the gcore utility to create the full process dump. The process dump is written to the file gcore_<seqnum>.<pid>, where <seqnum> is a sequential number that the library increments on each stack dump creation (starting with the value 1), and <pid> is the process ID of the process.

    On Windows systems, the library uses the procdump utility to create a full dump. The full dump is written to the file procdump_full_<seqnum>.<pid>.dmp, where <seqnum> is a sequential number that the library increments on each stack dump creation (starting with the value 1), and <pid> is the process ID of the process.

NOTE: If you have enabled process dump creation, be sure to install the required utility for your system (pstack, gcore, or procdump).

TOCIndex