Bug 236308

Summary: NFS attribute cache problem
Product: Red Hat Enterprise Linux 4 Reporter: Devin Bougie <devin.bougie>
Component: nfs-utilsAssignee: Jeff Layton <jlayton>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 4.4CC: jan.iven, steved
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: -55.EL Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-03 11:40:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Devin Bougie 2007-04-12 23:51:46 UTC
It looks like we’ve run into an NFS client bug in RHEL4.  We stumbled upon this while trying to checkout 
code from a subversion repository to an nfs directory.  Our NFS servers are RHEL3, and we only see this 
bug with RHEL4 clients.  Things work when mounting the directory using ‘noac’, but we can’t live with 
the performance hit.

Here is a test program to demonstrate the bug.

dsr_lnxcu9% pwd
/home/dsr
dsr_lnxcu9% cat svnbug.c
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>

#ifndef TESTSIZE
#define TESTSIZE 52
#endif

int main(int argc, char** argv)
{
    char s[TESTSIZE+1];
    struct stat st1, st2;
    int r;
    ssize_t len;

    int fd = open("tmpfile.xyzzy", O_RDWR|O_CREAT|O_EXCL, 0666);

    if (fd < 0) {
       perror("open");
       exit(errno);
    }
    memset(s, 'x', TESTSIZE);
    len = write(fd, s, TESTSIZE);
    if (len < 0) {
       perror("write");
       exit(errno);
    }
    r = fstat(fd, &st1);
    if (0 != r) {
       perror("fstat");
       exit(errno);
    }
    r = fstat(fd, &st2);
    if (0 != r) {
       perror("fstat");
       exit(errno);
    }
    printf("len = %zd, st1 = %zd, st2 = %zd\n",
           len, st1.st_size, st2.st_size);

    close(fd);

    return 0; 
}
dsr_lnxcu9% gcc svnbug.c
dsr_lnxcu9% ~/a.out
len = 52, st1 = 52, st2 = 52
dsr_lnxcu9% cd /cdat/tem/dsr
dsr_lnxcu9% ~/a.out
len = 52, st1 = 0, st2 = 52

Comment 1 Devin Bougie 2007-04-14 00:41:05 UTC
Hi All,

This looks similar to Bug 194088.

Thanks,
Devin

Comment 2 Jeff Layton 2007-04-15 17:59:42 UTC
Devin, could you test out the kernels I have at:

http://people.redhat.com/jlayton

and see if they resolve this problem? If so, then 4.5 will likely contain the
fix for this.


Comment 3 Devin Bougie 2007-04-16 14:28:37 UTC
Hi Jeff,

Yes, your test kernels do seem to fix this problem.  Do you know when 4.5 might be released?

Many thanks,
Devin

Comment 4 Jeff Layton 2007-04-16 14:30:45 UTC
"Real Soon Now"


Comment 5 Jeff Layton 2007-04-17 19:21:02 UTC
Since it looks like the test kernel corrected this, I'm going to set this to
"NEEDINFO". When 4.5 is released, please test that kernel and report back here.


Comment 6 Jeff Layton 2007-05-03 11:40:47 UTC
4.5 is now released. I'm going to go ahead and close this case. Please reopen
(or open a new case) if this problem is not addressed in kernel -55.EL or greater.