[Bugs] [Bug 1510401] fstat returns ENOENT/ESTALE

bugzilla at redhat.com bugzilla at redhat.com
Tue Nov 7 10:33:28 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1510401



--- Comment #1 from Raghavendra G <rgowdapp at redhat.com> ---
[raghu at unused tmp]$ grep GETATTR estale-ops.txt 
GETATTR {Len:56 Opcode:3 Unique:9895 Nodeid:140295787370744 Uid:601 Gid:601
Pid:18382 Padding:0} {GetattrFlags:0 Dummy:0 Fh:0} 


[raghu at unused tmp]$ grep Pid:18382 ./fuse_30.txt | grep Nodeid:140295787370744
GETATTR {Len:56 Opcode:3 Unique:9895 Nodeid:140295787370744 Uid:601 Gid:601
Pid:18382 Padding:0} {GetattrFlags:0 Dummy:0 Fh:0} 
FLUSH {Len:64 Opcode:25 Unique:9908 Nodeid:140295787370744 Uid:601 Gid:601
Pid:18382 Padding:0} {Fh:140296113765492 Unused:0 Padding:0
LockOwner:15059145825253368282} 
GETATTR {Len:56 Opcode:3 Unique:9910 Nodeid:140295787370744 Uid:601 Gid:601
Pid:18382 Padding:0} {GetattrFlags:0 Dummy:0 Fh:0} 
FLUSH {Len:64 Opcode:25 Unique:9917 Nodeid:140295787370744 Uid:601 Gid:601
Pid:18382 Padding:0} {Fh:140296113764232 Unused:0 Padding:0
LockOwner:15059145825253368282} 
OPEN {Len:48 Opcode:14 Unique:13150 Nodeid:140295787370744 Uid:601 Gid:601
Pid:18382 Padding:0} {Flags:32768 Unused:0} 
FLUSH {Len:64 Opcode:25 Unique:13156 Nodeid:140295787370744 Uid:601 Gid:601
Pid:18382 Padding:0} {Fh:140296113765912 Unused:0 Padding:0
LockOwner:15059145825253368282} 
OPEN {Len:48 Opcode:14 Unique:13193 Nodeid:140295787370744 Uid:601 Gid:601
Pid:18382 Padding:0} {Flags:32768 Unused:0} 
FLUSH {Len:64 Opcode:25 Unique:13202 Nodeid:140295787370744 Uid:601 Gid:601
Pid:18382 Padding:0} {Fh:140296113762832 Unused:0 Padding:0
LockOwner:15059145825253368282}

As we can see above before GETATTR failure (Unique:9895), an open was never
done on the same file (Nodeid:140295787370744) by the same application thread
(Pid:18382). Since no fd was opened by the same thread, glusterfs falls back to
STAT instead of FSTAT which can fail with ESTALE due to rename overwriting the
file. However, I do see that fds are opened by other threads on the same file
at the time of GETATTR (Unique:9895). So, I am wondering whether the
application is written in such a way that fds are opened and consumed across
different threads.  If yes, this could the cause for fstat failures as
Glusterfs uses an fd only if it is opened by same thread during GETATTR.
Otherwise, it'll use STAT instead of FSTAT.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=XWCtkEktfQ&a=cc_unsubscribe


More information about the Bugs mailing list