Bug 455568

Summary: Samba CIFS unlocking problem with Unix/Posix locks
Product: Red Hat Enterprise Linux 4 Reporter: mark meierjohann <mark>
Component: sambaAssignee: Simo Sorce <ssorce>
Status: CLOSED INSUFFICIENT_DATA QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: 4.6CC: gdeschner, jlayton
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-17 18:26:05 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 mark meierjohann 2008-07-16 09:44:59 UTC
Description of problem: 
presumably problem with unlocking in Samba.

Samba Errors: smb.log locking/locking.c:do_unlock(279)
  PANIC: assert failed at locking/locking.c(279)
Kernel Errors: CIFS VFS: Send error in Close = -9

Version-Release number of selected component (if applicable):
samba-3.0.25b-1.el4_6.2 and as far as I can see in source code
the current samba-3.0.25b-1.el4_6.5 is affected, too

How reproducible:
regularly, depending on traffic and lock/unlock behaviour of application

Steps to Reproduce:
1. export F/S from RHEL4.6 using Samba
2. mount on RHEL4.6 Linux systems using CIFS
3. heavily use Unix file locking on mounted system 
  
Actual results:
smb log:
[2008/07/16 09:14:50, 0] locking/locking.c:do_unlock(279)
  PANIC: assert failed at locking/locking.c(279)
[2008/07/16 09:15:51, 0] locking/locking.c:do_unlock(279)
  PANIC: assert failed at locking/locking.c(279)
and problems on the client side:
Jul 16 xx:xx:xx  kernel:  CIFS VFS: Send error in Close = -9

The custom applications on the CIFS client systems are unhappy, too.

Expected results:
lock and unlock just work.

Additional info:

The following patch may resolve these errors:

Quote:
"Here's the fix - will be in 3.0.25c. Problem was an optimization
introduced to not read the locking tdb on file close for Windows
locks if we know there were none on the file - for POSIX locks
you can't count of course as one unlock can unlock many locked
regions. Fix attached."

http://lists.samba.org/archive/samba-technical/2007-July/054535.html
http://lists.samba.org/archive/samba-technical/2007-July/054534.html

Comment 1 Simo Sorce 2008-07-16 14:59:44 UTC
We are shipping 3.0.28 + patches in 4.7, can you test with that samba version?
It should be fixed there.