From mi@misha.cisco.com Wed Apr  7 10:48:06 1999
Return-Path: <mi@misha.cisco.com>
Received: from misha.cisco.com (misha.cisco.com [171.69.206.50])
	by hub.freebsd.org (Postfix) with ESMTP id AF6A915827
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  7 Apr 1999 10:48:05 -0700 (PDT)
	(envelope-from mi@misha.cisco.com)
Received: (from mi@localhost)
	by misha.cisco.com (8.9.2/8.9.1) id NAA42376;
	Wed, 7 Apr 1999 13:46:05 -0400 (EDT)
	(envelope-from mi)
Message-Id: <199904071746.NAA42376@misha.cisco.com>
Date: Wed, 7 Apr 1999 13:46:05 -0400 (EDT)
From: Mikhail Teterin <mi@misha.cisco.com>
Reply-To: mi@aldan.algebra.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: `umount -f' does not work if the NFS-server is down
X-Send-Pr-Version: 3.2

>Number:         11005
>Category:       bin
>Synopsis:       `umount -f' does not work if the NFS-server is down
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    iedowse
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr  7 10:50:01 PDT 1999
>Closed-Date:    Wed Feb 20 05:43:11 PST 2002
>Last-Modified:  Wed Feb 20 05:43:44 PST 2002
>Originator:     Mikhail Teterin
>Release:        FreeBSD 3.1-STABLE i386
>Organization:
Virtual Estates, Inc.
>Environment:

	The server is turned off...

>Description:

	There is no way (short of reboot) to get rid of an NFS
	mounted filesystem if the NFS server is not reachable.

	This is a shame and the only reason Severity is not set
	to "critical" is because it's been like for a long time.

>How-To-Repeat:

	root@ditto:/home/mi (100) mount -o ro vortex:/ /mnt
	[Now, shutdown vortex]
	root@ditto:/home/mi (101) mount
	[...]
	vortex:/ on /mnt (read-only)
	[...]
	root@ditto:/home/mi (102) umount -f vortex:/ &
	[Hangs forever]
	root@ditto:/home/mi (103) umount -f /mnt &
	[Hangs forever]

>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mike 
State-Changed-When: Thu Jul 19 18:49:38 PDT 2001 
State-Changed-Why:  

This is apparently a duplicate of PR: bin/841.  That PR says that 
this problem should be fixed in 3.3-RELEASE and up. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=11005 

From: Ian Dowse <iedowse@maths.tcd.ie>
To: mike@FreeBSD.org
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/11005: `umount -f' does not work if the NFS-server is down 
Date: Fri, 20 Jul 2001 10:40:54 +0100

 In message <200107200153.f6K1rqE67671@freefall.freebsd.org>, mike@FreeBSD.org w
 rites:
 >Synopsis: `umount -f' does not work if the NFS-server is down
 >
 >State-Changed-From-To: open->closed
 >This is apparently a duplicate of PR: bin/841.  That PR says that
 >this problem should be fixed in 3.3-RELEASE and up.
 
 Yes, umount -f seems to work now if the server is down, but only
 if there are no outstanding operations in progress. If the NFS
 mount isn't interruptible then there is no way to cancel outstanding
 operations, so umount -f will just hang forever.
 
 I guess this is expected behaviour if you specifically ask for a
 non-interruptible mount (by not adding the -i option to mount_nfs).
 It's maybe not so expected behaviour if you have to kill all the
 stuck processes on an interruptible NFS mount before umount -f
 works. I guess in the forced case, the NFS unmount code could go
 around and mark all outstanding requests as terminated.
 
 I'll think about this a bit more, and I might grab and reopen the
 PR if it seems feasible.
 
 Ian
State-Changed-From-To: closed->open 
State-Changed-By: iedowse 
State-Changed-When: Fri Jul 20 16:44:59 PDT 2001 
State-Changed-Why:  

I've looked into this a bit further, and it seems to be relatively 
straightforward to make umount -f work in all cases, including when 
processes are uninterruptibly hung. We need to set a non-zero socket 
timeout even for non-interruptible mounts, and then for a forced 
unmount, walk the list of outstanding requests for that mountpoint, 
marking each one with R_SOFTTERM. 

There are still a few details to be ironed out, so it may be a 
while before I get around to implementing this. I'll take the PR 
as a reminder. 


Responsible-Changed-From-To: freebsd-bugs->iedowse 
Responsible-Changed-By: iedowse 
Responsible-Changed-When: Fri Jul 20 16:44:59 PDT 2001 
Responsible-Changed-Why:  
I'll look into this. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=11005 
State-Changed-From-To: open->suspended 
State-Changed-By: iedowse 
State-Changed-When: Sun Jan 20 09:36:52 PST 2002 
State-Changed-Why:  

Fixed in -CURRENT, awaiting MFC. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=11005 
State-Changed-From-To: suspended->closed 
State-Changed-By: iedowse 
State-Changed-When: Wed Feb 20 05:43:11 PST 2002 
State-Changed-Why:  

Fixed in -STABLE now too. 

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