From owner-freebsd-bugs Mon Jan 27 1:20: 4 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 526E637B401 for ; Mon, 27 Jan 2003 01:20:02 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BFBF43F1E for ; Mon, 27 Jan 2003 01:20:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h0R9K1NS041470 for ; Mon, 27 Jan 2003 01:20:01 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h0R9K1nm041469; Mon, 27 Jan 2003 01:20:01 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B73937B401 for ; Mon, 27 Jan 2003 01:16:04 -0800 (PST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id B001843E4A for ; Mon, 27 Jan 2003 01:16:02 -0800 (PST) (envelope-from garrigue@kurims.kyoto-u.ac.jp) Received: from localhost (tet.kurims.kyoto-u.ac.jp [130.54.16.184]) by kurims.kurims.kyoto-u.ac.jp (8.9.3/3.7W) with ESMTP id SAA24106; Mon, 27 Jan 2003 18:16:00 +0900 (JST) Message-Id: <20030127181522G.garrigue@kurims.kyoto-u.ac.jp> Date: Mon, 27 Jan 2003 18:15:22 +0900 From: Jacques Garrigue To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/47538: tar buggy on memory disk partitions Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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