Subject: Crash using SCSI TK50 in NetBSD 1.6.1
To: None <>
From: John A. Dundas III <>
List: port-alpha
Date: 06/30/2003 10:27:23

If this is not the correct forum, please forgive me and tell me the correct
place to post.

I have an AS200 (4/233) with a TK50Z-GA attached.  The boot messages from
dmesg can be viewed here:


First, it appears that the TK50 is not recognized other than as a generic
SCSI tape drive (st0).  I suppose that's fine, though I wonder if it is the
cause of the crash I am experiencing (to be described).  In googling
through some of the old netbsd archives, I see some patches specifically
aimed at this drive (though they were in the VAX port).  However none of
this code is in the current st driver.  Should/could it be there?

Well, what I'm trying to accomplish is to make .TAP archives of TK50 tapes.
I have written a small program to read the tape and write an appropriately
formatted disk file.  The program may be viewed here:


The program has generally worked just fine.  However I have encountered a
system crash (and thus the motivation for the email) with, I believe, one
type of tape.  [Specifically, the last or only tape in a VMS backup save
set archive.  Seems consistent with these.]  The most recent crash,
yesterday, is listed below.  I apologize in advance for the
hand-transcribed crash data as I don't have a way to get this
electronically at this time.  If there are any errors it is due to my
transcription; the transcript has been edited slightly.

st0 (siop0:0:0:0): Check condition on CDB: 0x08 00 00 80 00 00
    SENSE KEY: Recovered Error
               Incorrect Length Indicator Set
   INFO FIELD: 16867328
 COMMAND INFO: 671088743 (0x28000067)
     ASC/ASCQ: No Index/Sector Signal

panic: Kernel diagnostic assertion "done >= 0" failed
       file ...kern/kern_physio.c, line 222

Stopped in pid 236 (tapin) at cpu_Debugger+0x4: ret zero,(ra)

The tapin program was indeed running at the time.  Partial output from the
program can be viewed from the script output at:


Note that this is only a partial transcript of stdout as the complete file
was not recovered after the system crashed.

Any suggestions about where to start and how to proceed are very much