NetBSD Problem Report #9647

Received: (qmail 6603 invoked from network); 21 Mar 2000 03:15:08 -0000
Message-Id: <200003210315.MAA05725@icnmp9.icg.tnr.sharp.co.jp>
Date: Tue, 21 Mar 2000 12:15:00 +0900 (JST)
From: itohy@netbsd.org
Reply-To: itohy@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: pax(1) can't read multi-volume archive from device
X-Send-Pr-Version: 3.95

>Number:         9647
>Category:       bin
>Synopsis:       pax(1) can't read multi-volume archive from device
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    christos
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 20 19:18:00 +0000 2000
>Closed-Date:    
>Last-Modified:  Sat Mar 29 17:18:28 +0000 2003
>Originator:     ITOH Yasufumi
>Release:        1.4T (Feb. 23, 2000)
>Organization:

>Environment:
System: NetBSD pino.my.domain 1.4T NetBSD 1.4T (PINO) #197: Tue Feb 22 16:53:26 JST 2000 itohy@pino.my.domain:/usr/src/sys/arch/i386/compile/PINO i386


>Description:
	pax(1) fails to read multi-volume archive from device unless
	the size of media is a muliple of certain value (?? I'm not sure).

	I chose the category "bin" for this pr, but this might be
	a kernel issue.

>How-To-Repeat:
	Try the following instruction.  You need two ttys.

  [ terminal 1 ]			  [ terminal 2 ]
cd /usr/src/bin/pax			cd /var/tmp
raw=`sysctl -n kern.rawpartition | \	dd if=/dev/zero of=img1 bs=100k count=1
	tr 0-7 a-h`			dd if=/dev/zero of=img2 bs=100k count=1
					vnconfig -c vnd0 img1 512/10/2/10
pax -w -v -f /dev/rvnd0$raw [abp]*
  # next archive prompted
					vnconfig -u vnd0
					vnconfig -c vnd0 img2 512/10/2/10
  # type 'y' and return
					vnconfig -u vnd0
cat /var/tmp/img[12] | tar df -
  # no error (archive is OK)

mkdir tmp && cd tmp
					vnconfig -c vnd0 img1 512/10/2/10
pax -r -v -f /dev/rvnd0$raw
  # next archive prompted
					vnconfig -u vnd0
					vnconfig -c vnd0 img2 512/10/2/10
  # type 'y' and return
					vnconfig -u vnd0
diff . ..
  # shows difference
  # THIS IS WRONG

cd ..					rm img[12]
rm -r tmp


>Fix:
	The cause of this problem is that pax(1) can't see the
	end of media (EOM) of disk device.
	read(2) returns with EIO if the request exceeds the EOM,
	and pax(1) fails to read just before the EOM of the device.

	Possible fix would be:

	 1. fix pax(1) to be able to find the EOM of disk using
	    some special methods, or,

	 2. fix the kernel and make read(2) and write(2) return
	    with partial success at the EOM (just like as regular file).

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: bin-bug-people->christos 
Responsible-Changed-By: perry 
Responsible-Changed-When: Sat Mar 29 09:16:22 PST 2003 
Responsible-Changed-Why:  
christos is mr. pax 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.