Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jun 2005 16:11:48 GMT
From:      BigB3 <bigbrother@bonbon.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/81770: Always "NFS append race" at every NFS mount with user specified read/write size
Message-ID:  <200506011611.j51GBmr0062727@www.freebsd.org>
Resent-Message-ID: <200506011620.j51GK2RS099317@freefall.freebsd.org>

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

>Number:         81770
>Category:       kern
>Synopsis:       Always "NFS append race" at every NFS mount with user specified read/write size
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 01 16:20:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     BigB3
>Release:        4.11-Release
>Organization:
-
>Environment:
FreeBSD ikaros.XX.XXX.XX 4.11-RELEASE FreeBSD 4.11-RELEASE #8: Thu Mar 24 20:30:52 EET 2005     root@:/usr/obj/usr/src/sys/ikaros  i386

and

FreeBSD bigb3server.bbcluster.gr 4.11-RELEASE-p4 FreeBSD 4.11-RELEASE-p4 #6: Wed Apr 27 22:46:05 EEST 2005     root@ikaros.XXX.XXXXX.gr:/usr/obj/usr/src/sys/bigb3server  i386

>Description:



If you mount an NFS specifying either the read or write size (or both) and then you edit or create a file and save it, you always get an NFS error.

The read and write size should be NOT a standard size. For example

size of 13248 or 11840 or 8880

Thus, if you mount an NFS drive and tweak this option whatever file you edit, it is destroyed and in the syslog you get messages of

"NFS append race @0:498"
"NFS append race @0:3072"
..


Note that the syslog messages are the same for the same read/write size.

For example,

if you mount the NFS drive with read/write 13248 in all the cases in all the files I got NFS append race 
3200:3072 and 
3200:169 or 3200:171

If I used the read/write size of 12000 I got 
NFS append race @2e00:4096
NFS append race @2e00:3072

for whatever file I edit on that machine.


NOTE (1): We are talking for a single threaded application like cat(1) or vi(1). Thus, the same single threaded application makes an NFS append race on itself (I do not know how this is done)

NOTE (2): _ALWAYS_ we get an NFS append race with we specify read/write size of a special value.

NOTE (3): The text file should be more than some KBs...Dont edit a text file with 10 lines only

NOTE (4): Some times (very often) even read/write size of 10*1024=10240 fails with NFS append race..




(This has been tested on a network with 7 computers)


>How-To-Repeat:
1) Mount (tcp or udp) an NFS disk with size 13248 or 8880 or 11840 


mount -o,-r=12000,-w=12000 alkystis:/users4 /mnt

or

mount -o,-r=13248,-w=13248 alkystis:/users4 /mnt


2)

Edit a file or create a file which is some KB in size.. In my case I copy paste using the mouse a text file of 15KB....

vi /mnt/test.txt
<paste the text here>

(and save and exit (wq))

As soon as you save and exit you get 2 NFS Append race on your syslogd


You can either do


cat > /mnt/test << EOF

<paste the text>

EOF


and you get 2 NFS append messages (the same range that was before).



>Fix:

The only temporar solution I think of is to use standard mount sizes of 
8192 or 16384.
>Release-Note:
>Audit-Trail:
>Unformatted:



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