[guest - Thu Jul 21 11:03:06 2005]: > I tried to get a repository (1330 patches) into a directory that is > mounted via NFS. This fails in a different place each time, but seems > to fail almost every time. I get error messages like > > Fail: /home/eschnett/A/carpet-stable- > 2/Carpet/CarpetReduce/src/.nfs0254c51000308114: > openBinaryFile: does not exist (No such file or directory)
This bug should go away if you compile darcs with --disable-mmap. I'm not sure what a proper fix would be. The problem is that under NFS, when an open file is deleted, it isn't immediately removed, instead it is renamed to some .nfsXXXXX name, and is removed when the file is closed. This .nfs file has the endearing property that it's impossible to delete as long as the file remains open. So what happens is that we open a file and mmap its contents, and then we delete it. Then when we later run a diff, we see a file named .nfsSOMETHING, which disappears as soon as we unmap it. It's very annoying. Note that we delete files very often, since we atomically update files by renaming over the existing file (which effectively deletes it). Actually, there is a change in darcs 1.0.3 that was intended to address this issue, but which may not be being consistently applied. The can_I_use_mmap function now tries to identify scenarios where we're running on an NFS filesystem, and if that is the case refuse to use mmap. It may be that the hack is working, and you're seeing failure for some other reason, if that's the case then disabling mmap won't help (and that'll be useful to know). Another ugly hack (which would only reduce the incidence of errors of this sort) would be to make slurp ignore files having names starting with .nfs. :( David. (who knows far more than he ever wanted to know about the filesystem semantics of NFS--and still probably doesn't know enough) _______________________________________________ darcs-devel mailing list [email protected] http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
