Subject: panic: crazy interrupts
To: None <port-sparc@NetBSD.ORG>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 10/31/1997 07:36:17
I'm doing a build-of-the-world on that 1+ I mentioned earlier, and I'm
having trouble with "panic: crazy interrupts".

My disk setup is seven 80M Quantums.  One is root+swap, one is /usr,
and four more are concatenated in a ccd as /usr/src.  The seventh is
currently not used.  Console is ttya.

Initially, I would

	# cd /usr/src
	# make build > zerrs 2>&1 &
	# tail +0f zerrs

but then I would get a "crazy interrupts" crash fairly promptly.  After
three successive failures like that, I went back to what worked before,
doing

	# cd /usr/src
	# make build

However, even then I got crazy interrupts eventually.  My suspicion is
that it happens when an "esp0: ESP100 work-around activated" message
happens during the printing of something else, and running with output
going into a file and then using tail -f on the file simply makes it
more likely that something else will be printing when the esp message
prints.  Here's what the most recent crash looked like; note the
characters appearing before the "stray interrupt" messages:

===> sbin/swapctl
cc -O  -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith  -c swapctl.c
cc -O  -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith  -c swaplist.c
cc  -static -o swapctl swapctl.o swaplist.o 
nroff -mandoc swapctl.8 > swapctl.cat8
===> sbin/ttyflags
cc -O  -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith  -c ttyflagsesstray interrupt ipl 0xc pc=0xf00f7f54 npc=0xf00f7f58 psr=4003c2<S,PS>
pstray interrupt ipl 0xc pc=0xf00f7f54 npc=0xf00f7f58 psr=4003c2<S,PS>
0stray interrupt ipl 0xc pc=0xf00f7f54 npc=0xf00f7f58 psr=4003c2<S,PS>
:stray interrupt ipl 0xc pc=0xf00f7f54 npc=0xf00f7f58 psr=4003c2<S,PS>
 stray interrupt ipl 0xc pc=0xf00f7f54 npc=0xf00f7f58 psr=4003c2<S,PS>
Estray interrupt ipl 0xc pc=0xf00f7f54 npc=0xf00f7f58 psr=4003c2<S,PS>
Sstray interrupt ipl 0xc pc=0xf00f7f54 npc=0xf00f7f58 psr=4003c2<S,PS>
Pstray interrupt ipl 0xc pc=0xf00f7f54 npc=0xf00f7f58 psr=4003c2<S,PS>
1stray interrupt ipl 0xc pc=0xf00f7f54 npc=0xf00f7f58 psr=4003c2<S,PS>
0stray interrupt ipl 0xc pc=0xf00f7f54 npc=0xf00f7f58 psr=4003c2<S,PS>
panic: crazy interrupts
Stopped at      _Debugger+0x4:  jmpl            [%o7 + 0x8], %g0
db> 

