From quinot@cuivre.fr.eu.org  Wed May 16 05:55:52 2001
Return-Path: <quinot@cuivre.fr.eu.org>
Received: from geveor.cuivre.fr.eu.org (nat-34.kulnet.kuleuven.ac.be [134.58.0.34])
	by hub.freebsd.org (Postfix) with ESMTP id 2638837B423
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 May 2001 05:55:48 -0700 (PDT)
	(envelope-from quinot@cuivre.fr.eu.org)
Received: by geveor.cuivre.fr.eu.org (Postfix, from userid 11117)
	id 2F7CED5ED; Wed, 16 May 2001 14:55:46 +0200 (CEST)
Message-Id: <20010516125546.2F7CED5ED@geveor.cuivre.fr.eu.org>
Date: Wed, 16 May 2001 14:55:46 +0200 (CEST)
From: quinot@cuivre.fr.eu.org
Reply-To: quinot@cuivre.fr.eu.org
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Client NFS mount hangs with multihomed server
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         27383
>Category:       kern
>Synopsis:       Client NFS mount hangs with multihomed server
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    iedowse
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 16 06:00:01 PDT 2001
>Closed-Date:    Fri Jul 6 03:18:52 PDT 2001
>Last-Modified:  Fri Jul 06 03:21:54 PDT 2001
>Originator:     Thomas Quinot
>Release:        FreeBSD 4.3-RC i386
>Organization:
>Environment:
System: FreeBSD geveor.cuivre.fr.eu.org 4.3-RC FreeBSD 4.3-RC #0: Tue Apr 3 18:49:15 CEST 2001 root@geveor.cuivre.fr.eu.org:/usr/obj/usr/src/sys/PORTAB i386


	
>Description:
	The problem is the one described in kern/9612: a FreeBSD
	NFS client hangs in sbwait() while trying to mount an NFS
	filesystem if the source address in the NFS reply is not the
	same as the destination address that was used to send the request.

	kern/9612 indicates that the server setup can be changed to
	resolve the problem, by having nfsd bind separately on each
	interface, but this assumes that the server is a FreeBSD host,
	and that its setup can be changed.

	Is there a possibility to fix the FreeBSD client side so at least
	the NFs mount can be cancelled instead of hanging indefinitely
	in sbwait?

>How-To-Repeat:
	
>Fix:

	
>Release-Note:
>Audit-Trail:

From: Ian Dowse <iedowse@maths.tcd.ie>
To: quinot@cuivre.fr.eu.org
Cc: FreeBSD-gnats-submit@freebsd.org, iedowse@maths.tcd.ie
Subject: Re: kern/27383: Client NFS mount hangs with multihomed server 
Date: Wed, 16 May 2001 14:20:46 +0100

 In message <20010516125546.2F7CED5ED@geveor.cuivre.fr.eu.org>, quinot@cuivre.fr
 .eu.org writes:
 >
 >	Is there a possibility to fix the FreeBSD client side so at least
 >	the NFs mount can be cancelled instead of hanging indefinitely
 >	in sbwait?
 
 Yes, I was just looking into this a few days ago. The mount_nfs in
 -current does not have this problem any longer; it now never issues
 the mount() syscall until it has successfully received a response
 from the remote nfsd.
 
 There's a (very lightly tested) backport of these changes at:
 
 	http://www.maths.tcd.ie/~iedowse/FreeBSD/mount_nfs.releng_4.diff
 
 I would be very interested in hearing if this patch improves the
 situation for you.
 
 Ian

From: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: Ian Dowse <iedowse@maths.tcd.ie>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/27383: Client NFS mount hangs with multihomed server
Date: Thu, 17 May 2001 14:48:46 +0200

 Le 2001-05-16, Ian Dowse crivait :
 
 > 	http://www.maths.tcd.ie/~iedowse/FreeBSD/mount_nfs.releng_4.diff
 > I would be very interested in hearing if this patch improves the
 > situation for you.
 
 Tried it, no change. I still end up with:
 
     0  2445     1   0   2  0   388  240 sbwait D     p2    0:00.01 nfs infres2.enst.fr:/home/ir1 /infres/ir1 (mount_nfs)
 
 Thomas.
 

From: Ian Dowse <iedowse@maths.tcd.ie>
To: thomas@cuivre.fr.eu.org
Cc: FreeBSD-gnats-submit@freebsd.org, iedowse@maths.tcd.ie
Subject: Re: kern/27383: Client NFS mount hangs with multihomed server 
Date: Thu, 17 May 2001 15:00:52 +0100

 In message <20010517144846.A2498@geveor.cuivre.fr.eu.org>, Thomas Quinot writes
 :
 >Tried it, no change. I still end up with:
 >
 >    0  2445     1   0   2  0   388  240 sbwait D     p2    0:00.01 nfs infres2
 >.enst.fr:/home/ir1 /infres/ir1 (mount_nfs)
 
 Bah, I see the problem, and it affects -current too. The RPC library
 does not use connect() on UDP client sockets, so it will happily
 accept the remote nfsd's reply, even though it comes from the wrong
 address. The kernel NFS code does use connect(), so it can't see
 the replies.
 
 I'll have a look later to see how easy it would be to make the RPC
 library's behaviour in this area more controllable.
 
 Ian
Responsible-Changed-From-To: freebsd-bugs->iedowse 
Responsible-Changed-By: iedowse 
Responsible-Changed-When: Sat May 19 11:11:53 PDT 2001 
Responsible-Changed-Why:  
I'll deal with this issue. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27383 
State-Changed-From-To: open->feedback 
State-Changed-By: iedowse 
State-Changed-When: Fri Jun 29 14:31:20 PDT 2001 
State-Changed-Why:  

This issue should now be properly fixed in both -current and -stable. 
Could you try updating and verify that you no longer end up with 
hung mounts when the server replies from the wrong address? Make 
sure you have revision 1.36.2.2 of src/sbin/mount_nfs/mount_nfs.c 
- I just committed it a few minutes ago. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27383 
State-Changed-From-To: feedback->closed 
State-Changed-By: iedowse 
State-Changed-When: Fri Jul 6 03:18:52 PDT 2001 
State-Changed-Why:  

Originator has confirmed that the issue is now resolved. Thanks 
for the bug report! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27383 
>Unformatted:
