Date: Sun, 17 Aug 1997 18:14:38 -0400 (EDT) From: Serge Pashenkov <serge@jbj.org> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: kern/4327: NFS over TCP reconnect problem Message-ID: <199708172214.SAA08596@serge.jbj.org> Resent-Message-ID: <199708172220.PAA28115@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 4327 >Category: kern >Synopsis: NFS over TCP reconnect problem >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 17 15:20:00 PDT 1997 >Last-Modified: >Originator: Serge Pashenkov >Organization: >Release: FreeBSD 2.2-STABLE i386 >Environment: 2.2-stable circa Aug 15 >Description: I'm running into funny NFS over TCP problem. Mount works fine and the filesystem is there for a while, I can access it and all. After a while the connection goes into CLOSE_WAIT status, which I think is just normal timeout after period of inactivity, and actually should reconnect on request, but that's exactlty where the problem is. nfs_connect() (called from nfs_reconnect()) tries to bind a privileged port (well, mount_nfs command sets it regardless, even though there is -P flag), so eventually it gets to in_pcbbind() which checks suser() in case of privileged port with CURRENT proc credentials. So, if super user happens to be the one to initiate the request everything is fine, but if it was non-superuser there is a problem, connection is never gonna be reistablished. Situation gets even worse if non-superuser invoked df command. In that case the filesystem is just hung forever -- vfs struct is locked in getfsstat(), and then eventually nfs_reconnect() gets called and loops forever attempting to connect, having vfs struct still locked. There is no way to neither unmount the file system not even cleanly reboot the machine, everything hangs on the locked vfs struct. >How-To-Repeat: mount -o -T server:/filesystem /mountpoint wait 5 min, or until CLOSE_WAIT status for the nfs connection is displaied in systat net display df (not being super user). >Fix: As a workaround I use modified version of mount_nfs with regular port use (unless -P is specidied), but I'm lucky that my server does not require privileged port. >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708172214.SAA08596>
