hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP OpenVMS System Analysis Tools Manual

HP OpenVMS System Analysis Tools Manual


Previous Contents Index

Table 2-5 lists symbols that SDA defines automatically on initialization.

Table 2-5 SDA Symbols Defined on Initialization
ASN Address space number
AST Both the asynchronous system trap status and enable registers: AST<3:0> = AST enable; AST<7:4> = AST status
BR0 through BR7 Branch registers 2
CYCLE_COUNTER Process cycle counter
ESP Executive stack pointer
EBSP Executive register stack pointer 2
FEN Floating-point enable
FP Frame pointer (R29)
FP0 through FP31 Floating-point registers 1
FP0 through FP127 Floating point registers 2
FPCR Floating-point control register 1
FPSR Floating-point status register 2
GP Global pointer (R1) 2
G FFFFFFFF.80000000 16, the base address of system space
H 00000000.7FFE0000 16, a base address in P1 space
I FFFFFFFF.FFFFFFFF 16, also fills the leading digits of a hexadecimal number with the value of F
KSP Kernel stack pointer
KBSP Kernel register stack pointer 2
PAL_RSVD PAL reserved area in process HWPCB
PC Program counter
PCC Process cycle counter
PS Processor status
PTBR Page table base register
R0 through R31 Integer registers 1
R0 through R127 Integer registers 2
SCC System cycle counter
SP Current stack pointer of a process
SSP Supervisor stack pointer
SBSP Supervisor register stack pointer 2
SYSPTBR Page table base register for system space
USP User stack pointer
UBSP User register stack pointer 2
VIRBND Virtual Address Boundary for RADs 1


1Alpha only.
2I64 only.

After a SET CPU command is issued (for analyzing a crash dump only), the symbols defined in Table 2-6 are set for that CPU.

Table 2-6 SDA Symbols Defined by SET CPU Command
CPUDB Address of CPU database
IPL Interrupt priority level register
MCES Machine check error summary register
PCBB Process context block base register
PRBR Processor base register (CPU database address)
RAD Address of RAD database
SCBB System control block base register
SISR Software interrupt status register
VPTB Virtual Page Table Base register

After a SET PROCESS command is issued, the symbols listed in Table 2-7 are defined for that process.

Table 2-7 SDA Symbols Defined by SET PROCESS Command
ARB Address of access rights block
FRED Address of floating-point register and execution data block
JIB Address of job information block
KTB Address of the kernel thread block
ORB Address of object rights block
PCB Address of process control block
PHD Address of process header
PSB Address of persona security block

Other SDA commands, such as SHOW DEVICE and SHOW CLUSTER, predefine additional symbols.

SDA Symbol Initialization

On initialization, SDA reads the universal symbols defined by SYS$BASE_IMAGE.EXE. For every procedure descriptor address symbol found, a routine address symbol is created (with _C appended to the symbol name).

SDA then reads the object file REQSYSDEF.STB. This file contains data structure definitions that are required for SDA to run correctly. It uses these symbols to access some of the data structures in the crash dump file or on the running system.

Finally, SDA initializes the process registers defined in Table 2-7 and executes a SET CPU command, defining the symbols as well.

Use of SDA Symbols

There are two major uses of the address type symbols. First, the EXAMINE command employs them to find the value of a known symbol. For example, EXAMINE CTL$GL_PCB finds the PCB for the current process. Then, certain SDA commands (such as EXAMINE, SHOW STACK, and FORMAT) use them to symbolize addresses when generating output.

When the code for one of these commands needs a symbol for an address, it calls the SDA symbolize routine. The symbolize routine tries to find the symbol in the symbol table whose address is closest to, but not greater than the requested address. This means, for any given address, the routine may return a symbol of the form symbol_name+offset. If, however, the offset is greater than 0FFF16, it fails to find a symbol for the address.

As a last resort, the symbolize routine checks to see if this address falls within a known memory range. Currently, the only known memory ranges are those used by the OpenVMS executive images and those used by active images in a process. SDA searches through the executive loaded image list (LDRIMG data structure) to see if the address falls within any of the image sections. If SDA does find a match, it returns one of the following types of symbols:

