OS/2 FAQ


OS/2 General FAQ - Общая часть. Статья 090

Q Что означает номер TRAP'а и как определить, кто его вызвал?
A
(DZ FAQ) 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]
Trap0005 (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:
  • 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.
  • 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:
  • See Retain Tip #H083121, Section C for several known causes of Trap 0002 Errors.
  • 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.)
  • 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.)
  • If error is received after installing new memory, ensure the SIMMs are supported on the system. (Both speed and manufacturer)
  • 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.
  • On 8570-A61, -A21, -B61, -B21 or 8580-A21, -A31, -A16, refer to ECA 051 and ECA 059 respectively.
  • If the system has a non-IBM EGA adapter card, disable the adapter's auto-switch function.
  • If system is a MCA machine, check to see if there are any applicable ECA's.

For trap 0003 errors, try the following:
  • Check hardware. (The failing hardware is usually not memory modules.)
  • 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:
  • See Retain Tip #H083121, Section C for several known causes of Trap 0006 Errors.
  • Check hardware. (The failing hardware is usually not memory modules.)
  • Disable cache.
  • Most Trap 0006 errors during installation can be corrected by disabling cache, ROM shadowing, turbo, etc.
  • Ensure the installed memory is the correct speed for the system board.
  • 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:
  • See Retain Tip #H083121, Section C for several known causes of Trap 0007 Errors.
  • Obtain a copy of the program that doesn't require a coprocessor or install a coprocessor if possible.
  • Ensure the installed memory is the correct speed for the system board.
  • 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:
  • See Retain Tip #H083121, Section C for several known causes of Trap 0008 Errors.
  • Ensure the installed memory is the correct speed for the system board.
  • If during installation, REM out BASEDEV=IBM1S506.ADD in the CONFIG.SYS on the installation diskette.
  • 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.
  • Check hardware. Trap 0008 errors can sometimes be caused by hardware problems.
  • Check for IRQ conflicts.
  • 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:
  • See Retain Tip #H083121, Section C for several known causes of Trap 000C Errors.
  • 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.
  • Ensure the installed memory is the correct speed for the system board.
  • 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:
  • See Retain Tip #H083121, Section C for several known causes of Trap 000D Errors.
  • Definitely check RETAIN for similar errors. A number of Trap 000D errors are caused by software bugs.
  • If the error occurs every time within the same application and CHKDSK doesn't correct the problem, contact the software developer for further assistance.
  • Check hardware. Trap 000D errors are occassionally caused by hardware problems.
  • Make sure all adapters are supported by OS/2.
  • 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.
  • If this occurs during installation, test the system memory, any memory adapters and the system board. Replace as necessary.
  • If it occurs within a Token Ring environment, ensure the Token Ring RAM window is set at 16 KB.
  • If it occurs while printing, install the newest printer driver and ensure the most current CSD is installed.
  • If system is a MCA machine, check to see if there are any applicable ECA's.
  • Ensure the installed memory is the correct speed for the system board.

For trap 000E errors, try the following:
  • Check RETAIN for similar errors. Some Trap 000E errors are caused by software bugs.
  • If the error occurs every time within the same application and CHKDSK doesn't correct the problem, contact the software developer for further assistance.
  • Check hardware. Trap 000E errors are occassionally caused by hardware problems.

(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!


К предыдущей статье | К оглавлению раздела | К следующей статье

Вернуться к списку разделов FAQ.

Если у вас есть вопросы или пожелания, пишите, мы будем рады.

Данный FAQ cоставили Ivan Borovicov и Viatcheslav Odintsov (2:5020/181) на основе OS/2 FAQ Дмитрия Завалишина (dz) и материалов переписки в группе эхоконференций su.os2.*. Оформление статей: Николай Королев. Программирование JSP для RU/2: Евгений Кулешов. Благодарности: Дмитрию Максимовичу (MaximDim) за громадную помощь на первых этапах и Дмитрию Бану (banshee) за его помощь при проверке текста.



Интересные ссылки:
Комментариев к странице: 0 | Добавить комментарий
Домой | Проект ядро Core/2 | Проект OS/4 Download | Новости | Гостевая книга | Подробно обо всем | Нужные программы | Проекты | OS/2 FAQ | Всячина | За и Против | Металлолом | #OS2Russian | RDM/2 | Весёлые картинки | Наша галерея | Доска объявлений | Карта сайта | ПОИСК | ФОРУМ