Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

Stack Traces in Case of Critical Error

A diagnostic feature is available that provides a stack trace showing calls for all threads. This is performed automatically when a fatal error occurs.

This feature redirects output to the file pstack<server_pid>_<sernum>.log, where <server_pid> is the process ID of the FairCom Server process and <sernum> is a serial number maintained by the server to ensure unique log names. The server also writes a message to its status log, CTSTATUS.FCS, indicating that a process stack trace was dumped. For example, the following message in CTSTATUS.FCS refers to the file pstack_454_01.log:

Dumped stack for server process 454, log=1, loc=73, rc=0

Please contact your vendor immediately if you encounter a FairCom DB crash and be prepared to supply these stack dumps. This enables FairCom engineers to quickly pinpoint critical errors and enable fast response times for corrected servers.

Note: To receive function times, you will need shared libraries (Unix/Linux) or DLL (Windows) with symbols. Be sure to run the pstack command from the local directory where the FairCom Server library resides. If it is not run from that directory, the symbol-enabled library will not be loaded and the system function calls will appear as question marks in the call stack.

Unix Operating Systems

For servers running on Unix operating systems, the implementation invokes the pstack utility.

Note: If pstack does not exist on your system, no trace will be created.

If your system's process stack trace creation utility is named something other than pstack, you can create a shell script named pstack to run your utility. For example, if the utility on your system is named dumpstack, create a shell script named pstack with the following two lines:


dumpstack $1

Remember to give your shell script execute permission (for example, chmod +x pstack) and put it in a directory that is in the path.

IBM AIX Operating Systems

The server uses the AIX procstack utility to log the stack trace.

Microsoft Windows Operating Systems

This feature requires an external DLL, dbghelp.dll, which is part of the Windows installation, and is dynamically loaded at stack dump time. It also requires that this DLL exports the function MiniDumpWriteDump() which may not be the case with older versions of this DLL. In the case where the DLL cannot be found or it does not contain the function, the stack dump fails and a message is logged in CTSTATUS.FCS without any other consequence.

It is suggested to enable Dr. Watson on the Windows system of interest when attempting to generate a dump file with information needed to trace a continuing server stack dump. Visual Studio 7.0 or greater is required to inspect the file for Windows stack dumps.

Security Note: In-flight data will be captured at the time these core files are generated. Consider the case of data and indexes residing in the memory caches of the server process space. This will be unencrypted data even if it was encrypted on disk. Please consult with your local risk assessment organization concerning any privacy or security issues before forwarding this information to FairCom.