Subject: Re: kern/2560: NFS loose '..' on large directories
To: Frank van der Linden <frank@fwi.uva.nl>
From: Manuel Bouyer <bouyer@lix.polytechnique.fr>
List: netbsd-bugs
Date: 06/20/1996 16:15:06
Frank van der Linden said:
> 
> Quoting Manuel Bouyer,
> 
> > >Description:
> > 	On directories with a lot of file nfs mounted, NFS seems to randomly
> >         mangle the '..' entries, in a way such that .. and . are the same, i.e.
> >         cd .. does'nt change directory (is equivalent to 'cd .'), getcwd and
> >         and pwd fail. When a directory is entered in this state, it stays until
> >         the filesystem is unmouted and remounted, or the directory block
> >         get out of the buffer cache.
> 
> A couple of questions which should help in finding the bug:
> 
> 1) How many files exactly are there in the libc dir?
> 2) What is the size of the libc dir?
> 3) What does 'ls -di' say for the '.' and '..' entries? Does an explicit
>    'ls -di ..' and 'ls -di .' print the same inode numbers?

Well, here I have the 'pwd' problem, with 1680 files in the directory (without
. and ..). ls -ldi shows the same inode numbers for . and .. :
cezanne:/usr/src/src_current/lib/libc> ls -lid . ..
31053 drwxr-xr-x  22 bouyer  wheel  45568 Jun 20 15:31 .
31053 drwxr-xr-x  22 bouyer  wheel  45568 Jun 20 15:31 ..


Adding a file from the client, and then remove it solves the problem :
cezanne:/usr/src/src_current/lib/libc> pwd
pwd: File name too long
cezanne:/usr/src/src_current/lib/libc> touch glop
cezanne:/usr/src/src_current/lib/libc> pwd
/usr/src/src_current/lib/libc
cezanne:/usr/src/src_current/lib/libc> rm glop
cezanne:/usr/src/src_current/lib/libc> pwd
/usr/src/src_current/lib/libc
cezanne:/usr/src/src_current/lib/libc> ls -lid . ..
31053 drwxr-xr-x  22 bouyer  wheel  45568 Jun 20 15:48 .
35584 drwxr-xr-x  23 bouyer  wheel    512 May 31 18:48 ..

I restarted the 'make -j3', and the problem reappared, with now 1690 files.
I added a file in the directory, from the server. Now:
cezanne:/usr/src/src_current/lib/libc> pwd
/usr/src/src_current/lib/.
cezanne:/usr/src/src_current/lib/libc> pwd
/usr/src/src_current/lib/libc

Restarted the 'make -j3', and the problem reappared, with 1759 files ...

I can make other tests, if someone have an idea.

--
Manuel Bouyer, LIX, Ecole Polytechnique
email: bouyer@lix.polytechnique.fr
--