bzr broken over NFS

Giao Phan giao at guba.com
Sun Feb 26 05:07:01 GMT 2006


I'm unsure if I'm supposed to post bugs to the bzr.dev tree here or to
the bugtracker, but I'm having problems doing just about anything an NFS
partition, (I'm assuming that the problem, because if I work on local
disk it's all good.).  Both NFS server and client are linux box.  Is
this something that will be fixed by the new locking code?

I did an rsync:

% rsync -avn --delete bazaar-ng.org::bazaar-ng/bzr/bzr.dev .

Then I try to grab another copy:

%bzr get http://bazaar-ng.org/bzr/bzr.dev bzr.dev2
FIXME: clone via create and fetch is probably faster when versioned file
comes in.
FIXME use a branch format here
/home/casret/src/bzr.dev/bzrlib/branch.py:434: DeprecationWarning:
bzrlib.branch.initialize was deprecated in version 0.8.
  br_to = to_branch_type.initialize(to_location)
bzr: ERROR: bzrlib.errors.LockError: [Errno 37] No locks available
  at /home/casret/src/bzr.dev/bzrlib/lock.py line 97
  in __init__
/home/casret/src/bzr.dev/bzrlib/lock.py:62: UserWarning: lock on <open
file u'/home/casret/src/bzr.dev2/.bzr/branch-lock', mode 'wb' at
0xb776f848> not released
  warn("lock on %r not released" % self.f)

It then just hangs there, can't keyboard interrupt or suspend, have to
do a kill -9 from another terminal.

.bzr.log:

bzr 0.8pre invoked on python 2.4.2.final.0 (linux2)
  arguments: ['/home/casret/bin/bzr', 'get',
'http://bazaar-ng.org/bzr/bzr.dev', 'bzr.dev2']
  working dir: u'/home/casret/src'
looking for plugins in /home/casret/src/bzr.dev/bzrlib/plugins
Plugin name __init__ already loaded
Plugin name __init__ already loaded
looking for plugins in /home/casret/.bazaar/plugins
WARNING: using slower ElementTree; consider installing cElementTree and
make sure it's on your PYTHONPATH
trying to open u'http://bazaar-ng.org/bzr/bzr.dev' with transport
<bzrlib.transport.http.HttpTransport object at 0xb77651ec>
get_url http://bazaar-ng.org/bzr/bzr.dev/.bzr/branch-format
got branch format <bzrlib.branch.BzrBranchFormat5 object at 0xb78108ec>
lock read: <bzrlib.lockable_files.LockableFiles object at 0xb7777c0c> (None)
lock read: <bzrlib.lockable_files.LockableFiles object at 0xb777d86c> (None)
created control directory in /home/casret/src/bzr.dev2/
lock write: <bzrlib.lockable_files.LockableFiles object at 0xb778196c>
(None)
unlock: <bzrlib.lockable_files.LockableFiles object at 0xb777d86c> (1)
unlock: <bzrlib.lockable_files.LockableFiles object at 0xb7777c0c> (1)
[ 2392] Sat 20:37:14.969 ERROR: bzrlib.errors.LockError: [Errno 37] No
locks available
  at /home/casret/src/bzr.dev/bzrlib/lock.py line 97
  in __init__
Traceback (most recent call last):
  File "/home/casret/src/bzr.dev/bzrlib/commands.py", line 572, in
run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/casret/src/bzr.dev/bzrlib/commands.py", line 534, in run_bzr
    ret = cmd_obj.run_argv(argv)
  File "/home/casret/src/bzr.dev/bzrlib/commands.py", line 233, in run_argv
    return self.run(**all_cmd_args)
  File "/home/casret/src/bzr.dev/bzrlib/builtins.py", line 592, in run
    br_from.clone(to_location, revision_id, basis_branch)
  File "/home/casret/src/bzr.dev/bzrlib/branch.py", line 1088, in clone
    return Branch.clone(self, to_location, revision, basis_branch,
to_branch_type)
  File "/home/casret/src/bzr.dev/bzrlib/branch.py", line 434, in clone
    br_to = to_branch_type.initialize(to_location)
  File "/home/casret/src/bzr.dev/bzrlib/symbol_versioning.py", line 65,
in decorated_function
    return callable(*args, **kwargs)
  File "/home/casret/src/bzr.dev/bzrlib/branch.py", line 172, in initialize
    return WorkingTree.create_standalone(safe_unicode(base)).branch
  File "/home/casret/src/bzr.dev/bzrlib/workingtree.py", line 343, in
create_standalone
    b = Branch.create(directory)
  File "/home/casret/src/bzr.dev/bzrlib/branch.py", line 160, in create
    return Branch._default_initializer(safe_unicode(base))
  File "/home/casret/src/bzr.dev/bzrlib/branch.py", line 781, in _initialize
    return BzrBranchFormat6().initialize(base)
  File "/home/casret/src/bzr.dev/bzrlib/branch.py", line 583, in initialize
    control_files.lock_write()
  File "/home/casret/src/bzr.dev/bzrlib/lockable_files.py", line 174, in
lock_write
    self._lock = self._transport.lock_write(
  File "/home/casret/src/bzr.dev/bzrlib/transport/local.py", line 248,
in lock_write
    return WriteLock(self.abspath(relpath))
  File "/home/casret/src/bzr.dev/bzrlib/lock.py", line 97, in __init__
    raise LockError(e)
LockError: [Errno 37] No locks available


Same thing will happen with something like a bzr info, different trace
though:

bzr 0.8pre invoked on python 2.4.2.final.0 (linux2)
  arguments: ['/home/casret/bin/bzr', 'info']
  working dir: u'/home/casret/src/bzr.dev'
looking for plugins in /home/casret/src/bzr.dev/bzrlib/plugins
Plugin name __init__ already loaded
Plugin name __init__ already loaded
looking for plugins in /home/casret/.bazaar/plugins
WARNING: using slower ElementTree; consider installing cElementTree and
make sure it's on your PYTHONPATH
openeing working tree u'/home/casret/src/bzr.dev'
trying to open u'/home/casret/src/bzr.dev' with transport
<bzrlib.transport.local.LocalTransport object at 0xb7b3952c>
got branch format <bzrlib.branch.BzrBranchFormat5 object at 0xb78168cc>
lock read: <bzrlib.lockable_files.LockableFiles object at 0xb7b4268c> (None)
[ 6349] Sat 20:54:40.945 ERROR: bzrlib.errors.LockError: [Errno 37] No
locks available
  at /home/casret/src/bzr.dev/bzrlib/lock.py line 109
  in __init__
Traceback (most recent call last):
  File "/home/casret/src/bzr.dev/bzrlib/commands.py", line 572, in
run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/casret/src/bzr.dev/bzrlib/commands.py", line 534, in run_bzr
    ret = cmd_obj.run_argv(argv)
  File "/home/casret/src/bzr.dev/bzrlib/commands.py", line 233, in run_argv
    return self.run(**all_cmd_args)
  File "/home/casret/src/bzr.dev/bzrlib/commands.py", line 544, in
ignore_pipe
    result = func(*args, **kwargs)
  File "/home/casret/src/bzr.dev/bzrlib/builtins.py", line 637, in run
    b = WorkingTree.open_containing(branch)[0].branch
  File "/home/casret/src/bzr.dev/bzrlib/workingtree.py", line 267, in
open_containing
    return WorkingTree(path), tail
  File "/home/casret/src/bzr.dev/bzrlib/workingtree.py", line 237, in
__init__
    self._set_inventory(self.read_working_inventory())
  File "/home/casret/src/bzr.dev/bzrlib/decorators.py", line 36, in
decorated
    self.lock_read()
  File "/home/casret/src/bzr.dev/bzrlib/workingtree.py", line 866, in
lock_read
    return self.branch.lock_read()
  File "/home/casret/src/bzr.dev/bzrlib/branch.py", line 862, in lock_read
    self.control_files.lock_read()
  File "/home/casret/src/bzr.dev/bzrlib/lockable_files.py", line 187, in
lock_read
    self._lock = self._transport.lock_read(
  File "/home/casret/src/bzr.dev/bzrlib/transport/local.py", line 237,
in lock_read
    return ReadLock(path)
  File "/home/casret/src/bzr.dev/bzrlib/lock.py", line 109, in __init__
    raise LockError(e)
LockError: [Errno 37] No locks available

Strace tells the last system call was:
fcntl64(4, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}







More information about the bazaar mailing list