The trap screen and has in two basic formats:
The application exception (SYS0147, SYS317x, SYS3190) messages.
The Internal Processing Error (IPE).
Application Trap/Exception
Application exeption popups are logged in the POPUPLOG.OS2 file of which the following is an example. They are also displayed in a popup window in a slightly abbreviated form.
Control of exception logging and popup displays may be done from the TRAPLOG command or SUPPRESSPOPUPS CONFIG.SYS statement.
01-> 02-25-1999 10:58:35 SYS3175 PID 00b2 TID 0001 Slot 0068 02-> E:\CLASSES\LABS\LAB26\BEDBUG.EXE 03-> c0000005 04-> 1bf94e24 05-> P1=00000001 P2=00000000 P3=XXXXXXXX P4=XXXXXXXX 06-> EAX=00000000 EBX=00060210 ECX=0002881c EDX=00060210 07-> ESI=00000001 EDI=00000002 08-> DS=0053 DSACC=d0f3 DSLIM=1fffffff 09-> ES=0053 ESACC=d0f3 ESLIM=1fffffff 10-> FS=150b FSACC=00f3 FSLIM=00000030 11-> GS=0000 GSACC=**** GSLIM=******** 12-> CS:EIP=005b:1bf94e24 CSACC=d0df CSLIM=1fffffff 13-> SS:ESP=0053:000287ec SSACC=d0f3 SSLIM=1fffffff 14-> EBP=000287f8 FLG=00012206 15-> DOSCALL1.DLL 0002:00004e24
The information presented varies slightly according to circumstance. In general, inapplicable information is either omitted, or overlayed with asterisks (*) or exes (X).
Each line of the trap screen conveys the following meaning:
Note:
When P1=00000000 and P2=FFFFFFFF, this frequently indicates that the trap occurred while executing a system API and that the previous instruction in the user's code was a call gate. When this happen a bad parameter has been passed to the system from the application.
If in addition the EFLAGS register has high word 0019xxxx then Virtual Machine Extensions may indirectly be causing a problem. Try VME=NO in CONFIG.SYS.
This information is presented in the form:
xS=nnnn
Reading from right to left the bits of the access field are assigned the following meaning: 0
Notes:
Lines 3-5 are formatted from the Exception Report Record generated at the time the exception occurred.
Lines 6-14 are formatted from the Exception Context Record generated at the time the exception occurred.
Exception report and Context records can be modified by exception handlers so it is possible that the information displayed might not be correct.
Exception popups will not be generated if an exception handler attepts recovery by returning XCPT_CONTINUE_EXECUTION to the system. However this does not guarantee that the program will continue to operate correctly. When recovery is not successful it might be necessary to disable exception handlers. For Presentation Manager and the Workplace Shell this can be done by specifying SET SHAPIEXCEPTIONHANDLER=OFF and SHELLEXCEPTIONHANDLER=OFF in CONFIG.SYS. This can also be done from the kernel debugger by setting the first double-word of a thread's TIB to 0xffffffff. An alternative approach is to use system trace to log exception handler dispatching. Minor codes 361, 362 and 363 of DOSCALL1 will log exception report and context records before and after they have been processed by and exception handler. Minor code 361 logs the original exception information, while minor code 363 logs the exception information that is returned to the system (and used for the popup log). Minor code 262 logs exception information before each exception handler is called. The Exception Registration Record is also logged by the tracepoint.
To activate these tracepoints issue the following command sequence:
TRACE ON /B:512 /D:PROCNAME,TID TRACE ON DOSCALL1(361,362,363)
The first command defines a system trace buffer of 512Kb and turns on logging of Process name and Thread Id with each trace record. The second command activates the tracepoints. Use the TRACEGET and/or the TRACEFMT commands to extract and view the traced events.
Using trace to log exceptions will also provide full trap information for floating point exception, which is not provided by any other means.
The exception address reported in line 4 in most cases agrees with the CS:EIP reported in line 12. However, when a nested exception occurs, the register information will relate to the most recent exception. A particular example of this is where an Exit List Handler traps. Exit List Handlers are called when a process terminates, after any exception handling. The system first generates an XCPT_PROCESS_TERMINATE exception, which may be handled by exception handlers. If this exception is not recovered then process termination continues with Exit List processing. Once this starts, application exception handlers will not be called if any further exceptions are generated. If a further exception is generated then it will become a nested exception of the original XCPT_PROCESS_TERMINATE. If an Exit List Handler traps, a SYS3170 popup will be generated with the register information in lines 6 - 14 corresponding to the nested exception and lines 3 - 5 and 15 corresponding to the original XCPT_PROCESS_TERMINATE exception.
If the system is unable to generate an exception popup message then a SYS0147 is generated. This can happen when there is insuffiencent kernel heap memory left to allocate a HARDERR request packet. This is not the only cause of a SYS0147, PM resource (heap) shortages also cause this message. is exhausted this can occur.
SYS3190 occurs because of a TRAP 6. The application is incorrectly using LOCK prefixes either deliberately or possibly it had taken a wild jump to a non-instuction boundary.
System Internal Processing Error (IPE)
The IPE message appears because of a fatal internal error condition. This may or may not be a trap, though the IPE trap is the most common.
The IPE message has the general format:
1-> <IPE specific Message> 2-> THE SYSTEM DETECTED AN INTERNAL PROCESSING ERROR AT LOCATION ##xxxx:yyyyyyyy - aaaa:bbbb 3-> lllll , ffff 4-> 038600d1 5-> INTERNAL REVISION 6 . 307 DATE: 92/03/01
The parts of the IPE message are:
CPS: Empty allocation block--not supported.or a formatted register dump for a system trap, such as:
TRAP 0002 ERRCD= 0000 ERACC= **** ERLIM= ******** EAX= 7d240a58 EBX= ff202fdc ECX= 00064423 EDX= 00003624 ESI= fff3272c EDI= 7d240004 EBP= 00004a44 FLG= 00003202 CS:EIP= 0160 : fff702a6 CSACC= c09d CSLIM= ffffffff SS:ESP= 0030 : 00004a38 SSACC= 1097 SSLIM= 00003fff DS= 0158 DSACC= c0f3 DSLIM= ffffffff CR0= fffffffb ES= 0158 ESACC= c0f3 ESLIM= ffffffff CR2= 1a060014 FS= 0000 FSACC= **** FSLIM= ******** GS= 0000 GSACC= **** GSLIM= ********
The CS:EIP is prefixed with either ## to indicate protect mode, paging enables in accordance with the Kernel Debugger command prompt.
The kernel relative object:offset address is shown as aaaa:bbbb.
Note: These values are mostly arbitrary and therefore not particularly useful. There is no published cross reference.
An example of the IPE trap screen is show in the following diagram:
1-> TRAP 0002 ERRCD= 0000 ERACC= **** ERLIM= ******** EAX= 7d240a58 EBX= ff202fdc ECX= 00064423 EDX= 00003624 ESI= fff3272c EDI= 7d240004 EBP= 00004a44 FLG= 00003202 2-> CS:EIP= 0160 : fff702a6 CSACC= c09d CSLIM= ffffffff SS:ESP= 0030 : 00004a38 SSACC= 1097 SSLIM= 00003fff 3-> DS= 0158 DSACC= c0f3 DSLIM= ffffffff CR0= fffffffb 4-> ES= 0158 ESACC= c0f3 ESLIM= ffffffff CR2= 1a060014 FS= 0000 FSACC= **** FSLIM= ******** GS= 0000 GSACC= **** GSLIM= ******** THE SYSTEM DETECTED AN INTERNAL PROCESSING ERROR AT LOCATION ##0160:fff6453f - 000d:a53f 60000 , 9084 038600d1 INTERNAL REVISION 6 . 307 DATE: 92/03/01
The register information may be interpreted as for application trap screens, with the following points notes:
CR0 contains processor control mode settings.
CR2 contains the fault address for TRAP E errors.