From nobody@FreeBSD.org  Wed Jul 31 16:33:20 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C836437B400
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 31 Jul 2002 16:33:20 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8EAFA43E3B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 31 Jul 2002 16:33:20 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g6VNXKOT018089
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 31 Jul 2002 16:33:20 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g6VNXKXm018088;
	Wed, 31 Jul 2002 16:33:20 -0700 (PDT)
Message-Id: <200207312333.g6VNXKXm018088@www.freebsd.org>
Date: Wed, 31 Jul 2002 16:33:20 -0700 (PDT)
From: Yury Izrailevsky <izrailev@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Get "NFS append race" error
X-Send-Pr-Version: www-1.0

>Number:         41216
>Category:       kern
>Synopsis:       [nfs] Get "NFS append race" error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 31 16:40:01 PDT 2002
>Closed-Date:    Mon Aug 16 20:12:57 UTC 2010
>Last-Modified:  Mon Aug 16 20:12:57 UTC 2010
>Originator:     Yury Izrailevsky
>Release:        FreeBSD 4.5 Stable
>Organization:
>Environment:
4.5-STABLE FreeBSD i386
>Description:
Console and /var/log/messages gets flooded with this message:

/kernel-4.5-generic: NFS append race @3e1c00:512
/kernel-4.5-generic: NFS append race @3e1c00:512
/kernel-4.5-generic: NFS append race @3e3a00:1024
/kernel-4.5-generic: NFS append race @3e3a00:1024
/kernel-4.5-generic: NFS append race @3e5800:1536
/kernel-4.5-generic: NFS append race @3e5800:1536

>How-To-Repeat:
      Multi-thread application that appends and reads from ultiple files.

This error apparently gets triggered in /usr/src/sys/nfs/nfs_bio.c, line 967. Comments in the source code indicate that the race condition "might occur XXX". Is there a fix to this?
>Fix:
      Looking for one.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dillon 
Responsible-Changed-By: njl 
Responsible-Changed-When: Fri Aug 23 17:59:59 PDT 2002 
Responsible-Changed-Why:  
The code recovers from the race by updating the dirty end pointer to what 
it should be.  It may be difficult to prevent the race from occurring due 
to bio locking complexities.  Over to dillon to see if he wants to comment 
or just punt. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41216 

From: Nate Lawson <nate@root.org>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/41216: Get "NFS append race" error
Date: Sat, 24 Aug 2002 10:54:30 -0700 (PDT)

 ---------- Forwarded message ----------
 Date: Sat, 24 Aug 2002 10:07:36 -0700 (PDT)
 From: Matthew Dillon <dillon@apollo.backplane.com>
 
     This is a long standing problem which I still haven't tracked
     down.  As long as only one NFS client host is doing the appending
     this case is not supposed to occur at all because the vnode should
     be locked through the nfs_write() operation.  Apparently the case
     does still occur though and I am not sure why.  This is why the
     printf() is still in there.
 
     If multiple client hosts are appending to the same file then the
     case can definitely occur (it's a problem with the NFSv2/v3 protocol
     itself that is not fixable).
 
 					-Matt
 					Matthew Dillon 
 					<dillon@backplane.com>
 
Responsible-Changed-From-To: dillon->freebsd-bugs 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Sat Feb 22 18:16:46 PST 2003 
Responsible-Changed-Why:  
Back to the free pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41216 
Responsible-Changed-From-To: freebsd-bugs->cel 
Responsible-Changed-By: cel 
Responsible-Changed-When: Fri May 12 18:43:40 UTC 2006 
Responsible-Changed-Why:  
Since this has been open for a long while, I can't believe it is still a 
high priority bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41216 
Responsible-Changed-From-To: cel->freebsd-bugs 
Responsible-Changed-By: cel 
Responsible-Changed-When: Mon Mar 12 15:28:30 UTC 2007 
Responsible-Changed-Why:  
Back to the public pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41216 
State-Changed-From-To: open->closed 
State-Changed-By: vwe 
State-Changed-When: Mon Aug 16 20:12:26 UTC 2010 
State-Changed-Why:  
closing this report in favour of kern/81770, which is a DUP but contains more information 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41216 
>Unformatted:
