Bug 500153 - Bad lock managment between CIFS and NFSv4 (kernel) access
Summary: Bad lock managment between CIFS and NFSv4 (kernel) access
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 9
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-11 12:54 UTC by Meflah Abdelkader
Modified: 2014-06-18 07:38 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-08 11:04:18 UTC
Type: ---


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.