Bug 175812

Summary: setxattr() to a file on NFS returns EIO
Product: Red Hat Enterprise Linux 4 Reporter: Keiichi Mori <kmori>
Component: kernelAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3CC: jbaron
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2006-0132 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-07 21:05:41 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: 168429    
Attachments:
Description Flags
strace log on NFS client
none
Proposed Patch none

Description Keiichi Mori 2005-12-15 10:35:49 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.7.12) Gecko/20050921 Red Hat/1.0.7-1.4.1 Firefox/1.0.7

Description of problem:
When moving a file to a directory on NFS filesystem, mv command shows EIO error.

# ls -l /tmp/log
-rw-r--r--  1 root root 5569 Dec 15 18:48 /tmp/log
# mount | grep /mnt
sumida:/exports on /mnt type nfs (rw,addr=172.16.32.115)
# mv /tmp/log /mnt
mv: setting permissions for `/mnt/hoge': Input/output error

I confirmed that kernel-2.6.9-25.EL returns EIO instead of EOPNOTSUPP.

NFS client       NFS Server         Error of setxattr()
2.6.9-25.EL      2.6.9-25.EL        EIO
2.6.9-25.EL      2.6.9-22.0.1.EL    EOPNOTSUPP
2.6.9-22.0.1.EL  2.6.9-25.EL        EIO
2.6.9-22.0.1.EL  2.6.9-22.0.1.EL    EOPNOTSUPP

Strace log for kernel-2.6.9-25.EL NFS server:
getxattr("/tmp/log", "system.posix_acl_access", 0xbff94130, 132) = -1 EOPNOTSUPP (Operation not supported)
setxattr("/mnt/log", "system.posix_acl_access", "\x02\x00\x00\x00\x01\x00\x06\x00\xff\xff\xff\xff\x04\x00\x04\x00\xff\xff\xff\xff \x00\x04\x00\xff\xff\xff\xff", 28, 0) = -1 EIO (Input/output error)


Strace log for kernel-2.6.9-22.0.1.EL NFS server:
getxattr("hoge", "system.posix_acl_access", 0xbfec0df0, 132) = -1 EOPNOTSUPP (Operation not supported)
setxattr("issues/hoge", "system.posix_acl_access", "\x02\x00\x00\x00\x01\x00\x06\x00\xff\xff\xff\xff\x04\x00\x06\x00\xff\xff\xff\xff \x00\x04\x00\xff\xff\xff\xff", 28, 0) = -1 EOPNOTSUPP (Operation not supported)
e log for kernel-2.6.9-22.0.1.EL NFS server:



Version-Release number of selected component (if applicable):
kernel-2.6.9-25.EL

How reproducible:
Always

Steps to Reproduce:
1. mount NFS exported by kernel-2.6.9-25.EL
2. move a local file to NFS
  

Actual Results:  I/O error happens:
mv: setting permissions for `/mnt/hoge': Input/output error

Expected Results:  No I/O error happens


Additional info:

This is indeed regression issue.

Comment 1 Keiichi Mori 2005-12-15 10:38:16 UTC
Created attachment 122274 [details]
strace log on NFS client

Comment 2 Steve Dickson 2005-12-19 15:25:45 UTC
I'm having a hard time reproducing this problem....
I notice your doing the 'mv' as root, now is the filesystem exported
with no_root_squash? Also is the local filesystem (I'm assuming
its an ext3 fs) mounted with the acl mount flag?

Comment 3 Keiichi Mori 2005-12-19 17:06:35 UTC
I tried this again, I have just seen this issue in the case that NFS
server/client are running both 2.6.9-25.EL.
So, following table should be correct:
NFS client       NFS Server         Error of setxattr()
2.6.9-25.EL      2.6.9-25.EL        EIO
2.6.9-25.EL      2.6.9-22.0.1.EL    EOPNOTSUPP
2.6.9-22.0.1.EL  2.6.9-25.EL        EOPNOTSUPP
2.6.9-22.0.1.EL  2.6.9-22.0.1.EL    EOPNOTSUPP

I'm sorry that I've been confused.

> now is the filesystem exported with no_root_squash?
Yes, in the attached strace case. But it could happen
without no_root_squach.

> Also is the local filesystem (I'm assuming
> its an ext3 fs) mounted with the acl mount flag?
The localfile system is ext3 but it does not have acl flag.

On NFS server, SELinux is disabled:
# cat /proc/mounts | grep exports
/dev/sde1 /exports ext3 rw 0 0
# tune2fs -l /dev/sde1|grep feature
Filesystem features:      has_journal resize_inode filetype needs_recovery
sparse_super large_file
# cat /etc/exports
/exports *(rw)
# ls -ld /exports
drwxrwxrwx  3 root root 4096 Dec 20 02:02 /exports
# uname -r 
2.6.9-25.ELsmp


NFS Client, SELinux is disabled:
$ cat /proc/mounts | grep exports
sumida:/exports /mnt nfs rw,v3,rsize=32768,wsize=32768,hard,tcp,lock,addr=sumida 0 0
$ uname -r
2.6.9-25.ELsmp
$ ls -l /tmp/log
-rw-rw-r--  1 kmori kmori 1659 12æ 20 02:06 /tmp/log
$ mv /tmp/log /mnt
mv: setting permissions for `/mnt/log': Input/output error
$ ls -l /mnt/log
-rw-rw-r--  1 kmori kmori 1659 Dec 20 02:06 /mnt/log


Comment 4 Steve Dickson 2005-12-19 20:24:33 UTC
Created attachment 122422 [details]
Proposed Patch

Ok... I think I found the problem... it appears
the server is not returning the correct error.
The Proposed patch seems to take care of this 
problem. Note this patch is a combo of two upstream
pacthes...

Comment 5 Keiichi Mori 2005-12-20 07:54:46 UTC
I confirmed that above patch solved this issue. (appling the patch into
kernel-2.6.9-25.EL).

Thanks.


Comment 8 Red Hat Bugzilla 2006-03-07 21:05:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2006-0132.html