Bug 25826

Summary: nfsd -t -h adr1 -h adr2 doesn't work
Product: Base System Reporter: Jean-Luc.Richier <Jean-Luc.Richier>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-RELEASE   
Hardware: Any   
OS: Any   

Description Jean-Luc.Richier 2001-03-15 13:30:01 UTC
	On a nfs server with >=2 IP addresses, nfsd server being
	configured with -h options, as recommended in man nfsd,
	mount_nfs accesses over TCP will fail.
	The problem is the same when using -a option.

How-To-Repeat: 	
	Consider a nfs server with two IP addresses, xx and yy.
	According to the nsfd man, set the following nfsd options in rc.conf:
	nfs_server_enable="YES"
	nfs_server_flags="-u -t -n 4 -h xx -h yy
	and export some catalog (e.g. /usr/local)
	
	On an other machine, try to mount xx:/usr/local over TCP. The mount
	command will fail:
	
	% mount -o -T xx:/usr/local /mnt
	nfs server xx:/usr/local: not responding
	
	Also nfsd on xx is now burning CPU:
	# ps -ax | grep nfsd
  545  ??  Rs     0:23.78 nfsd: master (nfsd)
  546  ??  I      0:00.00 nfsd: server (nfsd)
  547  ??  I      0:00.00 nfsd: server (nfsd)
  548  ??  I      0:00.00 nfsd: server (nfsd)
  549  ??  I      0:00.00 nfsd: server (nfsd)
	# sleep 4
	# ps -ax | grep nfsd
  545  ??  Rs     0:27.81 nfsd: master (nfsd)
  546  ??  I      0:00.00 nfsd: server (nfsd)
  547  ??  I      0:00.00 nfsd: server (nfsd)
  548  ??  I      0:00.00 nfsd: server (nfsd)
  549  ??  I      0:00.00 nfsd: server (nfsd)

	Notes:
	Mounting using UDP works.
	TCP mount of yy:/usr/local (the last address in the -h list) works
	but only if no TCP mount has failed:

	% mount -o -Ti yy:/usr/local /mnt
			.... mount OK 
	% umount /mnt
	% mount -o -Ti xx:/usr/local /mnt
	nfs server xx:/usr/local: not responding
	^C
	% mount -o -Ti yy:/usr/local /mnt
		... no response
Comment 1 Jean-Luc.Richier 2002-05-30 14:56:06 UTC
This problem is still in FreeBSD4.6-RC2, but is corrected in FreeBSD5.0
(current)

--
Jean-Luc RICHIER (Jean-Luc.Richier@Imag.Fr  richier@imag.fr)
Laboratoire Logiciels, Systemes et Reseaux (LSR-IMAG)
IMAG-CAMPUS, BP 72, F-38402 St Martin d'Heres Cedex
Tel : +33 4 76 82 72 32 Fax : +33 4 76 82 72 87
Comment 2 Kris Kennaway freebsd_committer freebsd_triage 2003-11-15 22:08:11 UTC
State Changed
From-To: open->patched

This problem is apparently fixed in 5.x
Comment 3 Matteo Riondato 2005-04-11 11:39:57 UTC
Does this problem still exist or can this pr be closed?
Thank you.
Best Regards
-- 
Rionda aka Matteo Riondato
Disinformato per default
G.U.F.I. Staff Member (http://www.gufi.org)
FreeSBIE Developer (http://www.freesbie.org)
Comment 4 Jean-Luc.Richier 2005-04-11 18:21:36 UTC
Matteo Riondato wrote:
> Does this problem still exist or can this pr be closed?
> Thank you.
> Best Regards

I did not test since quite a long time, I avoid using -h and I switched
to FreeBSD 5, where the problem is corrected (the NFS code has completly 
changed).

However looking at the 4.11 source and at my analysis of the bug, I 
think that the problem is still there in FreeBSD4.11. nfsd has changed 
very little from the 4.2 version. I suppose it is normal as the FreeBSD4 
nfs code is abandonned in FreeBSD 5.x.

My proposed patch should still be valid if you need it.

Best regards


-- 
Jean-Luc RICHIER (Jean-Luc.Richier@Imag.Fr  richier@imag.fr)
Laboratoire Logiciels, Systemes et Reseaux (LSR-IMAG)
IMAG-CAMPUS, BP 72, F-38402 St Martin d'Heres Cedex
Tel : +33 4 76 82 72 32 Fax : +33 4 76 82 72 87
Comment 5 Matteo Riondato freebsd_committer freebsd_triage 2005-07-31 13:05:04 UTC
State Changed
From-To: patched->closed

Fixed, but will not be MFCed to RELENG_4