executive_image_name+offset
activated_image_name+offset

The offset is the same as the image offset as defined in the map file.

The constants in the SDA symbol table are usually used to display a data structure with the FORMAT command. For example, the PHD offsets are defined in SYSDEF.STB; you can display all the fields of the PHD by entering the following commands:


SDA> READ SDA$READ_DIR:SYSDEF.STB 
 
SDA> FORMAT/TYPE=PHD phd_address 

Symbols and Address Resolution

In OpenVMS, executive and user images are loaded into dynamically assigned address space. To help you associate a particular virtual address with the image whose code has been loaded at that address, SDA provides several features:

The OpenVMS executive consists of two base images, SYS$BASE_IMAGE.EXE and SYS$PUBLIC_VECTORS.EXE, and a number of other separately loadable images. Some of these images are loaded on all systems, while others support features unique to particular system configurations. Executive images are mapped into system space during system initialization.

By default, a typical executive image is not mapped at contiguous virtual addresses. Instead, its nonpageable image sections are loaded into a reserved set of pages with other executive images' nonpageable sections. The pageable sections of a typical executive image are mapped contiguously into a different part of system space. An image mapped in this manner is said to be sliced. A particular system may have system parameters defined that disable executive image slicing altogether.

Each executive image is described by a data structure called a loadable image data block (LDRIMG). The LDRIMG specifies whether the image has been sliced. If the image is sliced, the LDRIMG indicates the beginning of each image section and the size of each section. All the LDRIMGs are linked together in a list that SDA scans to determine what images have been loaded and into what addresses they have been mapped. The SHOW EXECUTIVE command displays a list of all images that are included in the OpenVMS executive.

Each executive image is a shareable image whose universal symbols are defined in the SYS$BASE_IMAGE.EXE symbol vector. On initialization, SDA reads this symbol vector and adds its universal symbols to the SDA symbol table.

Executive image .STB files define additional symbols within an executive image that are not defined as universal symbols and thus are not in the SYS$BASE_IMAGE.EXE symbol vector (see Sources for SDA Symbols in this section). You can enter a READ/EXECUTIVE command to read symbols defined in all executive image .STB files into the SDA symbol table, or a READ/IMAGE filespec command to read the .STB for a specified image only.

To obtain a display of all images mapped within a process, execute a SHOW PROCESS/IMAGE command. See the description of the SHOW PROCESS command for additional information about displaying the hardware and software context of a process.

You can also identify the image name and offset that correspond to a specified address with the MAP command. With the information obtained from the MAP command, you can then examine the image map to locate the source module and program section offset corresponding to an address.

2.6.2 SDA Display Mode

Some SDA commands produce more output than will fit on one screen. In this situation, SDA enters display mode, and outputs the screen overflow prompt at the bottom of the screen:


Press RETURN for more. 
SDA> 

If the RETURN key is pressed, SDA will continue the output of the command it was processing. If an EXIT command is entered, SDA will leave display mode, abort the command it was processing and output a regular SDA prompt. If any other command is entered, SDA will leave display mode, abort the command it was processing, and begin processing the new command.

SDA will leave display mode once a continued command completes.

2.7 Investigating System Failures

This section discusses how the operating system handles internal errors, and suggests procedures that can help you determine the causes of these errors. It illustrates, through detailed analysis of a sample system failure, how SDA helps you find the causes of operating system problems.

For a complete description of the commands discussed in the sections that follow, refer to Chapter 4 and Chapter 5 of this document, where all the SDA and CLUE commands are presented in alphabetical order.

2.7.1 Procedure for Analyzing System Failures

When the operating system detects an internal error so severe that normal operation cannot continue, it signals a condition known as a fatal bugcheck and shuts itself down. A specific bugcheck code describes each fatal bugcheck.

To resolve the problem, you must find the reason for the bugcheck. Many failures are caused by errors in user-written device drivers or other privileged code not supplied by HP. To identify and correct these errors, you need a listing of the code in question.

Occasionally, a system failure is the result of a hardware failure or an error in code supplied by HP. A hardware failure requires the attention of HP Services. To diagnose an error in code supplied by HP, you need listings of that code, which are available from HP.

