NFS, hung processes

Pat Barron pat at orac.pgh.pa.us
Tue Aug 1 17:12:27 AEST 1989


In article <13134 at bloom-beacon.MIT.EDU> jik at athena.mit.edu (Jonathan I. Kamens) writes:
>[...]
>Samperi) writes:
>>[...] Furthermore, it appears that a process may still hang
>>even if no reference is made to dead NFS paths. I don't know why...perhaps
>>the crashed machine is flooding the network with garbage packets????
>[...]
>  The most common way of referencing a dead NFS path even if you don't
>realize you're doing it is if you have said path in your search path
>and try to execute a program and/or start a new shell.  Both will
>cause the search path to be scanned, and they could encounter the dead
>path and hang on it.

Another possible problem, which can be particularly vexing until you
really figure out what's going on, is that getwd() can hang if there
is a dead NFS fileserver mounted within some directory above your
current directory.  That is, if your current directory is, for instance,
"/usr/users/foobar", and "/usr/local" is mounted from an NFS server
and that server is dead, then doing a getwd() [i.e., "pwd", etc...]
from /usr/users/foobar *may* hang, depending on what order the directory
entries for "users" and "local" appear in /usr.  If "users" is first
then everything is fine.  If "local" is first, then getwd() will try
to do a stat() on /usr/local, and you lose.

The solution to this is to make sure NFS mount points are leaf
nodes in the directory tree (i.e., make sure that no files or
directories in the local filesystem appear in the same directory
as an NFS mount point).

--Pat.
-- 
Pat Barron
Internet:  pat at orac.pgh.pa.us  - or -   orac!pat at gateway.sei.cmu.edu
UUCP:  ...!uunet!apexepa!sei!orac!pat  - or -  ...!pitt!darth!orac!pat



More information about the Comp.unix.wizards mailing list