[Pvfs2-users] NFS trouble : magic ahead!

Phil Carns carns at mcs.anl.gov
Fri Feb 1 20:44:33 EST 2008


I think this is fixed now in trunk and pvfs-2-7-branch.  This was indeed 
a bug in our readdir as Sam suggested.

The problem occurred if the kernel module did a readdir from PVFS but 
wasn't able to fit all of the results into the caller's buffer.  At that 
point, the directory position has to be set to pick up at the correct 
spot on the next iteration.  The logic for doing this wasn't setting the 
right value.

As it turns out, fixing this bug also corrects this earlier issue with 
glibc that I had pointed out without having to implement a directory 
seek function:
http://www.beowulf-underground.org/pipermail/pvfs2-developers/2008-January/003813.html

... so I went ahead and pulled that stuff back out.

There are a couple of more general headaches with how the directory 
position works in readdir(), but I don't think they would cause anyone 
trouble in practice.  As far as I know this update covers the oddball 
knfsd and glibc cases.

Thanks for the excellent test case description in your bug report!

-Phil

Emmanuel Florac wrote:
> OK, I've been testing again and again, and I found a weeeeeeird bug.
> When I say weird, I mean really really of the black magic flavour.
> 
> So : still testing this NFS stuff, I tried with various configurations
> to sort it out, and it really a PVFS2 problem (tried different clients,
> and exporting non-pvfs2 FS from the same server, all OK).
> 
> The NFS server exports the pvfs2 FS this way :
> 
> /mnt/pvfs2      *(rw,async,no_root_squash,no_subtree_check)
> 
> On the client, I mount it and run this into the share :
> 
> for i in `seq 1 50` ; do touch test.$i ; done ; echo "created $i" ;
> echo -n "listing " ; ls | wc -l
> 
> So I create 50 files from test.1 to test.50 and so what? I tried again
> and again, and always the same : test.26 is missing in the ls output!
> Not any other file. When I create test.1 to test.65536, test.26 is
> still missing.
> 
> BUT if you type "ls test.26", it shows up just OK. Yeah, that's weird.
> Then I do 
> rm * ; ls
> 
> and it tells me 
> test.26
> 
> Uh.... 
> If I create 2000 files but starting from 100 (test.100 to test.2100),
> when I do
> 
> rm *; ls
> 
> It gives
> test.125
> 
> Uh, the 26th file, again... This is a very strange modulo 26 bug
> indeed :)
> 



More information about the Pvfs2-users mailing list