At least one of the other crashes (whose output I don't have handy)
looked similar, in that I could see "esp0: ESP100..." appearing before
the "stray interrupt" messages.  (They've all been "ipl 0xc", IIRC.)

This kernel was built from the sup of Oct 25th AM.  Once this "make
build" completes, I'll bring over a fresher source tree and retry; if
anything has been done to the SPARC zs driver or the interrupt
machinery in the last week that could have fixed this, feel free to
ignore me.

Here's what a boot looks like:

ok boot -s
Booting from: sd(0,0,0) -s 
>> NetBSD/sparc Secondary Boot, Revision 1.7
>> (root@, Wed Oct 29 12:17:15 PST 1997)
Booting netbsd @ 0x4000
1368064+114816+80628+[81168+95311]=0x1accdb
[ preserving 176488 bytes of netbsd symbol table ]
console is ttya
Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.3_ALPHA (GENERIC) #0: Thu Oct 23 13:02:09 EDT 1997
    mouse@Callisto.McRCIM.McGill.EDU:/sources/working-usr-src/sys/arch/sparc/compile/GENERIC
real mem = 16723968
avail mem = 14045184
using 128 buffers containing 524288 bytes of memory
bootpath: /sbus0/esp0/sd@0,0
mainbus0 (root): Sun 4/65
cpu0 at mainbus0: MB86900/1A or L64801 @ 25 MHz, WTL3170/2 FPU
cpu0: 64K byte write-through, 16 bytes/line, sw flush: cache enabled
memreg0 at mainbus0 ioaddr 0xf4000000
clock0 at mainbus0 ioaddr 0xf2000000: mk48t02 (eeprom)
timer0 at mainbus0 ioaddr 0xf3000000 delay constant 10
auxreg0 at mainbus0 ioaddr 0xf7400000
zs0 at mainbus0 ioaddr 0xf1000000 pri 12, softpri 6
zstty0 at zs0 channel 0 (console)
zstty1 at zs0 channel 1
zs1 at mainbus0 ioaddr 0xf0000000 pri 12, softpri 6
kbd0 at zs1 channel 0
ms0 at zs1 channel 1
fdc0 at mainbus0 ioaddr 0xf7200000 pri 11, softpri 4: chip 82072
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
audioamd0 at mainbus0 ioaddr 0xf7201000 pri 13, softpri 4
audio0 at audioamd0
sbus0 at mainbus0 ioaddr 0xf8000000: clock = 25 MHz
dma0 at sbus0 slot 0 offset 0x400000: rev 1
esp0 at sbus0 slot 0 offset 0x800000 pri 3: ESP100, 25MHz, SCSI ID 7
scsibus0 at esp0: 8 targets
sd0 at scsibus0 targ 0 lun 0: <QUANTUM, LP80S  980809404, 3.3> SCSI2 0/direct fixed
sd0: 80MB, 921 cyl, 4 head, 44 sec, 512 bytes/sect x 164139 sectors
sd1 at scsibus0 targ 1 lun 0: <QUANTUM, LP80S  980809404, 3.3> SCSI2 0/direct fixed
sd1: 80MB, 921 cyl, 4 head, 44 sec, 512 bytes/sect x 164139 sectors
sd2 at scsibus0 targ 2 lun 0: <QUANTUM, LP80S  980809404, 3.3> SCSI2 0/direct fixed
sd2: 80MB, 921 cyl, 4 head, 44 sec, 512 bytes/sect x 164139 sectors
sd3 at scsibus0 targ 3 lun 0: <QUANTUM, LP80S  980809404, 3.3> SCSI2 0/direct fixed
sd3: 80MB, 921 cyl, 4 head, 44 sec, 512 bytes/sect x 164139 sectors
sd4 at scsibus0 targ 4 lun 0: <QUANTUM, LP80S  980809404, 3.3> SCSI2 0/direct fixed
sd4: 80MB, 921 cyl, 4 head, 44 sec, 512 bytes/sect x 164139 sectors
sd5 at scsibus0 targ 5 lun 0: <QUANTUM, LP80S  980809404, 3.3> SCSI2 0/direct fixed
sd5: 80MB, 921 cyl, 4 head, 44 sec, 512 bytes/sect x 164139 sectors
sd6 at scsibus0 targ 6 lun 0: <QUANTUM, LP80S  980809404, 3.3> SCSI2 0/direct fixed
sd6: 80MB, 921 cyl, 4 head, 44 sec, 512 bytes/sect x 164139 sectors
le0 at sbus0 slot 0 offset 0xc00000 pri 5: address 08:00:20:09:59:34
le0: 8 receive buffers, 2 transmit buffers
bwtwo0 at sbus0 slot 2 offset 0x0: SUNW,501-1455, 1152 x 900
bwtwo0: attached to /dev/fb
root on sd0a dumps on sd0b
mountroot: trying ffs...
root file system type: ffs
init: copying out flags `-s' 3
init: copying out path `/sbin/init' 11
Enter pathname of shell or RETURN for sh: 
Don't login as root, use the su command.
# 

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B