Date: Mon, 27 Jan 2003 18:15:22 +0900 From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/47538: tar buggy on memory disk partitions Message-ID: <20030127181522G.garrigue@kurims.kyoto-u.ac.jp>
index | next in thread | raw e-mail
>Number: 47538
>Category: bin
>Synopsis: tar buggy on memory disk partitions
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 27 01:20:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Jacques Garrigue
>Release: FreeBSD 5.0-RELEASE i386
>Organization:
Kyoto University
>Environment:
System: FreeBSD tet.kurims.kyoto-u.ac.jp 5.0-RELEASE FreeBSD 5.0-RELEASE #2: Mon Jan 27 08:02:56 JST 2003 garrigue@tet.kurims.kyoto-u.ac.jp:/usr/src/sys/i386/compile/KABOSU i386
>Description:
When used on a memory disk (md), tar exhibits buggy behaviour,
corrupting the data in subtle ways.
As a result, specifying PKG_TMPDIR to /tmp, when /tmp is a swap-backed
memory disk as described in mdconfig(8), will corrupt the installed
packages.
This may seem a minor problem, but amateurs of vn and memfs (both
victims of take-over from md) are going to have serious problems with
5.0.
>How-To-Repeat:
Mount a memory disk on /tmp, as described in mdconfig(8)
mdconfig -a -t swap -s 128M -u 10
newfs -U /dev/md10
mount /dev/md10 /tmp
chmod 1777 /tmp
Use pkg_add to install some big package
pkg_add -r phoenix
Try to use the package:
phoenix
Segmentation fault
You can check the corruption by expanding the package somewhere else
and doing a diff -r.
Alternatively, you can copy some large amount of data from somewhere:
tar cf - -C /usr bin | tar xvf - -C /tmp
diff -r /usr/bin /tmp/bin
>Fix:
I have no fix, but I could check that pax does not exhibit such
behaviour.
So if you only need to copy some data to a memory disk, you can use
pax.
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030127181522G.garrigue>
