l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2005 Mar 17 18:49

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] stale NFS file (was: binary equivalence of twodirectories)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] stale NFS file (was: binary equivalence of twodirectories)

On Thu 17 Mar 05,  8:54 AM, Josh Parsons <jbparsons@ucdavis.edu> said:
> > Any file that diff reported "Stale NFS file handle", I can cat, edit,
> > play,...
> > I don't even know how to diagnose the cause.
> I've no idea either what's wrong, but if I were you, I'd start by seeing
> what syscall diff is using (and cat etc. aren't) that provokes the
> error.  Try running your diff invocation under strace.
Great idea.  I should've thought of that!  It revealed something I've never
seen before.  There are initially no files named ".l*" in the directory:

   p@satan$ cd /E/documentation/Videos/Lynda.com/
   p@satan$ ls -la .l*
   ls: .l*: No such file or directory
   p@satan$ vi log

At this point, vim complains that it found a swap file .log.swp and asks me
if I want to "Open Read-Only", "Abort", etc.  When I "Quit", the log file is

   p@satan$ ls .l*
   .log.swo  .log.swp

It looks like vim creates the swap files and THEN checks to see if a swap
file exists.  Holy cow!

I had to write the log file elsewhere from /E.  Writing the log file in
$HOME seemed to work.   Here's a line from stracing diff -r:

  stat64("/E/documentation/Videos/Lynda.com/project2/Getting Started with
    Corel  Painter 8/autorun.inf", 0xbffff108) = -1 ESTALE (Stale NFS file

So then I tried to ls the file.  For ls, stat() seemed to work:

   stat64("/E/documentation/Videos/Lynda.com/project2/Getting Started with
   Corel Painter 8/autorun.inf", {st_mode=S_IFREG|0775, st_size=46, ...}) = 0

And when I just diff *that* single file, it seems to work:

p@satan$ diff /E/documentation/Videos/Lynda.com/project2/Getting\ Started\
with\ Corel\ Painter\ 8/autorun.inf  /dvd/Getting\ Started\ with\ Corel\ \
Painter\ 8/autorun.inf 

So there appears to be two manifestations of the problem:

1. Vim creates the swap file before checking the swap file's existence on
these NFS mounted partitions.

2. As far as diff -r goes, the stale NFS message appeas only when I start
diffing a lot of large files.  It appears to work fine for single files.
The culprit appears to be stat64().

I'm feeling like I shouldn't have gotten out of bed today.  :-(


Save Star Trek Enterprise from extinction: http://www.saveenterprise.com

GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.