"directory not empty" creating lockdir on existing branch over sftp

Bug #340352 reported by Martin Pool
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Martin Pool

Bug Description

I just got this error from bzr trying to lock an existing branch.

I think this is a launchpad sftp server bug; "directory not empty" is not a very reasonable cause for failing a lock attempt. However, possibly it means that bzr should treat this as the directory already being locked.

Tue 2009-03-10 16:56:56 +1000
0.035 bzr arguments: [u'push', u'sftp://bazaar.launchpad.net/~mbp/bzr/progress']
0.074 looking for plugins in /home/mbp/.bazaar/plugins
0.293 looking for plugins in /home/mbp/bzr/progress/bzrlib/plugins
0.328 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.329 Plugin name gtk already loaded
0.329 Plugin name launchpad already loaded
0.329 Plugin name netrc_credential_store already loaded
0.380 encoding stdout as sys.stdout encoding 'UTF-8'
0.818 ssh implementation is OpenSSH
32.017 Raising exception with args ('Directory not empty: "/srv/bazaar.launchpad.net/push-branches/00/00/94/67/.bzr/branch/lock/763wtzlxxb.tmp": [Errno 39] Directory not empty',)
32.827 Traceback (most recent call last):
  File "/home/mbp/bzr/progress/bzrlib/commands.py", line 716, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/mbp/bzr/progress/bzrlib/commands.py", line 911, in run_bzr
    ret = run(*run_argv)
  File "/home/mbp/bzr/progress/bzrlib/commands.py", line 547, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/mbp/bzr/progress/bzrlib/builtins.py", line 1033, in run
    use_existing_dir=use_existing_dir)
  File "/home/mbp/bzr/progress/bzrlib/push.py", line 159, in _show_push_branch
    stop_revision=revision_id)
  File "/home/mbp/bzr/progress/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/home/mbp/bzr/progress/bzrlib/branch.py", line 2071, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/home/mbp/bzr/progress/bzrlib/branch.py", line 2755, in _run_with_write_locked_target
    target.lock_write()
  File "/home/mbp/bzr/progress/bzrlib/branch.py", line 1855, in lock_write
    token = self.control_files.lock_write(token=token)
  File "/home/mbp/bzr/progress/bzrlib/lockable_files.py", line 259, in lock_write
    token_from_lock = self._lock.lock_write(token=token)
  File "/home/mbp/bzr/progress/bzrlib/lockdir.py", line 576, in lock_write
    return self.wait_lock()
  File "/home/mbp/bzr/progress/bzrlib/lockdir.py", line 500, in wait_lock
    return self.attempt_lock()
  File "/home/mbp/bzr/progress/bzrlib/lockdir.py", line 461, in attempt_lock
    result = self._attempt_lock()
  File "/home/mbp/bzr/progress/bzrlib/lockdir.py", line 228, in _attempt_lock
    self.transport.rename(tmpname, self._held_dir)
  File "/home/mbp/bzr/progress/bzrlib/transport/sftp.py", line 742, in rename
    ': unable to rename to %r' % (rel_to))
  File "/home/mbp/bzr/progress/bzrlib/transport/sftp.py", line 717, in _translate_io_exception
    raise e
IOError: Directory not empty: "/srv/bazaar.launchpad.net/push-branches/00/00/94/67/.bzr/branch/lock/763wtzlxxb.tmp": [Errno 39] Directory not empty

32.828 return code 3

Related branches

Revision history for this message
Martin Pool (mbp) wrote :

It's actually a bzr bug; we're not translating the paramiko exception correctly

Changed in bzr:
assignee: nobody → mbp
importance: Undecided → Medium
status: New → Fix Committed
Martin Pool (mbp)
Changed in bzr:
milestone: none → 1.16rc1
status: Fix Committed → Fix Released
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.