Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Reading a QNX4 Proc Dump
Ref. No. QNX.000009545
Category(ies) Kernel
Issue Our application just crashed with a Proc fault. What does all of the information on the screen mean?

Solution A proc fault and a kernel fault are slightly different.  Proc is the program thats running, and the kernel is like a very high priority shared library.  When a function makes a kernel call, it will call directly into the kernel.  The kernel runs on it's behalf.  The kernel can tolerate some faults, and in fact does so to ensure memory protection is maintained.  There are some faults the kernel cannot tollerate.  These fall into the following categories:
        -bugs in the kernel code
        -kernel data corruption
        -interrupt handlers (which are invoked by the kernel) faulting.
The vast majority are the latter two, both typically caused by not setting the correct compiler options for interrupt handlers (-zu). Poor quality code in interrupt handlers make up a sizeable portion as well.

If a kernel/proc fault occurs something similar to the following will be printed on the screen:

Version 4.25H Oct 15 1998
Proc fault 1  ldt100  sys/Proc32; fault e+0
cs:eip=5:8a87 ss:esp=d:f7c0f74 efl=12287 ds=d es=8 fs=0 gs=0
eax/ff814fc ebx/ff814fc ecx/0 edx/ff81500 esi/0 edi/4ff1c1 ebp/f7c0f78
stack (d:f7c0f74)
00000001 0f7c0f9c 00000001 0001886f 00007780 0000de21 80000099 f053f1c1
00010000 000000e8 0f7c0fb4 00000000 0003bc60 0000d969 00000012 00000091
0f7c0fe8 00000000 00005951 0000000d 00000000 0f7c0fd0 0000646b 000037f4
0000000d 00000610 000037f4 0000000d 00000016 00000001 00005939 00005951
Process Entry (addr 62a0)
00000000 00000001 00000000 00000001 00000000 00000000 30020207 00001e1e
0000582c 1000000d 00006358 ffffffff 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00003201 000d0005 00007798 00000000 00000001
00000010 00000000 00000716 0000e4c0 00000000 00000000 0003c050 00000000
00000000 00000000 00000000 ffff0001 00000000 00000000 00000000


Version: 4.25H Oct 15 1998
This is the complete version of Proc that is in use. Without this information, it is impossible to do any checking since each version of Proc fixed bugs from earlier versions. The main thing to get from this is to make sure the version and the date match, and that it shows this system can be upgraded to a newer version of QNX.


Proc fault 1, ldt 100 sys/Proc32;
This line gives you a bit of environment information. It will say either Proc fault or kernel fault depending on which it is.


fault e+0
The numbers after fault X+#. X is the offending fault number in hex, # is the processor supplied error code.  The significance of # varies with X; these are well documented in INTEL 80x86 manuals.

cs:eip=5:8a87
In accordance with 80x86 segmentation rules, bits 0..1 of the segment encode it's privity; bit 2 determines ldt or gdt, and the remaining
13 bits the index into the respective table.
Some interesting values:
        4  privity 0, ldt, index 0 -- an interrupt handler in an application.
        f0 privity 0, gdt, index 30 - kernel code segment.
        5  privity 1, ldt, index 0 -- since it is privity 1, must be proc.