Subject: Re: Kernel panic if tape in drive at boot
To: Brian A. Seklecki <lavalamp@spiritual-machines.org>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: netbsd-help
Date: 09/27/2003 13:54:59
On 8 Sep 2003, Brian A. Seklecki wrote:
> On Mon, 2003-09-08 at 09:24, Stephen Borrill wrote:
> > I've got a machine with an ATAPI Seagate 10/20 Travan tape drive. It's
> > running 1.6.1. If a tape is in the drive at boot time, the kernel panics.
> > 
> > st0 st0(pciide0:1:1) polling command not done
> > panic: scsipi_execute_xs
> > 
> > The trace is:
> > 
> > scsipi_execute_xs
> > atapi_scsipi_cmd
> > scsipi_command
> > scsipi_test_unit_ready
> > stattach
> > st_atapibus_attach
> > config_attach
> > atapi_probe_device
> > etc...
> > 
> 
> That's an odd one.  Have a look:
> 
> http://216.239.33.104/search?q=cache:gvlpWC03Y8YJ:mail-index.netbsd.org/port-i386/2002/12/15/0015.html+netbsd+Seagate+travan+panic&hl=en&ie=UTF-8

Yes, saw that. Nobody replied to it though (except for buy a new drive).
 
> If it were up to me, I would make an Bootable ISO from an i386 -current
> snapshot.  Disconnect hard drives with critical data.  Boot the CD and
> see if it's been fixed in current.  A lot of ATAPI/SCSI changes have
> been made since the branch, some as early as today (yesterday).

As the drive was at a distant customer's site, I was unable to do a test
with -current. Another customer has returned a Seagate Travan 40
(STT3401A) to us which fails in the same way, so I have been able to test.
-current doesn't panic, but curiously it always reports the drive as
being empty at boot time:

pciide0:1:1: lost interrupt
        type: ata tc_bcount: 512 tc_skip: 0
pciide0:1:1: lost interrupt
        type: ata tc_bcount: 512 tc_skip: 0
atapibus0 at pciide0 channel 1: 2 targets
st0 at atapibus0 drive 0: <Seagate STT3401A, HP02WSA, 309I> tape removable
st0: drive empty
st0: 32-bit data port
st0: drive supports PIO mode 3
st0(pciide0:1:0): using PIO mode 3

This is on completely different hardware by the way, so it's not an oddity
related to the IDE controller.

Incidentally, the STT3401A in question always fails when writing:

st0(pciide0:1:0):  Check Condition on CDB: 0x1b 01 00 00 02 00
    SENSE KEY:  Illegal Request
     ASC/ASCQ:  Medium Removal Prevented

st0: error 22 in st_load (op 2)
st0: WARNING: cannot revert to default density
tar: only wrote 5120 of 10240 bytes to /dev/rst0

I think the drive is faulty (amusingly, Seagate's DOS diagnostics abort
with divide by 0, so it can't be properly tested), so it is being
returned. We'll see what happens when it comes back. Certainly the 10/20
model works fine with NetBSD (except for the panic reported originally).

-- 
Stephen