From nobody@FreeBSD.org  Mon Jan  2 20:01:53 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 230A716A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Jan 2006 20:01:53 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 134FA43D7E
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Jan 2006 20:01:50 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k02K1n4D049260
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 2 Jan 2006 20:01:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k02K1ne6049259;
	Mon, 2 Jan 2006 20:01:49 GMT
	(envelope-from nobody)
Message-Id: <200601022001.k02K1ne6049259@www.freebsd.org>
Date: Mon, 2 Jan 2006 20:01:49 GMT
From: Steve Davidson <stevedav@sonic.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /dev/nsa0 generates an error on write of second tape file
X-Send-Pr-Version: www-2.3

>Number:         91236
>Category:       i386
>Synopsis:       /dev/nsa0 generates an error on write of second tape file
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 02 20:10:04 GMT 2006
>Closed-Date:    Mon Jan 02 21:39:21 GMT 2006
>Last-Modified:  Mon Jan 02 21:39:21 GMT 2006
>Originator:     Steve Davidson
>Release:        5.4 BETA1
>Organization:
>Environment:
FreeBSD 5.4 BETA1 (default kernal; no kernel builds)           
>Description:
If you try to write a second tape file to the tape no-rewind device after you have completed the first write, you will get the error messages listed below and you will not get a second tape file.

% tar cvf /dev/nsa0 file             ...works
% tar cvf /dev/nsa0 file             ...error, as below

% tail -f /var/log/messages

Jan  1 17:46:09 bayside kernel: (sa0:umass-sim0:0:0:0): WRITE FILEMARKS. CDB: 10 0 0 0 2 0
Jan  1 17:46:09 bayside kernel: (sa0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
Jan  1 17:46:09 bayside kernel: (sa0:umass-sim0:0:0:0): SCSI Status: Check Condition
Jan  1 17:46:09 bayside kernel: (sa0:umass-sim0:0:0:0): ILLEGAL REQUEST asc:50,0
Jan  1 17:46:09 bayside kernel: (sa0:umass-sim0:0:0:0): Write append error
Jan  1 17:46:09 bayside kernel: (sa0:umass-sim0:0:0:0): Retries Exhausted
Jan  1 17:46:09 bayside kernel: (sa0:umass-sim0:0:0:0): failed to write terminating filemark(s)
Jan  1 17:46:09 bayside kernel: (sa0:umass-sim0:0:0:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state.




An 'mt -f /dev/nsa0 rewind' command "unfreezes" the tape for future operations.

Also, an 'mt -f /dev/nsa0 weof' does not create an EOF mark on the tape.
>How-To-Repeat:
Issue two write commands to the '/dev/nsa0' device.  E.g. two tar commands to the tape no-rewind device.              
>Fix:
Probably, this is a device driver problem.  It could be in the tape unit implementation.  Check it out.             
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Jan 2 21:37:43 UTC 2006 
State-Changed-Why:  
Duplicated by usb/91238. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91236 
>Unformatted:
