[Errno 45] Operation not supported error with SMB mount on OSX

Bug #313625 reported by Alex Bleasdale
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

This is a similar bug to #31006 and #114528 but I'm not just using afp (like 114528) and I'm finding this error with bzr init (unlike 31006). I'm using the latest version of bzr at the time of writing (1.10) on OSX (10.5.6) with Python 2.5.1

To reproduce this error, if I try any bzr operations on a samba mounted volume (I've tested this on samba running on a Buffalo Linkstation Pro Duo NAS [linux] and on an Apple XServe mount over AFP and I get very similar error messages on both).

I get the following error ("Could not acquire lock"). In #31006 there is a suggestion that a similar issue to this was fixed for other bzr commands (not init) although I wasn't sure whether the fix had been released yet (maybe I should check a nightly build for this?)

FWIW: i installed mercurial on the same machine to see whether it was a more general python issue with OSX and SMB (for example); on both filesystems, hg init doesn't produce this error, so this might be an issue with bzr which is why I wanted to file a bug:

Steps to reproduce:

Go to a samba mounted device on OSX (tested with both smb:// and afp:// on 2 different servers with the same result)

$ bzr init testrepo

bzr: ERROR: Could not acquire lock "[Errno 45] Operation not supported"
/Library/Python/2.5/site-packages/bzrlib/lock.py:138: UserWarning: lock on <open file u'/Volumes/share/bzrtest/testrepo/.bzr/checkout/dirstate', mode 'wb+' at 0x1322f50> not released
  warn("lock on %r not released" % self.f)
Exception exceptions.IOError: (45, 'Operation not supported') in <bound method _fcntl_WriteLock.__del__ of <bzrlib.lock._fcntl_WriteLock object at 0x1326fd0>> ignored
/Library/Python/2.5/site-packages/bzrlib/lockable_files.py:116: UserWarning: LockableFiles(<bzrlib.transport.local.LocalTransport url=file:///Volumes/share/bzrtest/testrepo/.bzr/checkout/>) was gc'd while locked
  warnings.warn("%r was gc'd while locked" % self)

My bzr --version output:

Bazaar (bzr) 1.10
  Python interpreter: /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python 2.5.1
  Python standard library: /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5
  bzrlib: /Library/Python/2.5/site-packages/bzrlib
  Bazaar configuration: /Users/alexbleasdale/.bazaar
  Bazaar log file: /Users/alexbleasdale/.bzr.log

The relevant section from ~/.bzr.log:

Sat 2009-01-03 20:59:57 -0600
0.930 bzr arguments: [u'init', u'testrepo']
1.035 looking for plugins in /Users/alexbleasdale/.bazaar/plugins
1.035 looking for plugins in /Library/Python/2.5/site-packages/bzrlib/plugins
1.856 bzr-svn: using Subversion 1.4.4 ()
4.247 encoding stdout as sys.stdout encoding 'UTF-8'
5.144 opening SVN RA connection to 'file:///Volumes/share/bzrtest/testrepo'
5.200 Unable to open <bzrlib.transport.local.LocalTransport url=file:///Volumes/share/bzrtest/testrepo/> with Subversion: Unable to open an ra_local session to URL
7.278 opening SVN RA connection to 'file:///Volumes/share/bzrtest'
7.291 Unable to open <bzrlib.transport.local.LocalTransport url=file:///Volumes/share/bzrtest/> with Subversion: Unable to open an ra_local session to URL
7.319 opening SVN RA connection to 'file:///Volumes/share'
7.320 Unable to open <bzrlib.transport.local.LocalTransport url=file:///Volumes/share/> with Subversion: Unable to open an ra_local session to URL
7.331 opening SVN RA connection to 'file:///Volumes'
7.332 Unable to open <bzrlib.transport.local.LocalTransport url=file:///Volumes/> with Subversion: Unable to open an ra_local session to URL
7.335 opening SVN RA connection to 'file:'
7.337 creating repository in file:///Volumes/share/bzrtest/testrepo/.bzr/.
9.616 creating branch <bzrlib.branch.BzrBranchFormat6 object at 0x1395310> in file:///Volumes/share/bzrtest/testrepo/.bzr/
11.683 trying to create missing lock '/Volumes/share/bzrtest/testrepo/.bzr/checkout/dirstate'
11.832 Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.5/site-packages/bzrlib/builtins.py", line 1429, in run
    possible_transports=[to_transport])
  File "/Library/Python/2.5/site-packages/bzrlib/bzrdir.py", line 479, in create_branch_convenience
    bzrdir.create_workingtree()
  File "/Library/Python/2.5/site-packages/bzrlib/bzrdir.py", line 1455, in create_workingtree
    accelerator_tree=accelerator_tree, hardlink=hardlink)
  File "/Library/Python/2.5/site-packages/bzrlib/workingtree_4.py", line 1350, in initialize
    state = dirstate.DirState.initialize(local_path)
  File "/Library/Python/2.5/site-packages/bzrlib/dirstate.py", line 1820, in initialize
    result.lock_write()
  File "/Library/Python/2.5/site-packages/bzrlib/dirstate.py", line 2737, in lock_write
    self._lock_token = lock.WriteLock(self._filename)
  File "/Library/Python/2.5/site-packages/bzrlib/lock.py", line 188, in __init__
    raise errors.LockContention(e)
LockContention: Could not acquire lock "[Errno 45] Operation not supported"

11.911 return code 3

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 313625] [NEW] [Errno 45] Operation not supported error with SMB mount on OSX

  tags dirstate lock macos
  duplicate 31006

Thanks for reporting this.

I think it is a recurrence of 31006, to which I'll add some more
information.

It should be possible to have file locks work over CIFS/SMB maybe by
changing a configuration setting - maybe you can find out how.

--
Martin <http://launchpad.net/~mbp>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.