Re: NFS server doesn't close connections (client freezes)

2024-01-11 Thread Todd C . Miller
On Thu, 11 Jan 2024 22:29:51 +0100, Alexandre Ratchov wrote: > nfsrv_rcv() may set the DISCONN flag, so we need to retest for it > after nfsrv_rcv() and possibly call nfsrv_zapsock(). If we don't do > that, the server may sleep before the nfsrv_zapsock() call; if so, > this leaves the connection

Re: NFS server doesn't close connections (client freezes)

2024-01-11 Thread Alexandre Ratchov
On Thu, Jan 11, 2024 at 01:54:02PM -0700, Todd C. Miller wrote: > On Thu, 11 Jan 2024 19:35:23 +, Miod Vallat wrote: > > > Yes. Unfortunately NEEDQ and DISCONN may be both set, so we still need > > to check for DISCONN here before NEEDQ. > > > > Or the whole block could become > > > > if

Re: NFS server doesn't close connections (client freezes)

2024-01-11 Thread Todd C . Miller
On Thu, 11 Jan 2024 19:35:23 +, Miod Vallat wrote: > Yes. Unfortunately NEEDQ and DISCONN may be both set, so we still need > to check for DISCONN here before NEEDQ. > > Or the whole block could become > > if (NEEDQ set and not DISCONN set) > nfsrv_rcv block > if

Re: NFS server doesn't close connections (client freezes)

2024-01-11 Thread Alexandre Ratchov
On Thu, Jan 11, 2024 at 07:35:23PM +, Miod Vallat wrote: > > The server detects that the connection is closed. It doesn't close the > > socket immediately and starts waiting for the client to reconnect (or > > another client, etc). As the socket is not closed, from client's point > > of view,

Re: NFS server doesn't close connections (client freezes)

2024-01-11 Thread Miod Vallat
> The server detects that the connection is closed. It doesn't close the > socket immediately and starts waiting for the client to reconnect (or > another client, etc). As the socket is not closed, from client's point > of view, the connection is still not fully closaed, so it keeps > waiting

Re: NFS server doesn't close connections (client freezes)

2024-01-11 Thread Alexandre Ratchov
On Wed, Jan 10, 2024 at 03:10:55PM +0100, Alexandre Ratchov wrote: > > After 5 minutes with no requests (below), the client tries to close > the connection. OpenBSD doesn't seem to reply with a fin packet. At > this point the client freezes until the file system is umounted. New > requests

Re: NFS server doesn't close connections (client freezes)

2024-01-11 Thread Alexandre Ratchov
On Thu, Jan 11, 2024 at 02:02:45PM +0100, Claudio Jeker wrote: > On Thu, Jan 11, 2024 at 07:35:55AM -0500, Johan Huldtgren wrote: > > On 2024-01-11 10:29, Alexandre Ratchov wrote: > > > On Wed, Jan 10, 2024 at 09:26:45AM -0700, David Rinehart wrote: > > > > I have notice the same. To resolve, I

Re: NFS server doesn't close connections (client freezes)

2024-01-11 Thread Claudio Jeker
On Thu, Jan 11, 2024 at 07:35:55AM -0500, Johan Huldtgren wrote: > On 2024-01-11 10:29, Alexandre Ratchov wrote: > > On Wed, Jan 10, 2024 at 09:26:45AM -0700, David Rinehart wrote: > > > I have notice the same. To resolve, I installed / configured autofs > > > and have not had any issues since.

Re: NFS server doesn't close connections (client freezes)

2024-01-11 Thread Johan Huldtgren
On 2024-01-11 10:29, Alexandre Ratchov wrote: > On Wed, Jan 10, 2024 at 09:26:45AM -0700, David Rinehart wrote: > > I have notice the same. To resolve, I installed / configured autofs > > and have not had any issues since. No heavy load on the machine, > > though. > > Thank you for confirming

Re: NFS server doesn't close connections (client freezes)

2024-01-11 Thread Alexandre Ratchov
On Wed, Jan 10, 2024 at 09:26:45AM -0700, David Rinehart wrote: > I have notice the same. To resolve, I installed / configured autofs > and have not had any issues since. No heavy load on the machine, > though. Thank you for confirming the problem: so this is not a local configuration problem.

Re: NFS server doesn't close connections (client freezes)

2024-01-10 Thread David Rinehart
I have notice the same. To resolve, I installed / configured autofs and have not had any issues since. No heavy load on the machine, though. On Wed, 2024-01-10 at 15:10 +0100, Alexandre Ratchov wrote: > Linux NFS clients work with an OpenBSD NFS server. But if there are > no > NFS requests for

NFS server doesn't close connections (client freezes)

2024-01-10 Thread Alexandre Ratchov
Linux NFS clients work with an OpenBSD NFS server. But if there are no NFS requests for more than 5 minutes, the NFS client often freezes forever. AFAIU, after 5 minutes of inacivity, Linux NFS clients disconnect. Then, if they need to issue new NFS requests, they reconnect and so on. It seems