ru:os2faq:os2gen:os2gen.090

[Q]: Trap number information and troubleshooting diagnostics

[A]: Ivan Grigoriev (2:5020/333)

_Trap_ 0000 (00) - Divide by Zero Error

  A trap 0000 occurs when a program attempts to divide a number by zero or the

result of the operation is too large for the overflow register to handle it. [SYS1930]

_Trap_ 0001 (01) - Debug Exception

    A trap 0001 is caused when a program enables the single step interrupt

when not being run by a debugger. [SYS1931]

_Trap_ 0002 (02) - Non-Maskable Interrupt (NMI).

    A trap 0002 is caused when an Non-Maskable Interrupt (NMI) is generated by

the system for a catastrophic error. Four possible causes of this are:

         110 error - Planar parity error:  memory or system board
         111 error - I/O parity error, memory adapter or memory
         112 error - Watchdog time-out:  any adapter, system board
         113 error - DMA arbitration time-out:  any adapter, system board

_Trap_ 0003 (03) - Debug Breakpoint.

    A trap 0003 is caused when the program called an INT3 without being run by

debug. This happened because debugging code was left in the program either accidentally or by design. [SYS1933]

_Trap_ 0004 (04) - Overflow Detected.

    A trap 0004 is caused when a program started an INTO instruction without

registering an overflow exception handler. [SYS1934]

_Trap_ 0005 (05) - Bound Range Exceeded.

    A trap 0005 is caused when a program started a BOUND instruction without

registering a bound exception handler. [SYS1935]

_Trap_ 0006 (06) - Invalid Opcode Instruction.

    A trap 0006 is caused when a program started an invalid instruction

without registering an invalid opcode exception handler. [SYS1936]

_Trap_ 0007 (07) - Coprocessor not Available.

    A trap 0007 is caused when a program called for a numeric coprocessor

instruction without a coprocessor in the system and without registering a processor extension not available exception handler. [SYS1937]

_Trap_ 0008 (08) - Double Fault

    A trap 0008 is caused when the processor detects an exception while

processing another exception. [SYS1938]

_Trap_ 0009 (09) - Coprocessor Segment Overrun

    A trap 0009 is caused when a program runs a numeric coprocessor

instruction that tries to read or write past the end of the storage segment. [SYS1939]

_Trap_ 000A (10) - Invalid Task State Segment

    A trap 000A is caused when a program attempts a task switch to an invalid

task switch segment. [SYS1940]

_Trap_ 000B (11) - Segment not Available

    A trap 000B is caused when a program attempts to reference a memory

segment that isn't present. [SYS1941]

_Trap_ 000C (12) - Stack Fault

    A trap 000C is caused when a program attempts to push more data onto the

stack than it can hold, call too many subroutines, take more data off the stack than was pushed onto it or return more subroutines than were called. [SYS1942]

_Trap_ 000D (13) - General Protection Fault

    A trap 000D is caused (but not limited to) when a program references

storage outside the limit of the memory segment, references a storage segment that is restricted to privileged code, references storage with a selector value of zero, writing read-only memory or code segment, reading from an execute-only code segment or loading an invalid value into a selector register. [SYS1943]

NOTE: All protection violations which do not cause another exception cause a TRAP 000D.

_Trap_ 000E (14) - Page Fault

    A trap 000E is caused when a page being referenced is not present in

memory, the procedure referencing the page doesn't have enough privilege to access the page or the address range was allocated but no storage is committed.

_Trap_ 000F (15) - Reserved by Intel

    A trap 000F is reserved by Intel, It's not for our use.

_Trap_ 0010 (16) - Coprocessor Error

    A trap 0010 is caused when the processor detects an error from the

coprocessor, either by hardware or software.

    For Trap 0000 errors, try the following:
o If using a CSD level prior to XR06055, upgrade the operating system.  With

earlier CSD levles, Trap 0002 errors

  were sometimes incorrectly reported as Trap 0000 errors.
o Copy the default CONFIG.SYS from \OS2\INSTALL to the root directory.  Trap

0000 errors can be caused by an

  exception in a device driver.  If the Trap 0000 does not occur with the

default CONFIG.SYS, check the original

  CONFIG.SYS for the offending device driver.
     For trap 0002 errors, try the following:
o See Retain Tip #H083121, Section C for several known causes of Trap 0002

Errors.

o Check hardware, especially memory.  Trap 0002 errors are caused almost

exclusively by hardware problems. The

  most common type of Trap 0002 is caused by a failing memory module.  (This

is the equivalent of a memory parity

  error under DOS.)
o If there is an enhanced 80386 memory expansion adapter installed, ensure the

