From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 16 12:10:02 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2EE516A468 for ; Tue, 16 Oct 2007 12:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BE02913C459 for ; Tue, 16 Oct 2007 12:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9GCA2TB078445 for ; Tue, 16 Oct 2007 12:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9GCA2RW078444; Tue, 16 Oct 2007 12:10:02 GMT (envelope-from gnats) Resent-Date: Tue, 16 Oct 2007 12:10:02 GMT Resent-Message-Id: <200710161210.l9GCA2RW078444@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, P Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C880A16A46E for ; Tue, 16 Oct 2007 12:02:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id AFE1A13C4B3 for ; Tue, 16 Oct 2007 12:02:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9GC2msP099672 for ; Tue, 16 Oct 2007 12:02:48 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l9GC2mI6099667; Tue, 16 Oct 2007 12:02:48 GMT (envelope-from nobody) Message-Id: <200710161202.l9GC2mI6099667@www.freebsd.org> Date: Tue, 16 Oct 2007 12:02:48 GMT From: P To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/117241: Stock i386/v6.0 nfs + cp -pRP cause corrupted files on destination volume. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2007 12:10:02 -0000 >Number: 117241 >Category: kern >Synopsis: Stock i386/v6.0 nfs + cp -pRP cause corrupted files on destination volume. >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 16 12:10:02 UTC 2007 >Closed-Date: >Last-Modified: >Originator: P >Release: 6.0-RELEASE #0 >Organization: >Environment: FreeBSD f6.my.domain 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 >Description: Mounting an nfs volume from a '6.2-RELEASE #0' machine with default settings. Cause some files (50%?) to miss the last block of the file. At least when copying gigabytes of data. Seems the destination file lenght is = int(source_filesize/512)*512. In the other direction (6.2 -> 6.0) there's no problem asfaik. I have not investigated this problem 100%. But I think it's serious enough that others should know. Maybe some test script should be written to test for this condition before releasing new versions? >How-To-Repeat: Proberbly setup machine1 with v6.0, and machine2 with v6.2. Then copy many files via default nfs from v6.0 disc to v6.2 nfs volume. pb@v60 ~ #cp -p img_8030.jpg /nfs62/ pb@v60 ~ #dir img_8030.jpg /nfs62/ -rw-r--r-- 1 pb wheel 3121562 Sep 24 2007 img_8030.jpg /nfs62/: -rw-r--r-- 1 pb wheel 3121152 Sep 24 2007 img_8030.jpg 3121562 / 512 = 6096.80078125 3121152 / 512 = 6096 3121562 % 512 = 410 3121152 % 512 = 0 >Fix: Use tar/pax/cpio etc.. + tcp pipes. Don't copy via nfs. >Release-Note: >Audit-Trail: >Unformatted: