Date: Sun, 3 Jul 2022 19:46:17 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: Kirk McKusick <mckusick@mckusick.com> Cc: FreeBSD Filesystems <freebsd-fs@freebsd.org>, Ed Maste <emaste@freebsd.org>, Gleb Smirnoff <glebius@freebsd.org> Subject: Re: RFC: Should intr/soft NFSv4 mounts be disabled? Message-ID: <YQBPR0101MB97420523D715599F88DF133FDDBF9@YQBPR0101MB9742.CANPRD01.PROD.OUTLOOK.COM> In-Reply-To: <202207031617.263GHZpZ000763@chez.mckusick.com> References: <YQBPR0101MB974216B2F2B1DCFF976D2065DDBD9@YQBPR0101MB9742.CANPRD01.PROD.OUTLOOK.COM> <202207031617.263GHZpZ000763@chez.mckusick.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Kirk McKusick <mckusick@freebsd.org> wrote:=0A= > > From: Rick Macklem <rmacklem@uoguelph.ca>=0A= > > To: FreeBSD Filesystems <freebsd-fs@freebsd.org>=0A= > > CC: Ed Maste <emaste@freebsd.org>, Gleb Smirnoff <glebius@freebsd.org>= =0A= > > Subject: RFC: Should intr/soft NFSv4 mounts be disabled?=0A= > > Date: Fri, 1 Jul 2022 21:57:21 +0000=0A= > >=0A= > > Hi,=0A= > >=0A= > > NFSv4 mounts using the "soft" and/or "intr" mount options=0A= > > have never functioned correctly. This is noted in the BUGS=0A= > > section of "man mount_nfs" and commit c0d14b0220ae=0A= > > added the generation of a warning message when such=0A= > > a mount is done. The breakage can occur when the server=0A= > > is slow/overloaded or network partitioned such that the RPC=0A= > > reply is not received for over 1 second, resulting in the RPC=0A= > > attempt to fail without the RPC reply being processed.=0A= > >=0A= > > Breakage of the protocol has become more frequent for=0A= > > NFSv4.1/4.2 mounts since, when a syscall returns before=0A= > > the RPC reply is processed, it leaves the session slot for the=0A= > > RPC non-usable. When all slots are non-usable, the mount=0A= > > is hung.=0A= > >=0A= > > During review of commit c0d14b0220ae, emaste@ asked if=0A= > > NFSv4 mounts using "soft" and/or "intr" should actually=0A= > > be disabled, so I am now asking others for their opinion=0A= > > on this? (Doing so will cause many extant mounts in fstab(5)=0A= > > to fail.)=0A= > >=0A= > > Thanks for any comments, rick=0A= > =0A= > I have always been of the opinion that "soft" mounts were useless=0A= > and would be happy to see them go.=0A= >=0A= > I find "intr" mounts to be preferable to "hard" in almost all=0A= > situations. Being in an editor or some other application and=0A= > being unable to ^C out of it when the server is not responding=0A= > is extremely annoying. I know that quite some effort went into=0A= > making NFS able to support "intr" and I think it would be worth=0A= > the effort to continue to make it a viable alternative.=0A= Well, I have a patch that is the last attachment in PR#260011, which=0A= keeps track of broken session slots and then does a Destroysession=0A= when they are all broken.=0A= This works ok, at least against a FreeBSD server (haven't been able=0A= to test in against other servers yet).=0A= --> I think this fixes the more common session case, so long as the=0A= Destroysession does the right thing for non-FreeBSD servers.=0A= --> If anyone can test this patch, please do so. (Unfortunately the=0A= patch looks different for main vs stable/13, so email if you need=0A= the one for main.)=0A= =0A= As for "intr" allowing a process to break out of an RPC,=0A= even with the above patch, it would break that open lock,=0A= but since the user no longer cares about the open working=0A= (the close might fail, but that is only a problem if the server=0A= does not do any cleanup and accumulates them) then=0A= I think this might be ok?=0A= =0A= > That said, it appears that Linux has deprecated "intr":=0A= >=0A= > https://access.redhat.com/solutions/157873=0A= >=0A= > Though they do still allow NFS hung processes to be killed with=0A= > SIGKILL so if that option is available it will (painfully) be=0A= > possible to get out of hung processes.=0A= Yes, I think the Linux client folk have disabled "intr" for the same=0A= reason (it screws up sessions and they have not figured out how=0A= to deal with that). Since Linux defaults to NFSv4.1/4.2 mounts=0A= for any server that supports that, their users probably see the=0A= breakage more.=0A= =0A= rick=0A= =0A= =0A= Kirk McKusick=0A= =0A=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQBPR0101MB97420523D715599F88DF133FDDBF9>