8.922 bytes

Service Hints & Tips

Document ID: DDSE-3QKKCK

This document is provided to IBM and our Business Partners to help sell and/or service IBM products. It is not to be distributed beyond that audience or used for any other purpose.

Cross Brand - OS/2 Trap Errors

Applicable to: World-Wide

Traps are the most obvious form of errors. Large error messages are displayed and the user has no control over the recovery action. But traps usually do little or no damage to the system - they are designed to stop an errant process in its tracks before damage occurs, and only your unsaved data will be lost. Traps within the kernel will often necessitate re-booting the system, but this is often preferable to losing the contents of your hard disk, or having your data corrupted.

The error detection features of the Intel 80386 architecture are fully exploited under OS/2. When the 386 processor detects an error, it will branch to an exception handler to process the event.

If the error is in the code running in the kernel, at ring 0, then it is usually fatal and the system will stop.

If the error happens in user code, running at ring 3, then the exception is usually handled either by the program itself or by OS/2 default exception handlers. Most of these exception handlers terminate the application (process).

Knowing where a trap is occurring is all that a user can do. It will be up to the programmer to fix the problem and send you a new module. However, you will be able to identify more closely the source of the problem.

The examples below show the trap code and the default action for kernel and user code.

Application Traps

Traps in user level code that are handled by OS/2 will display pop-up messages. If the program is running under PM then the message will be a PM dialog. If the process is running in a full-screen session, or is detached, then a VIO pop-up is displayed. Both PM and VIO pop-ups display a summary first, then a more detailed pop-up if you select Display register information. The register information is critical in problem determination.

The following are examples of OS/2 handled traps and the subsequent messages. The example below is the summary message and the second example shows the detailed message available by selecting the Display register information.

SYS3175: A program in this session encountered a problem and cannot continue
End program/command/operation
Display register information
Display help
A program generated an access violation at 0001001f.
TRAPFS.EXE 0001:0000001f
P1=00000001 P2=00000000 P3=XXXXXXXX P4=XXXXXXXX
EAX=00000000 EBX=00000000 ECX=00070010 DX=00070310
ESI=00000000 EDI=00000000
DS=0053 DSACC=d0f3 DSLIM=1bffffff
ES=0053 ESACC=d0f3 ESLIM=1bffffff
FS=150b FSACC=00f3 FSLIM=00000030
GS=0000 GSACC=**** GSLIM=********
CS:EIP=005b:0001001f CSACC=d0df CSLIM=1bffffff
SS:ESP=0053:000260e4 SSACC=d0f3 SSLIM=1bffffff
EBP=000260ec FLG=00012246
End program/command/operation
Redisplay error message
Display help

For 32-bit applications, the following error message will be displayed after the process has been terminated:

[C:\]trapfs
General Protection Fault exception occurred at
EIP = 0001001F on thread 0001.
Register Dump at point of exception:
EAX = 00000000 EBX = 00000000 ECX = 00070010 EDX = 00070310
EBP = 000260EC EDI = 00000000 ESI = 00000000 ESP = 000260E4
CS = 005B CSLIM = 1BFFFFFF DS = 0053 DSLIM = 1BFFFFFF
ES = 0053 ESLIM = 1BFFFFFF FS = 0150B FSLIM = 00000030
GS = 0000 GSLIM = 00000000 SS = 0053 SSLIM = 1BFFFFFF
Process terminating.

SYS1808:
The process has stopped. The software diagnostic code (exception code) is 0005.
[C:\]

If the application was running in the PM session, the equivalent Presentation Manager message boxes will be displayed.

Kernel Traps
For kernel level errors you will see the following message:

TRAP 000e ERRCD=0000 ERACC=**** ERLIM=********
EAX=ff050c20 EBX=000000bb ECX=ffff00c1EDx=fff379b8
ESI=ffe55a3c EDI=00000000 EBP=00004eb8 FLG=00013282
CS:EIP=0160:fff8dbb8 CSACC=c09b CSLIM=ffffffff
SS:EIP=0030:00004eb4 SSACC=1097 SSLIM=00003fff
DS=0158 DSACC=c0f3 DSLIM=ffffffff CR0=8001001b
ES=0158 DSACC=c0f3 DSLIM=ffffffff CR2=000000c7
FS=0000 FSACC=**** FSLIM=********
GS=0000 GSACC=**** GSLIM=********

The system detected an internal processing error at location
##0160:fff66bf0 - 000d:9bf0. 60000, 9084
048600b4 Internal revision
8.125, 94/02/16

The system is stopped. Record the location number of the error and contact your service representative.

For hardware errors, you will see the following message:
The system detected an internal processing error at location
##0160:ffbabbc - 000d:00064bbc.
1162, 7019
048600b4
Internal revision
6.514, 93/04/12

The system is stopped. Record the location number of the error and contact your service representative.

These messages mean that you will have to power off, or re-set, to be able to restart your system. Pressing Ctrl+Alt+Del will not work if the message contains the text 'the system is stopped'. The only key that will work at this point is the one to initiate a system memory dump.

Identifying the Ring Where a Trap Occurred

The last hex digit of the CS value displayed in the trap screen allow you to determine the privilege level (ring) that the code was running in when the trap occurred. The last two bits of this number contain the ring and the example below shows how to decode it.
The CS value can appear in several formats depending on the type of trap:

CS:EIP=005b:0001001f CSACC=d0df CSLIM=1bffffff

or,
CS = 005B CSLIM = 1BFFFFFF DS = 0053 DSLIM = 1BFFFFFF

Both the above trap reports return the CS value as 5B and, using the examples above, this means that the trap occurred in ring 3, or application code.

Ring,Last CS digit,Area
0,0 4 8 C,Kernel if EIP <>7xxxxxxx
0,0 4 8 C,Virtual Device if EIP == 7xxxxxxx
1,1 5 9 D,No software runs at ring 1
2,2 6 A E,No software runs at ring 1
3,3 7 B F,Application level code

Search Keywords

Hint Category

OS/2, Error Messages

Date Created

30-08-95

Last Updated

11-08-98

Revision Date

10-08-99

Brand

Cross Brand

Product Family

Various

Machine Type

Various

Model

TypeModel

Retain Tip (if applicable)

Reverse Doclinks
and Admin Purposes