Bug 2454 - Mac OS X client changes lock owner, doesn't close locks
Summary: Mac OS X client changes lock owner, doesn't close locks
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.9
Hardware: PPC Mac OS X
: P3 major
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-15 12:57 UTC by Mark Stingley
Modified: 2006-04-09 12:18 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Stingley 2005-03-15 12:57:08 UTC
Users on OS X 10.3.x, Samba 3.0.9 on RHEL 3.

Problem 1:

User A creates file and saves.
User B somehow gains ownership of resource fork.
User C can't save file anymore.

Problem 2:

OS X or Samba never releases ANY locks on
resource files until server is restarted.

Documentation for Problem 1:

After first save of file:

  smbd 19113 USER-A 26r REG 8,2  82  32781 /home/sambaserver/._test.rtf 

Second save attempt failed:

  smbd 18558 USER-B 75r REG 8,2  82  32781 /home/sambaserver/._test.rtf

User B had assumed ownership of the resource file lock.  Actual ownership
of the files themselves remained with User A.

Samba user log:

First save -

[2005/03/15 10:22:43, 3] smbd/reply.c:rename_internals(3877)
  rename_internals: succeeded doing rename on ./data02d6.000 -> ./test.rtf

Second save -

[2005/03/15 10:46:09, 2] smbd/close.c:close_normal_file(270)
  USER-A closed file ./test.rtf (numopen=8)
[2005/03/15 10:46:09, 3] smbd/reply.c:rename_internals(3877)
  rename_internals: succeeded doing rename on ./test.rtf -> ./test~.rtf
<snip>
[2005/03/15 10:46:10, 3] smbd/reply.c:rename_internals(3854)
  rename_internals: Error NT_STATUS_SHARING_VIOLATION rename ./._test.rtf ->
./._test~.rtf

From looking through the logs, OS X finder activity seems to be opening and
locking many files, sometimes grabbing ownership of the resource file lock from
the real owner.
Comment 1 Volker Lendecke 2006-04-09 12:18:05 UTC
Please retry this against Samba 3.0.22. Since 3.0.9 the complete open code has been re-worked. If the problem persists, please re-open this bug.

Volker