Bug 500153

Summary: Bad lock managment between CIFS and NFSv4 (kernel) access
Product: [Fedora] Fedora Reporter: Meflah Abdelkader <meflah_kader>
Component: kernelAssignee: Jeff Layton <jlayton>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 9CC: covex, itamar, jlayton, jonstanley, kernel-maint, quintela, steved
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-08 11:04:18 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 Meflah Abdelkader 2009-05-11 12:54:26 UTC
Description of problem:
client1 CIFS: lock SHARED range:16384-40959
client2 NFSV4: all lock SHARED succeed for any range and then unlock
               but lock EXCLUSIVE  range 8192-24575 succeeds instead of failure

Version-Release number of selected component (if applicable):
Fedora release 9

How reproducible:
I use a specific test with two clients (CIFS-NFS(via nfsv4 mount point))

Steps to Reproduce:
1. CIFS                      SHARED lock range:16384-40959
2. NFS (via v4 mount point): EXCLUSIVE lock range:8192-24575 
3.
  
Actual results:
 Second lock succeeds

Expected results:
 Failure

Additional info:
1/ The is no NFSv4 lock operation conveyed via network traces
2/ The issue doesn't exist in Redhat Enterprise Linux Server release 5.1 (Tikanga)


3/ Here is the complete trace of client test
Client:1 Server:SX0305KA User:......................... UNICODE Negotiation SUCCEEDED
Client:1 Share:\\SX0305KA\SVR5LOCKNO!  ................ Tree connect (Tid:0x003F): SUCCESS
Client:1 File:\\SX0305KA\SVR5LOCKNO\toto_25674\lockfile! openX Access_mode:RW Share:DENY_NONE  SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!     NFS open  SUCCESS
Client:1 File:\\SX0305KA\SVR5LOCKNO\toto_25674\lockfile! lockX  SHARED  range:0x4000-0x9fff : SUCCESS
Client:1 INFO :!                                                 Segment 7 (range:16384-40959)!   is locked for Shared access
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 0-8191 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 0-8191 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 0-16383 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 0-16383 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 8192-24575 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 8192-24575 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 16384-24575 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 16384-24575 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 24576-32767 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 24576-32767 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 32768-40959 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 32768-40959 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 16384-40959 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 16384-40959 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 8192-49151 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 8192-49151 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 32768-49151 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 32768-49151 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 40960-57343 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 40960-57343 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  SHARED    range: 49152-57343 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 49152-57343 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  EXCLUSIVE range: 0-8191 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 0-8191 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  EXCLUSIVE range: 0-16383 : SUCCESS
Client:2 File /tmp/KADER/nolock/toto_25674/lockfile!   NFS lock  UNLOCK    range: 0-16383 : SUCCESS
Client:2 ERROR:?   File /tmp/KADER/nolock/toto_25674/lockfile?   NFS lock  EXCLUSIVE range: 8192-24575 : SUCCESS  instead of "Resource temporarily unavailable"

Comment 1 Adam Pribyl 2009-05-12 15:15:19 UTC
Did you really meant to report this agains Fedora Hosted project and Deployment Guide documentation?

Comment 2 Jon Stanley 2009-05-21 04:37:40 UTC
Moving to Fedora/Kernel

Comment 3 Jon Stanley 2009-05-21 04:38:53 UTC
Correcting version based on information in bugreport.  Sorry for the noise

Comment 4 Jeff Layton 2009-05-23 19:54:27 UTC
What kernel are you testing this on? F9 is pretty old at this point, do newer kernels fare better here?

Comment 5 Meflah Abdelkader 2009-06-05 08:04:21 UTC
Yes, the new kernel fares better

Comment 6 Jeff Layton 2009-06-05 10:05:29 UTC
Good to hear, sounds like we can probably just close this as being already fixed upstream. For the record, what kernel did you test?

Comment 7 Meflah Abdelkader 2009-06-08 08:25:44 UTC
I tested the kernel 2.6.28.11
Thank you

Comment 8 Jeff Layton 2009-06-08 11:04:18 UTC
Thanks for the info. Should be fixed in F11 then.