[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#599823: linux-2.6: XEN and NFS causes duplicate filenames with large directories

On Mon, Oct 11, 2010 at 12:49:33PM -0400, Jason Kendall wrote:
> Package: linux-2.6
> Severity: important
> Tags: upstream

Which version?

> There apears to be an allusive bug that makes it very difficult to track down. 
> So far I have found the following details:
> 1. Happens only on Xen DomU

That's very strange.

> 2. Duplicate filenames are given when doing an "ls"
> 3. Trigger happens when a rename (mv) happens on a directory with a large number of files.
> 4. Does not matter which machine does the rename/mv (Any box connected to the NFS) the duplicate filenames still show up under DomU
> 5. Does not appear to happen to directories with a limited number of files. I have one directory with > 9k files which this does happen on (mail directory)

This is probably an effect of the NFS block size - any directory smaller
than a single block is likely to be readable atomically.

> 6. To clear the issue, you have to either rename the file back to the original, or reboot the DomU

This last point is the troubling one.  If this condition was transient I
would be tempted to say it's not a bug.  It sounds like the client treats
its version of the directory as being correct as of the time the directory
listing was completed, whereas it should either (1) treat the listing as
correct at the time the directory listing started, therefore stale when it
the directory is next read; or (2) detect that the directory changed and so
discard the listing from its cache immediately.

> A little direction on how to continue diagnosing this issue, or a fix :) would be good. 
Please test Linux 2.6.36-rc6 as packaged in experimental.


Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                              - Albert Camus

Reply to: