From owner-freebsd-bugs Wed Aug 12 16:40:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA05676 for freebsd-bugs-outgoing; Wed, 12 Aug 1998 16:40:06 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA05643 for ; Wed, 12 Aug 1998 16:40:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id QAA12013; Wed, 12 Aug 1998 16:40:01 -0700 (PDT) Received: from vlsi.cs.caltech.edu (vlsi.cs.caltech.edu [131.215.131.129]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id QAA05485 for ; Wed, 12 Aug 1998 16:38:21 -0700 (PDT) (envelope-from mika@dogmatix.cs.caltech.edu) Received: from dogmatix.cs.caltech.edu by vlsi.cs.caltech.edu (4.1/1.34.1) id AA14077; Wed, 12 Aug 98 16:37:55 PDT Received: (from mika@localhost) by dogmatix.cs.caltech.edu (8.8.8/8.8.7) id QAA20983; Wed, 12 Aug 1998 16:37:54 -0700 (PDT) Message-Id: <199808122337.QAA20983@dogmatix.cs.caltech.edu> Date: Wed, 12 Aug 1998 16:37:54 -0700 (PDT) From: Mika Nystrom Reply-To: mika@cs.caltech.edu To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: kern/7596: serious data integrity problem when reading WHILE writing NFSv3 client-end Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7596 >Category: kern >Synopsis: serious data integrity problem when reading WHILE writing NFSv3 client-end >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 12 16:40:00 PDT 1998 >Last-Modified: >Originator: Mika Nystrom >Organization: California Institute of Technology >Release: FreeBSD 3.0-CURRENT i386 >Environment: FreeBSD dogmatix.cs.caltech.edu 3.0-CURRENT FreeBSD 3.0-CURRENT #7: Mon Apr 6 15:05:17 PDT 1998 mika@obelix.cs.caltech.edu:/usr/src/sys/compile/P6CLIENT_2CPU_128MB i386 this system is -current as of the build date (April, 1998) SMP on dual PPro 200 systems from 128MB to 1GB core. >Description: Reading a file over NFS at the same time as it is being written on the same host causes it to be extended(?) with nulls. It is possible that the application that is reading actually seeks past EOF. The writer is open in (fopen) "wb" mode, the writer in "rb". The reader need *not* have permissions to modify the file (I even did it as a separate user). This fails with NFSv3 mounts only (as far as I can tell). Tested against server implementations: NetBSD-1.2/i386 SunOS 5.5/sparc FreeBSD-3.0/CURRENT-SMP/i386 Seems not to fail against NFSv2 servers Tested against: SunOS 4.1.4/sparc >How-To-Repeat: read a file when someone else is writing it, perhaps try seeking past EOF when you do. The file will be ruined (and maybe your day, like mine has been innumerable times because of this bug). Oh, I have a setup that is completely reproducible, if anyone wants it. >Fix: Workaround: use NFSv2 Other workaround: use local files Real Fix: Unknown >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message