Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 401551 - NFS dentries can contain stale file IDs
Summary: NFS dentries can contain stale file IDs
Keywords:
Status: CLOSED DUPLICATE of bug 157266
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.6
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Jeff Layton
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-27 18:17 UTC by Fabio Olive Leite
Modified: 2008-04-10 16:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-01-09 17:48:01 UTC


Attachments (Terms of Use)
Patch that adds extra validity checks to nfs_readdir_lookup. (deleted)
2007-11-27 18:17 UTC, Fabio Olive Leite
no flags Details | Diff

Description Fabio Olive Leite 2007-11-27 18:17:27 UTC
In RHEL-4u6 it is possible to have nfs_readdir_lookup return dentries 
containing stale NFS file IDs, thus causing stat/open calls to fail.

This is related to upstream commit ef75c7974b383769ae5741cf930b8aa4dcaef395.

I'll attach a patch that applies cleanly to 2.6.9-67.EL and fixes the problem 
(tested at customer site). It has some debug printks that can be safely 
removed.

Comment 1 Fabio Olive Leite 2007-11-27 18:17:27 UTC
Created attachment 270011 [details]
Patch that adds extra validity checks to nfs_readdir_lookup.

Comment 3 Jeff Layton 2007-12-03 15:27:06 UTC
Patch looks reasonable and is upstream. Do we have a way to reliably reproduce
this? As a side note, this might be the bug behind bug 327591. We have no way to
reproduce that as of yet though, so it's hard to know for sure.


Comment 4 Jeff Layton 2007-12-05 20:37:26 UTC
I've gone ahead and added this patch to my test kernels. When you get a
reproducer, it would be good to verify that this patch actually fixes it.


Comment 5 Jeff Layton 2007-12-05 20:37:48 UTC
Test kernels are at:

http://people.redhat.com/jlayton/

Comment 9 Jeff Layton 2008-01-02 16:47:14 UTC
I've tested this reproducer on a kernel without this patch and then on one with
it. I don't see any difference in behavior. I still see an ENOENT error ~1/3 to
1/2 of the time.

IIRC, when I looked at this problem before, we concluded that the issue was
timestamp granularity on the server. I don't think it's possible to fix that,
aside from moving to a different server-side filesystem.

Can you clarify the configuration of your client and server? What kernel is
running on the client, and what sort of local filesystem is the server using?


Comment 10 Sam Knuth 2008-01-09 14:53:38 UTC
Do we have any indication if RHEL 5 is vulnerable to this?

Comment 11 Peter Staubach 2008-01-09 15:09:13 UTC
I would guess that RHEL-5 is vulnerable.

I suspect that this problem is really a duplicate of 231143.  The problem
isn't that the client can cache metadata which becomes stale, the problem
is that the client doesn't properly recover when it detects the stale
metadata.


Note You need to log in before you can comment on or make changes to this bug.