NetBSD Problem Report #5844

Received: (qmail 17419 invoked from network); 25 Jul 1998 12:57:32 -0000
Message-Id: <199807251257.OAA00970@antifer.ipv6.lip6.fr>
Date: Sat, 25 Jul 1998 14:57:20 +0200 (MEST)
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
Reply-To: bouyer@antioche.lip6.fr
To: gnats-bugs@gnats.netbsd.org
Subject: NFS server sends "permission denied" while mound re-read exports
X-Send-Pr-Version: 3.95

>Number:         5844
>Category:       kern
>Synopsis:       NFS server sends "permission denied" while mound re-read exports
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 25 06:05:01 +0000 1998
>Closed-Date:    Fri Jun 11 16:58:22 +0000 2021
>Last-Modified:  Fri Jun 11 16:58:22 +0000 2021
>Originator:     
>Release:        NetBSD 1.3.2
>Organization:

LIP6, Universite Paris VI.

>Environment:

System: NetBSD antifer.ipv6.lip6.fr 1.3.2 NetBSD 1.3.2 (ANTIFER) #0: Mon Jun 15 14:17:35 MEST 1998 bouyer@antifer.ipv6.lip6.fr:/emul/linux/share/NetBSD/src/sys/arch/i386/compile/ANTIFER i386


>Description:
	There is an annoying race condition in the server code.
	While mountd re-read the /etc/exports file and update the
	exports in the kernel, the NFS server sends "permission denied"
	errors to clients trying to write to the server at this time.
	This is a real problem on home-directory NFS servers which also
	has a CD-ROM drive: each time you mount a CD-ROM, some users
	get randoms "permission denied" :(. This can halt a big, batch
	compile, or a slow ftp transfers.

>How-To-Repeat:
	The following reliably triggers the problem. Have a client which
	mounts a partition from a NetBSD NFS server. Start copying a bunch
	of files with 'cpio -p'. On the server, send a SIGHUP to mountd.
	On the client, the cpio dies with
	"cpio: write error: Permission denied"

>Fix:
	I didn't look at a real fix yet, I guess the NFS maintainer can fix
	this quickly. I think we just need to make the kernel either drop
	NFS requests, or delay them while mountd is updating the export list
	in the kernel. This may require to new messages to the kernel/mountd
	interface: "stop NFS server" and "start NFS server", or something
	like that.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: sommerfeld 
State-Changed-When: Sun Nov 14 06:51:45 PST 1999 
State-Changed-Why:  
this appears to be fixed by the change to mountd from bin/8791  
(just applied to -current) 


Responsible-Changed-From-To: kern-bug-people->sommerfeld 
Responsible-Changed-By: sommerfeld 
Responsible-Changed-When: Sun Nov 14 06:51:45 PST 1999 
Responsible-Changed-Why:  
i committed the mountd fix. 

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: sommerfeld@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/5844
Date: Mon, 15 Nov 1999 20:54:16 +0100

 On Sun, Nov 14, 1999 at 02:52:51PM -0000, sommerfeld@netbsd.org wrote:
 > Synopsis: NFS server sends "permission denied" while mound re-read exports
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: sommerfeld
 > State-Changed-When: Sun Nov 14 06:51:45 PST 1999
 > State-Changed-Why: 
 > this appears to be fixed by the change to mountd from bin/8791 
 > (just applied to -current)

 I did some tests too, and it appears it's not possible to loose anymore
 when mountd gets a HUP (and reading the source confirm it :)
 Thanks, it will really change my life !! :)

 --
 Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
 --
