Subject: kernel panic with 1.2-release some time after auto-changing tapes
To: Laine Stump <laine@morningstar.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 12/21/1996 15:34:17
Laine Stump <laine@MorningStar.Com> writes:

>Also - I tried turning off debugging in my kernel config (so the system
>would just collect a coredump and reboot on panics), but the kernel
>refused to build properly. Exactly what do I need to turn off in my
>config to turn off kdb, while still getting buildable kernel source?


Did you remember to rerun make depend?
The following _should_ suffice (from your i386/conf directory) :
	config <YOURCONFIG>
	cd ../compile/YOURCONFIG
	make depend; make

If it doesn't, then there's a bug in  config's dependencies.
Try removing the following files:
	locore.o machdep.o trap.o kern_clock.o kern_synch.o subr_prf.o

if that fixes things, and make depend doesn't, then all those files
should depend on something that changes when DDB is added or removed
to a config, and you should send a PR. (The simplest kludge is to have
these files depend on the kernel Makefile.)

Re the scsi problem, which may not be i386-specific:

>Here's what the probe of the SCSI controll and all the SCSI devices
>looks like:

>   ahc0 at pci0 dev 18 function 0
>   ahc0: interrupting at irq 11
>   ahc0: Reading SEEPROM...done.
>   ahc0: aic7880 Wide Channel, SCSI Id=7, 16 SCBs
>   ahc0: Reseting Channel A
>   ahc0: Downloading Sequencer Program...Done
>   scsibus0 at ahc0
>   ahc0: target 0 using 16Bit transfers
>   ahc0: target 0 synchronous at 10.0MHz, offset = 0x8
>   sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST15150W, 0023> SCSI2 0/direct fixed
>   sd0: 4095MB, 3712 cyl, 21 head, 107 sec, 512 bytes/sec
>   ahc0:A:4: refuses WIDE negotiation.  Using 8bit transfers
>   ahc0: target 4 synchronous at 5.0MHz, offset = 0xf
>   probe(ahc0:4:0): Target Busy
>   probe(ahc0:4:0): Target Busy
>   st0 at scsibus0 targ 4 lun 0: <ARCHIVE, Python 28849-XXX, 4.CM> SCSI2 1/seque
>ntial removable
>   st0: st0(ahc0:4:0): Target Busy
>   st0(ahc0:4:0): Target Busy
>   st0(ahc0:4:0): Target Busy
>   drive empty
>   probe(ahc0:4:1): Target Busy
>   probe(ahc0:4:1): Target Busy
>   ch0 at scsibus0 targ 4 lun 1: <ARCHIVE, Python 28849-XXX, 4.CM> SCSI2 8/chang
>er removable
>   ch0: 12 slots, 1 drive, 1 picker
>
>And here's what the panic looks like (note this was copied from the
>console by hand, and by somebody other than me - I can't vouch for the
>accuracy...). This happened some time (several hours, it seems) after
>someone ran a script that attempted to auto change tapes while doing tar
>(I believe this script failed, but I'd have to check to be sure):
>
>   ch0(ahc0:4:1): Target Busy
>   ch0(ahc0:4:1): Target Busy
>   ch0(ahc0:4:1): Target Busy
>   ch0(ahc0:4:1): Target Busy
>   ch0(ahc0:4:1): Target Busy
>   ch0(ahc0:4:1): Target Busy
>   ch0(ahc0:4:0): Target Busy
>   ch0(ahc0:4:0): Target Busy
>   ch0(ahc0:4:0): Target Busy
>   ch0(ahc0:4:1): Target Busy
>   ch0(ahc0:4:1): Target Busy
>   ch0(ahc0:4:1): Target Busy
>   ch0(ahc0:4:1): illegal reqest, data - 00 00 00 00 00 00 00 00 00 00
>   panic: ahc0: Timed-out command times out again
>
>

This is just a guess, but it looks like maybe the changer is getting
confused by the WIDE negotiation, or maybe by probing each LUNs.  Have
you tried adding a quirk entry for this device, with either
SDEV_NOSYNCWIDE or SDEV_NOLUNS?