Start the search for the error by analyzing the CLUE list file that was created by default when the system failed. This file contains an overview of the system failure, which can assist you in finding the line of code that signaled the bugcheck. CLUE CRASH displays the content of the program counter (PC) in the list file. The content of the PC is the address of the next instruction after the instruction that signaled the bugcheck.

However, some bugchecks are caused by unexpected exceptions. In such cases, the address of the instruction that caused the exception is more informative than the address of the instruction that signaled the bugcheck.

The address of the instruction that caused the exception is located on the stack. You can obtain this address either by using the SHOW STACK command to display the contents of the stack or by using the SHOW CRASH or CLUE CRASH command to display the system state at time of exception. See Section 2.7.2 for information on how to proceed for several types of bugchecks.

Once you have found the address of the instruction that caused the bugcheck or exception, find the module in which the failing instruction resides. Use the MAP command to determine whether the instruction is part of a device driver or another executive image. Alternatively, the SHOW EXECUTIVE command shows the location and size of each of the images that make up the OpenVMS executive.

If the instruction that caused the bugcheck is not part of a driver or executive image, examine the linker's map of the module or modules you are debugging to determine whether the instruction that caused the bugcheck is in your program.

To determine the general cause of the system failure, examine the code that signaled the bugcheck or the instruction that caused the exception.

2.7.2 Fatal Bugcheck Conditions

There are many possible conditions that can cause OpenVMS to issue a bugcheck. Normally, these occasions are rare. When they do occur, they are often fatal exceptions or illegal page faults occurring within privileged code. This section describes the symptoms of several common bugchecks. A discussion of other exceptions and condition handling in general appears in the HP OpenVMS Programming Concepts Manual.

An exception is fatal when it occurs while either of the following conditions exists:

When the system fails, the operating system reports the approximate cause of the system failure on the console terminal. SDA displays a similar message when you issue a SHOW CRASH command. For instance, for a fatal exception, SDA can display one of these messages:


FATALEXCPT, Fatal executive or kernel mode exception 
 
INVEXCEPTN, Exception while above ASTDEL 
 
SSRVEXCEPT, Unexpected system service exception 
 
UNXSIGNAL, Unexpected signal name in ACP 

When a FATALEXCPT, INVEXCEPTN, SSRVEXCEPT, or UNXSIGNAL bugcheck occurs, two argument lists, known as the mechanism and signal arrays, are placed on the stack.

Section 2.7.2.1 to Section 2.7.2.5 describe these arrays and related data structures, and Section 2.7.2.7 shows example output from SDA for an SSRVEXCEPT bugcheck.

A page fault is illegal when it occurs while the interrupt priority level (IPL) is greater than 2 (IPL$_ASTDEL). When OpenVMS fails because of an illegal page fault, it displays the following message on the console terminal:


PGFIPLHI, Page fault with IPL too high 

Section 2.7.2.8, Illegal Page Faults describes the stack contents when an illegal page fault occurs.

2.7.2.1 Alpha Mechanism Array

Figure 2-1 illustrates the Alpha mechanism array, which is made up entirely of quadwords. The first quadword of this array indicates the number of quadwords in this array; this value is always 2C16. These quadwords are used by the procedures that search for a condition handler and report exceptions.

Figure 2-1 Alpha Mechanism Array


Symbolic offsets into the mechanism array are defined by using the SDA SHOW STACK command to identify the elements of the mechanism array on the stack using the symbols in Table 2-8.

Table 2-8 Contents of the Alpha Mechanism Array
Offset Meaning
CHF$IS_MCH_ARGS Number of quadwords that follow. In a mechanism array, this value is always 2C 16.
CHF$IS_MCH_FLAGS Flag bits for related argument mechanism information.
CHF$PH_MCH_FRAME Address of the FP (frame pointer) of the establisher's call frame.
CHF$IS_MCH_DEPTH Depth of the OpenVMS search for a condition handler.
CHF$PH_MCH_DADDR Address of the handler data quadword, if the exception handler data field is present.
CHF$PH_MCH_ESF_ADDR Address of the exception stack frame (see Figure 2-5).
CHF$PH_MCH_SIG_ADDR Address of the signal array (see Figure 2-3).
CHF$IH_MCH_SAVRnn Contents of the saved integer registers at the time of the exception. The following registers are saved: R0, R1, and R16 to R28 inclusive.
CHF$FH_MCH_SAVFnn If the process was using floating point, contents of the saved floating-point registers at the time of the exception. The following registers are saved: F0, F1, and F10 to F30 inclusive.
CHF$PH_MCH_SIG64_ADDR Address of the 64-bit signal array (see Figure 2-4).

