Subject: kern/5844: NFS server sends "permission denied" while mound re-read exports
To: None <>
From: Manuel Bouyer <>
List: netbsd-bugs
Date: 07/25/1998 14:57:20
>Number:         5844
>Category:       kern
>Synopsis:       NFS server sends "permission denied" while mound re-read exports
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 25 06:05:01 1998

LIP6, Universite Paris VI.

>Release:        NetBSD 1.3.2
System: NetBSD 1.3.2 NetBSD 1.3.2 (ANTIFER) #0: Mon Jun 15 14:17:35 MEST 1998 i386

	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.

	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"

	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.