Trap Errors Under OS/2

DESCRIPTION
This document contains a list and explanations of OS/2 traps.

RESOLUTION
There are a maximum of 255 possible traps. Trap errors consist of interrupts and exceptions. An interrupt is an event external to the processor that can occur at random times during system operation. An exception is a special condition which is detected by the processor during the execution of instructions. Exceptions only occur when the processor is executing instructions.

Traps 0 through 16, with the exclusion of Trap 2, are special exceptions that are detected by the processor. Trap 2 is a non-maskable interrupt (NMI) error indicating a catastrophic system failure. Traps 17 through 31 are exceptions reserved by Intel. Traps 32 through 255 are maskable interrupts that are user defined. A summary of the traps is shown below. Trap Number Decimal  (Hex)   Description 0       0000    Divide By Zero Error 1       0001    Debug Exception 2       0002    NMI Interrupt 3       0003    Debug Breakpoint 4       0004    Overflow Detected 5       0005    Bound Range Exceeded 6       0006    Invalid Opcode Instruction 7       0007    Coprocessor Not Available 8       0008    Double Fault 9       0009    Coprocessor Segment Overrun 10       000A    Invalid Task State Segment 11       000B    Segment Not Present 12       000C    Stack Fault 13       000D    General Protection 14       000E    Page Fault 15       000F    Intel Reserved - Do Not Use 16       0010    Coprocessor Error 17-31    0011-1F Intel Reserved - Do Not Use 32-255   0020-FF Maskable Interrupts Note: This information deals with the first 16 traps, which are of concern to the servicer. Traps 0 through 16 are exceptions; if they occur, the processor takes the appropriate action according to the instructions in the interrupt handler routine of your operating system. The exception handler can vary widely according to the software vendor.

The following list describes Traps 0 through 16 and provides direction for the most efficient problem resolution:

TRAP0000 - DIVIDE ERROR. A program attempted to divide a number by zero. Contact software support.

TRAP0001 - DEBUG EXCEPTION. Contact software support.

TRAP0002 - NMI INTERRUPT. An NMI interrupt is generated by the system when a catastrophic error occurs. This is typically the result of a hardware problem (specifically memory or cache). However, there can be four possible causes of this problem: 110 error - system board memory parity error 111 error - I/O channel check (adapter card error) 112 error - watchdog timeout (may be hardware or software) 113 error - DMA timeout (may be hardware or software) The Service Aid Diskette (SADA) may be useful to determine whether the problem was a 110, 111, 112, or 113 error. If a 112 or 113 error cannot be resolved by hardware troubleshooting, software support should be contacted. (Some operating systems do not support this Service Aid diskette.)

Note: Recent PS/2 Systems have serial and parallel ports with DMA arbitration. If DMA arbitration errors are encountered during I/O operations to these ports, changing the arbitration to another level, or to "disable," may correct the problem.

For further problem determination of TRAP0002 errors on ISA or EISA bus systems, beginning with OS/2 Warp v3 FixPak 14, and OS/2 2.11 FixPak 103 (this fix is already included in OS/2 Warp v4) examine the ERRCD field of the TRAP screen. This field contains the values from hardware port 0x61. The following codes indicate the actions needed: 0000 - Software caused NMI 0001 - RAM error, check memory (parity error) 0002 - Adapter caused error (I/O channel check) 0003 - Check bus mastering adapters, update adapter drivers. Also disable bus mastering on failing adapters as        a problem determination tool to figure out which adapter is causing the failure. Contact the adapter vendor for further assistance. (DMA timeout) 0004 - A device driver or DOS application disabled interrupts too long. Contact appropriate software vendor for updated software (Watchdog timeout). 0005 - Contact application or device driver hardware vendor (software generated NMI). 0006 - see error code 0003 0007 - see error code 0004 0008 - see error code 0002 0009 - see error code 0001 The following built in OS/2 error messages can be queried to see additional help for the error codes:

For this ERRCD:     Type HELP to get more help 0000               1944      0001                1945      0002                1946      0003                1947      0004                1948      0005                3140      0006                3141      0007                3142      0008                3143      0009                3144

For example, type HELP 1945 at an OS/2 command prompt to provide additional useful information about the failure.

TRAP0003 - BREAKPOINT. This is a special instruction (INT 3) used in "debugging" software, which was left in the code either accidentally or by design. Contact software support.

TRAP0004 - OVERFLOW. An overflow occurred while doing an arithmetic operation. Contact software support.

TRAP0005 - BOUND RANGE EXCEEDED. A BOUND instruction exceeded the specified limits. Contact software support.

TRAP0006 - INVALID OPCODE. The processor tried to execute an unreserved invalid opcode. Contact software support.

TRAP0007 - COPROCESSOR NOT AVAILABLE. If coprocessor diagnostics run error-free, contact software support.

TRAP0008 - DOUBLE FAULT. The processor detected an exception while processing an exception. It could be caused by either hardware or software. If TRAP0002 is also being experienced, contact hardware support.

TRAP0009 - COPROCESSOR OVERRUN. The middle portion of a coprocessor operand is protected or not-present. Contact software support.

TRAP000A - INVALID TASK STATE SEGMENT. A task switch to an invalid task switch segment was attempted. Contact software support.

TRAP000B - SEGMENT NOT PRESENT. The segment being referenced is not present. Contact software support.

TRAP000C - STACK FAULT. Contact software support.

TRAP000D - GENERAL PROTECTION EXCEPTION. All protection violations which do not cause another exception, cause a TRAP000D. Contact software support.

TRAP000E - PAGE FAULT. The page being referenced is not present in memory or the procedure referencing the page does not have enough privilege to access the page. Contact software support.

TRAP000F - RESERVED BY INTEL.

TRAP0010 - COPROCESSOR ERROR. The processor detected an error from the coprocessor. This could be caused by hardware or software.