system crashes trap type 8

v.wales%ucla-locus at sri-unix.UUCP v.wales%ucla-locus at sri-unix.UUCP
Fri Sep 16 11:14:46 AEST 1983


From:            Rich Wales <v.wales at ucla-locus>

	Date: 16 Aug 83 16:02:56-PDT (Tue)
	To: Unix-Wizards at brl-vgr
	From: decvax!linus!utzoo!utcsrgv!qucis!tb at ucb-vax
	Subject: system crashes trap type 8

	system crashes with an error message ...

	trap type 8, code=8c20004, pc=800137c6

	The pc always points to the dzxint routine. The parameter
	passed to the dzxint routine, at the time of the crash, has the
	wrong value.  Therefore this parameter, which is a pointer into
	the tty structure is pointing to invalid information causing
	the system to crash.  This can happen twice a day, generally
	during peak times.

	questions are ...
	1) In the trap message what does "code=8c20004" mean.
	2) If anyone has experienced similar problems please reply any
	   helpful information.

Sorry this reply is so late -- but (hopefully) late is better than
never . . . .

I once encountered something very similar to your problem.  I was test-
ing out some mods to the DZ pseudo-DMA routine in "sys/locore.s" in our
4.1BSD kernel.  I made a mistake in my usage of registers (I think I
forgot to save and restore some register); as a consequence, the system
promptly screamed "trap type 8" as soon as it tried to access a DZ --
followed, I believe, with about half a page of "trap type 2" until it
finally dropped dead.  I fixed the problem by being very sure I saved
and restored -- via the "pushr" and "popr" instructions -- any regis-
ters I played with (something which you tend to forget about if you do
all your programming in C).

In the on-line manual ("man 8 crash"), there is a list of trap type
codes.  Trap types 8 and 9, for example, indicate attempts by the
kernel to access invalid addresses.  The "code" value is the address
the CPU was trying to access.  For more details, study the kernel code
that produced the error message (in "sys/trap.c"); you will see that,
with only a couple of exceptions, any trap in kernel mode will result
in a panic like the one you saw.

What you should try to do is look at the machine language at the point
of the crash, using the "i" (disassemble) command in "adb /vmunix".
Then figure out which register or memory location could be at fault (I
would guess that you probably smashed a register by accident).  From
there, I'm afraid you're on your own.

Recall also, by the way, that "dzxint" is NOT the "real" DZ transmitter
interrupt routine in 4.1BSD -- "dzdma" in "sys/locore.s" is.  "dzdma"
calls "dzxint" (indirectly via the "p_fcn" value in a "struct pdma";
see "h/pdma.h") when it needs more bytes to stuff down a DZ line.

If you haven't been playing around with your "sys/locore.s", I must
confess perplexity and confusion as to what is causing your problem.

-- Rich <wales at UCLA-LOCUS>



More information about the Comp.unix.wizards mailing list