2.7.2.2 I64 Mechanism Array

Figure 2-2 illustrates the I64 mechanism array, which is made up entirely of quadwords. The first quadword of this array indicates the number of quadwords in the array. This value is either 4916, if floating point registers F32 to F127 have not been saved, or 10916, if the floating point registers have been saved. These quadwords are used by the procedures that search for a condition handler and report exceptions.

Figure 2-2 I64 Mechanism Array


Symbolic offsets into the mechanism array are defined by using the SDA SHOW STACK command to identify the elements of the mechanism array on the stack using the symbols in Table 2-9.

Table 2-9 Contents of the I64 Argument Mechanism Array
Field Name Contents
CHF$IS_MCH_ARGS Count of quadwords in this array starting from the next quadword, CHF$PH_MCH_FRAME (not counting the first quadword that contains this longword). This value is 73 if CHF$V_FPREGS2_VALID is clear, and 265 if CHF$V_FPREGS2_VALID is set.
CHF$IS_MCH_FLAGS Flag bits for related argument-mechanism information.
CHF$PH_MCH_FRAME Contains the Previous Stack Pointer, PSP, (the value of the SP at procedure entry) for the procedure context of the establisher.
CHF$IS_MCH_DEPTH Positive count of the number of procedure activation stack frames between the frame in which the exception occurred and the frame depth that established the handler being called.
CHF$PH_MCH_DADDR Address of the handler data quadword (start of the Language Specific Data area, LSDA), if the exception handler data field is present in the unwind information block (as indicated by OSSD$V_HANDLER_DATA_VALID); otherwise, contains 0.
CHF$PH_MCH_ESF_ADDR Address of the exception stack frame.
CHF$PH_MCH_SIG_ADDR Address of the 32-bit form of signal array. This array is a 32-bit wide (longword) array. This is the same array that is passed to a handler as the signal argument vector.
CHF$IH_MCH_RETVAL Contains a copy of R8 at the time of the exception.
CHF$IH_MCH_RETVAL2 Contains a copy of R9 at the time of the exception.
CHF$PH_MCH_SIG64_ADDR Address of the 64-bit form of signal array. This array is a 64-bit wide (quadword) array.
CHF$FH_MCH_SAVF32_SAVF127 Address of the extension to the mechanism array that contains copies of F32 to F127 at the time of the exception.
CHF$FH_MCH_RETVAL_FLOAT Contains a copy of F8 at the time of the exception.
CHF$FH_MCH_RETVAL2_FLOAT Contains a copy of F9 at the time of the exception.
CHF$FH_MCH_SAVFnn Contain copies of floating-point registers F2 to F5 and F12 to F31. Registers F6, F7 and F10, F11 are implicitly saved in the exception frame.
CHF$IH_MCH_SAVBnn Contain copies of branch registers B1 to B5 at the time of the exception.
CHF$IH_MCH_AR_LC Contains a copy of the Loop Count Register (AR65) at the time of the exception.
CHF$IH_MCH_AR_EC Contains a copy of the Epilog Count Register (AR66) at the time of the exception.
CHF$PH_MCH_OSSD Address of the operating-system specific data area.
CHF$PH_MCH_INVO_HANDLE Contains the invocation handle of the procedure context of the establisher.
CHF$PH_MCH_UWR_START Address of the unwind region.
CHF$IH_MCH_FPSR Contains a copy of the hardware floating-point status register (AR.FPSR) at the time of the exception.
CHF$IH_MCH_FPSS Contains a copy of the software floating-point status register (which supplements CHF$IH_MCH_FPSR) at the time of the exception.


Previous Next Contents Index