Bug 443832

Summary: NFSv4 regression: kernel write()'s status EACCES instead of 0
Product: [Fedora] Fedora Reporter: Meflah Abdelkader <meflah_kader>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: jlayton
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-09 01:24:59 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
log of the test on client
3 files: shell to mount/umount FSs, shell to start test and main linux binary none

Description Meflah Abdelkader 2008-04-23 12:00:00 EDT
Description of problem:
To bypass the bugzilla 443808, I modified my test to accept both EIO and EACCES 
when I expect EACCES.
So another issue appears in the kernel:
After 7 writes with an accepted status EIO (expected EACCES)
The eighth ::write() returns EACCES instead of Success

Version-Release number of selected component (if applicable):
2.6.21 and 2.6,23 and 2.6.25

How reproducible:

Steps to Reproduce:
1. mount NFSv4 server (-o noac -t nfs4)
2. client1 opens file and takes a shared lock
   fcntl(fd, F_SETLKW, &flock) with  flock.l_start=16384, flock.l_len=24575

3. client2 opens file and does many writes on different intervals
   NFS write range:     0- 8191 : SUCCESS
   NFS write range:     0-16383 : SUCCESS
   NFS write range:  8192-24575 : Input/output error (bugzilla 443808)
   NFS write range: 16384-24575 : Input/output error
   NFS write range: 24576-32767 : Input/output error
   NFS write range: 32768-40959 : Input/output error
   NFS write range: 16384-40959 : Input/output error
   NFS write range:  8192-49151 : Input/output error
   NFS write range: 32768-49151 : Input/output error
   NFS write range: 40960-57343 : Permission denied ?   instead of SUCCESS

Actual results:

Expected results:

Additional info:
The network traces of NFSv4 compounds shows, like expected by the test,  
NFS4_OK at the last write
Comment 1 Meflah Abdelkader 2008-04-23 12:00:00 EDT
Created attachment 303520 [details]
log of the test on client
Comment 2 Steve Dickson 2008-04-23 12:11:55 EDT
I realize writing a reproducer should be trivial, but if you could
post the one your using, it would start us on the same page... 
Comment 3 Meflah Abdelkader 2008-04-24 12:06:18 EDT
Our test uses a server supporting CIFS and NFSv4.
The test uses a simulated CIFS client (samba).
The first lock is got by a CIFS client.
The read/write IOs are done by an NFS client.
If your server supports CIFS and NFS then I will send you the test.
So you need to set some variables in the scripts
Comment 4 Steve Dickson 2008-04-25 10:31:06 EDT
Yes, I have server that will support both CIFS and NFSv4, so
please go ahead an post your test. tia...
Comment 5 Meflah Abdelkader 2008-04-28 08:17:48 EDT
Created attachment 303966 [details]
3 files: shell to mount/umount FSs, shell to start test and main linux binary

already commented
Comment 6 Meflah Abdelkader 2008-04-28 08:20:59 EDT
Here is  joined a zipped tar file tests.tar.zip
The directory contains 3 files:
mountUmount.sh:  shell to mount/umount FSs 
lock.csh: shell to start test
locktest: Linux test binary called by previous lock.csh
1/ fill the 4 CIFS variables flaged by xxxxx
2/ mountUmount.sh {<unixServerName> <unixFsName> <shareName> | umount }
3/ lock.csh "14(2)"
Comment 7 Steve Dickson 2008-05-08 14:35:46 EDT
Question: does the CIFS server have to be the same box?
It appears so...
Comment 8 Meflah Abdelkader 2008-05-13 09:47:55 EDT
I think so, since we want the same file be exported to both protocols.
PS: I'll be out of office from 15 to 30 May
Comment 9 Steve Dickson 2008-06-27 15:13:12 EDT
Does this still happen with the latest F8 kernel?
Comment 10 Meflah Abdelkader 2008-07-31 11:34:14 EDT
it still happens with F9 kernel ( 
Comment 11 Bug Zapper 2008-11-26 05:33:11 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 12 Bug Zapper 2009-01-09 01:24:59 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.