PANIC: Kernel mode trap

Jerry Gardner jerry at altos86.Altos.COM
Fri Jan 4 05:06:23 AEST 1991


erekose at apple.com (Erik Scheelke) writes:

>I am looking for any information about the following panic that occurs
>occasionally on my system:
>
>PANIC: Kernel mode trap    type 0x0000000e
>
>Can anyone explain what causes a Kernel mode trap in general?  Type 0x0e?


A kernel mode trap occurs when the UNIX kernel services a trap when it's running
in kernel mode (as opposed to user mode).  There are many things that cause a
trap on the 386.  A few examples are single-step trap, extension error, general
protection violation, breakpoint, and page fault, to name a few.

The kernel contains code to attempt to deal with each of these traps.  If it
cannot recover from the trap, the default case is to display the registers
and panic.

A kernel mode trap, type 0x0e is a page fault trap that occured while the
the system was running on the kernel stack (in kernel mode).  Since the
kernel is not paged, a page fault occuring in kernel mode is generally
fatal.  The exception is when the kernel is moving data to or from a
user's process space on behalf of that process.  In this case, the kernel
will try to validate the user page and retry the access.  If it can't
validate the page, it fails the system call that caused the access.

A page fault trap in user mode is a more normal occurance.  In this case,
the kernel will simply try to read in the page that faulted and retry the
operation.  If the page isn't part of the processes address space, the
kernel will send a signal (SIGSEGV) to the process.  This does not result
in a panic.

What causes a kernel mode trap, type 0x0e?  The most common cause is a
bug in the kernel that causes it to access a memory location not mapped
by a page table.  A common cause of this is an uninitialized pointer or
some other bogus pointer reference.

You should probably report the circumstances of the trap to the vendor of
your OS.  Try to write down the contents of the system registers at the
time of the trap as these contain important clues relating to the cause of
the trap.  In particular, CR2 contains the linear address of the memory
reference that caused the trap and EIP is the program counter location at
the time of the trap.



-- 
Jerry Gardner, NJ6A					Altos Computer Systems
UUCP: {sun|pyramid|sco|amdahl|uunet}!altos!jerry	2641 Orchard Parkway
Internet: jerry at altos.com				San Jose, CA  95134
Guns don't kill people, bullets do.                     (408) 432-6200



More information about the Comp.unix.sysv386 mailing list