Bug 455568 - Samba CIFS unlocking problem with Unix/Posix locks
Samba CIFS unlocking problem with Unix/Posix locks
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: samba (Show other bugs)
4.6
x86_64 Linux
low Severity high
: rc
: ---
Assigned To: Simo Sorce
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-16 05:44 EDT by mark meierjohann
Modified: 2008-12-17 13:26 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-17 13:26:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description mark meierjohann 2008-07-16 05:44:59 EDT
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 10:59:44 EDT
We are shipping 3.0.28 + patches in 4.7, can you test with that samba version?
It should be fixed there.

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