Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Aug 1998 16:37:54 -0700 (PDT)
From:      Mika Nystrom <mika@cs.caltech.edu>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/7596: serious data integrity problem when reading WHILE writing NFSv3 client-end
Message-ID:  <199808122337.QAA20983@dogmatix.cs.caltech.edu>

next in thread | raw e-mail | index | archive | help

>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808122337.QAA20983>