State-Changed-From-To: feedback->closed 
State-Changed-By: bouyer 
State-Changed-When: Sun Dec 5 12:16:20 PST 1999 
State-Changed-Why:  
This is fixed. 
State-Changed-From-To: closed->open 
State-Changed-By: bouyer 
State-Changed-When: Wed Jun 27 06:49:33 PDT 2001 
State-Changed-Why:  
The fix commited to mountd has been backed at mountd.c rev 1.62, 
so the problem is still here. 
State-Changed-From-To: open->feedback 
State-Changed-By: tls 
State-Changed-When: Wed Mar 31 22:30:25 UTC 2004 
State-Changed-Why:  
Should this bug _still_ be (re-)open? 

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: gnats-bugs@gnats.netbsd.org
Cc: tls@netbsd.org, sommerfeld@netbsd.org
Subject: Re: kern/5844
Date: Thu, 1 Apr 2004 12:23:19 +0200

 On Wed, Mar 31, 2004 at 10:31:13PM -0000, tls@netbsd.org wrote:
 > Synopsis: NFS server sends "permission denied" while mound re-read exports
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: tls
 > State-Changed-When: Wed Mar 31 22:30:25 UTC 2004
 > State-Changed-Why: 
 > Should this bug _still_ be (re-)open?

 Yes, the problem is still here

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --
State-Changed-From-To: feedback->open 
State-Changed-By: bouyer 
State-Changed-When: Thu Apr 1 21:02:17 UTC 2004 
State-Changed-Why:  
Unfortunably, yes the problem is still here. Checked on 1.6 and 
2.0.  
Responsible-Changed-From-To: sommerfeld->bin-bug-people
Responsible-Changed-By: spz@NetBSD.org
Responsible-Changed-When: Sun, 10 May 2009 19:12:51 +0000
Responsible-Changed-Why:
sommerfelds accounts are no longer active


From: Antti Kantee <pooka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/5844 CVS commit: src/tests/fs/nfs
Date: Wed, 28 Jul 2010 15:24:54 +0000

 Module Name:	src
 Committed By:	pooka
 Date:		Wed Jul 28 15:24:54 UTC 2010

 Modified Files:
 	src/tests/fs/nfs: Makefile
 Added Files:
 	src/tests/fs/nfs: t_mountd.c

 Log Message:
 Add test for service interruption while mountd handles SIGHUP.
 This is an xfail test for the problem described in PR kern/5844

 per highly surreptitious nudge from mrg


 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 src/tests/fs/nfs/Makefile
 cvs rdiff -u -r0 -r1.1 src/tests/fs/nfs/t_mountd.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->analyzed
State-Changed-By: pooka@NetBSD.org
State-Changed-When: Wed, 28 Jul 2010 18:32:43 +0300
State-Changed-Why:
problem is well-understood: mountd deletes exports before loading new ones
leaving a window of no exports


State-Changed-From-To: analyzed->feedback
State-Changed-By: hannken@NetBSD.org
State-Changed-When: Fri, 11 Jun 2021 16:39:40 +0000
State-Changed-Why:
With kernel/userland from June 5. or with usr.sbin/mountd/mountd.c
Rev. 1.137 or newer this bug should be fixed.  Please test again.


From: Manuel Bouyer <manuel.bouyer@lip6.fr>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, hannken@NetBSD.org
Subject: Re: kern/5844 (NFS server sends "permission denied" while mound
 re-read exports)
Date: Fri, 11 Jun 2021 18:53:26 +0200

 On Fri, Jun 11, 2021 at 04:39:40PM +0000, hannken@NetBSD.org wrote:
 > Synopsis: NFS server sends "permission denied" while mound re-read exports
 > 
 > State-Changed-From-To: analyzed->feedback
 > State-Changed-By: hannken@NetBSD.org
 > State-Changed-When: Fri, 11 Jun 2021 16:39:40 +0000
 > State-Changed-Why:
 > With kernel/userland from June 5. or with usr.sbin/mountd/mountd.c
 > Rev. 1.137 or newer this bug should be fixed.  Please test again.

 If you have tested it, please close the PR. I can't easily test a NFS server
 running HEAD right now

 -- 
 Manuel Bouyer, LIP6, Sorbonne Université.           Manuel.Bouyer@lip6.fr
      NetBSD: 26 ans d'experience feront toujours la difference
 --

State-Changed-From-To: feedback->closed
State-Changed-By: hannken@NetBSD.org
State-Changed-When: Fri, 11 Jun 2021 16:58:22 +0000
State-Changed-Why:
Ok from committer -- test fs/nfs/t_mountd mountdhup now passes.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.