Bug 808112

Summary: [nfsv4] open(O_CREAT) returns EEXISTS on symbolic link created on another system until stat()ed
Product: Red Hat Enterprise Linux 6 Reporter: Orion Poplawski <orion>
Component: kernelAssignee: J. Bruce Fields <bfields>
Status: CLOSED ERRATA QA Contact: Boris Ranto <branto>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3CC: bfields, branto, eguan, jiali, jlayton, rwheeler, steved, yanwang
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: NFS server NFSD
Fixed In Version: kernel-2.6.32-298.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 832934 846525 (view as bug list) Environment:
Last Closed: 2013-02-21 06:05:32 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:
Bug Depends On:    
Bug Blocks: 832934, 846525    
Attachments:
Description Flags
test c program
none
proposed patch none

Description Orion Poplawski 2012-03-29 15:41:46 UTC
Created attachment 573712 [details]
test c program

Description of problem:

client A:
touch blah
ln -s blah blahlink

client B:
open("blahlink", O_RDONLY|O_CREAT, 0666) = -1 EEXIST (File exists)
$ ls -l blahlink
lrwxrwxrwx. 1 orion cora 4 Mar 29 09:30 blahlink -> blah
open("blahlink", O_RDONLY|O_CREAT, 0666) = 3

Removing and recreating the link on client A restores the problem.

earth:/export/home/orion on /home/orion type nfs (rw,noatime,intr,rsize=32768,wsize=32768,actimeo=1,sloppy,vers=4,addr=10.10.10.1,clientaddr=10.10.41.10)

I thought this might be the same as bug 739797, but this kernel should have the fix for that (and in fact it does fix the vim issue).

Version-Release number of selected component (if applicable):
2.6.32-250.el6.x86_64

How reproducible:
Everytime

I can also reproduce with 2.6.42.9-2.fc15.x86_64 but not with 3.3.0-4.fc16.x86_64.

Comment 2 Orion Poplawski 2012-03-29 15:54:06 UTC
Scratch that.  I can reproduce with 3.3.0-4.fc16.x86_64.  You need to make sure that the link is recreated after an initial access/mount to test.  Also present in 3.4.0-0.rc0.git1.2.fc18.x86_64.  I can't reproduce with 2.6.18-308.1.1.el5.

Comment 3 Orion Poplawski 2012-03-29 18:22:27 UTC
According to the discussion on linux-nfs http://thread.gmane.org/gmane.linux.nfs/48319 this is a server bug, and apparently is still present in the latest upstream kernel.

Comment 4 Orion Poplawski 2012-04-06 19:27:22 UTC
Created attachment 575818 [details]
proposed patch

This was the proposed patch on the list.  I applied to kernel-2.6.32-220.7.1.el6.x86_64 and it appears to have fixed the issue.

Comment 5 RHEL Program Management 2012-05-03 05:24:31 UTC
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 6 J. Bruce Fields 2012-05-21 19:59:37 UTC
Yes, the backport looks right.  Thanks!

Comment 7 RHEL Program Management 2012-06-27 13:50:30 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 9 Jarod Wilson 2012-08-16 21:20:45 UTC
Patch(es) available on kernel-2.6.32-298.el6

Comment 14 errata-xmlrpc 2013-02-21 06:05:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0496.html