resistors are installed diagonally on

  the adapter.  (See Retain Tip #H037481 for additional details.)
o If error is received after installing new memory, ensure the SIMMs are

supported on the system. (Both speed and

  manufacturer)
o Ensure that faster memory is installed before slower memory. Run advanced

diagnostics to ensure memory has not

  failed.  If bad SIMMs are detected, replace.  If none are, suspect the

system board and have it inspected.

o On 8570-A61, -A21, -B61, -B21 or 8580-A21, -A31, -A16, refer to ECA 051 and

ECA 059 respectively.

o If the system has a non-IBM EGA adapter card, disable the adapter's

auto-switch function.

o If system is a MCA machine, check to see if there are any applicable ECA's.
     For trap 0003 errors, try the following:
o Check hardware.  (The failing hardware is usually not memory modules.)
o If using OS/2 2.1, use IBMINT13.I13 instead of IBM1S506.ADD. (Change BASEDEV

statement in CONFIG.SYS to

  do this.)
     For trap 0006 errors, try the following:
o See Retain Tip #H083121, Section C for several known causes of Trap 0006

Errors.

o Check hardware.  (The failing hardware is usually not memory modules.)
o Disable cache.
o Most Trap 0006 errors during installation can be corrected by disabling

cache, ROM shadowing, turbo, etc.

o Ensure the installed memory is the correct speed for the system board.
o If the error occurs every time within the same application and CHKDSK

doesn't correct the problem, contact the

  software developer for further assistance.
     For trap 0007 errors, try the following:
o See Retain Tip #H083121, Section C for several known causes of Trap 0007

Errors.

o Obtain a copy of the program that doesn't require a coprocessor or install a

coprocessor if possible.

o Ensure the installed memory is the correct speed for the system board.
o If the error occurs every time within the same application and CHKDSK

doesn't correct the problem, contact the

  software developer for further assistance.
     For trap 0008 errors, try the following:
o See Retain Tip #H083121, Section C for several known causes of Trap 0008

Errors.

o Ensure the installed memory is the correct speed for the system board.
o If during installation, REM out BASEDEV=IBM1S506.ADD in the CONFIG.SYS on

the installation diskette.

o Definitely check RETAIN for similar errors.  A large number of Trap 0008

errors are caused by bugs in OS/2 or

  other components, such as NTS/2, Netware Requester for OS/2, CM/2, etc.
o Check hardware.  Trap 0008 errors can sometimes be caused by hardware

problems.

o Check for IRQ conflicts.
o If the error occurs every time within the same application and CHKDSK

doesn't correct the problem, contact the

  software developer for further assistance.
     For trap 000C errors, try the following:
o See Retain Tip #H083121, Section C for several known causes of Trap 000C

Errors.

o Check memory, run advanced diagnostics on adapter cards, and replace as

needed. Trap 000C errors can be

  caused by the same types of hardware problems that produce Trap 0002 errors.
o Ensure the installed memory is the correct speed for the system board.
o If the error occurs every time within the same application and CHKDSK

doesn't correct the problem, contact the

  software developer for further assistance.
     For trap 000D errors, try the following:
o See Retain Tip #H083121, Section C for several known causes of Trap 000D

Errors.

o Definitely check RETAIN for similar errors.  A number of Trap 000D errors

are caused by software bugs.

o If the error occurs every time within the same application and CHKDSK

doesn't correct the problem, contact the

  software developer for further assistance.
o Check hardware.  Trap 000D errors are occassionally caused by hardware

problems.

o Make sure all adapters are supported by OS/2.
o If using the enhanced memory adapter on a model 80-111 or 80-311 and it's in

slot #1, move to slot #4. If already

  there, verify that the resistors are positioned diagonally across the

modules. If these resistors are not present,

  replace the adapter with PN 34F2825.
o If this occurs during installation, test the system memory, any memory

adapters and the system board. Replace as

  necessary.
o If it occurs within a Token Ring environment, ensure the Token Ring RAM

window is set at 16 KB.

o If it occurs while printing, install the newest printer driver and ensure

the most current CSD is installed.

o If system is a MCA machine, check to see if there are any applicable ECA's.
o Ensure the installed memory is the correct speed for the system board.
     For trap 000E errors, try the following:
o Check RETAIN for similar errors.  Some Trap 000E errors are caused by

software bugs.

o If the error occurs every time within the same application and CHKDSK

doesn't correct the problem, contact the

  software developer for further assistance.
o Check hardware.  Trap 000E errors are occassionally caused by hardware

problems.

[A]: Roderick Klein (rwklein@wxs.nl)

A general remark for everyboby who gets a trap!

Don't just hit the reset button and hope it won't come back, try and trace a trap! One of the most helpfull hints is this! When a trap occurs write down the CSLIM value. Is it FFFFFFFF never mind then just hit reset… Is CLSIM != FFFFFFFF then you can be lucky!

After a reboot (if possible) go onto the internet and download this tool:

ftp://hobbes.nmsu.edu/pub/os2/util/disk/exeinfo.zip (only 22kB).

This is the manual:

Exeinfo searches your partitions for executable code (device drivers, file systems, EXEs, DLLs) that matches some criteria. To locate the module that caused a trap, write down the CSLIM value that is reported. Then run

  "exeinfo -f -lxxxx c:\*.*"

where xxxx is the CSLIM value and C: should be replaced by each driver from which code may have been loaded.

If, for example, you get CSLIM=0000f113 and all your code is loaded from the D drive because you have multiboot, type

  exeinfo -f -lf113 d:\*.*

Another hint for fixpak 13 users and higher, got a Teles ISDN card! Rem out this line: DEVICE=D:\CAPI\VCAPI.SYS D:\CAPI That driver is not that good with the WSeB kernel….. its not a fault in the kernel the device driver has been written badly….

Also when you have an application that causes a trap. Its useless to uninstall the app and reinstall. All apps are ring 3 code (they don't run on kernel level!)

Usually its a sound driver or video driver, switch to standard VGA or change resolution. Turn off sound, this way you can in many cases locate the problem!