break-lock throws exception

Asked by Dominic Sayers

I encountered a lock when trying to push some new code this morning. I used break-lock as described in the error message but I got an "unsupported protocol" error. I then tried break-lock as described in previous help messages here (bzr break-lock :push).

Bzr threw an exception. I'm using bzr 1.14.1 on Windows (also tried it in a bash shell with the same result.

Here's the commands I tried and the responses:

D:\Users\Dominic\Web\Repositories\Launchpad\ajaxUnit>bzr push
Using saved push location: bzr+ssh://bazaar.launchpad.net/~dominicsayers/ajaxunit/trunk/
Unable to obtain lock lp-140096483539792:///~dominicsayers/ajaxunit/trunk/.bzr/branch/lock
held by <email address hidden> on host crowberry [process #7168]
locked 94 hours, 11 minutes ago
Will continue to try until 11:20:17, unless you press Ctrl-C
If you're sure that it's not being modified, use bzr break-lock lp-140096483539792:///~dominicsayers/ajaxunit/trunk/.bzr/branch/lock
bzr: ERROR: Could not acquire lock "(remote lock)":

D:\Users\Dominic\Web\Repositories\Launchpad\ajaxUnit>bzr break-lock lp-140096483539792:///~dominicsayers/ajaxunit/trunk/.bzr/branch/
lock
bzr: ERROR: Unsupported protocol for url "lp-140096483539792:///~dominicsayers/ajaxunit/trunk/.bzr/branch/lock"

D:\Users\Dominic\Web\Repositories\Launchpad\ajaxUnit>bzr break-lock :push
bzr: ERROR: exceptions.TypeError: a float is required

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 727, in exception_to_return_code
  File "bzrlib\commands.pyo", line 922, in run_bzr
  File "bzrlib\commands.pyo", line 559, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 4475, in run
  File "bzrlib\remote.pyo", line 135, in break_lock
  File "bzrlib\bzrdir.pyo", line 122, in break_lock
  File "bzrlib\remote.pyo", line 2192, in break_lock
  File "bzrlib\branch.pyo", line 115, in break_lock
  File "bzrlib\lockable_files.pyo", line 140, in break_lock
  File "bzrlib\lockdir.pyo", line 343, in break_lock
  File "bzrlib\ui\__init__.pyo", line 162, in get_boolean
  File "bzrlib\ui\__init__.pyo", line 221, in prompt
TypeError: a float is required

bzr 1.14.1 on python 2.5.2 (win32)
arguments: ['bzr', 'break-lock', ':push']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.14]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [unknown]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [unknown]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.9.9]
  svn C:\Program Files\Bazaar\plugins\svn [0.5.4]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
Jonathan Lange Edit question
Solved by:
Dominic Sayers
Solved:
Last query:
Last reply:
Whiteboard:
Assigning to jml, perhaps he can help a bit more. 20090616 danilo
Revision history for this message
Eleanor Berger (intellectronica) said :
#1

Bzr is giving you the wrong URL. If you change the protocol portion of the URL to bzr+ssh it should work fine.

Revision history for this message
Dominic Sayers (dominicsayers) said :
#2

Hi Tom, thanks for your time in suggesting an answer to my problem. I think I understood your suggestion. Here's the message I'm getting now (I've appended an ssh -v so it is clear there are no actual connectivity problems):

D:\Users\Dominic\Web\Repositories\Launchpad\ajaxUnit>bzr break-lock bzr+ssh:///~dominicsayers/ajaxunit/trunk/.bzr/branch/lock
ssh: connect to host port 22: Bad file number0KB/s |
bzr: ERROR: Connection closed: please check connectivity and permissions

D:\Users\Dominic\Web\Repositories\Launchpad\ajaxUnit>ssh -v <email address hidden>
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to bazaar.launchpad.net [91.189.90.11] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Dominic/.ssh/identity type -1
debug1: identity file /c/Users/Dominic/.ssh/id_rsa type 1
debug1: identity file /c/Users/Dominic/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version Twisted
debug1: no match: Twisted
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host 'bazaar.launchpad.net' is known and matches the RSA host key.
debug1: Found key in /c/Users/Dominic/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/Dominic/.ssh/identity
debug1: Offering public key: /c/Users/Dominic/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
No shells on this server.
debug1: channel 0: free: client-session, nchannels 1
Connection to bazaar.launchpad.net closed.
debug1: Transferred: stdin 0, stdout 0, stderr 44 bytes in 0.3 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 151.7
debug1: Exit status -1

Revision history for this message
Eleanor Berger (intellectronica) said :
#3

Hi Dominic,

From your paste it looks like you don't specify Launchpad as the host.

bzr+ssh:///~dominicsayers/ajaxunit/trunk/.bzr/branch/lock should be something like bzr+ssh:///bazaar.launchpad.net/~dominicsayers/ajaxunit/trunk/.bzr/branch/lock

Revision history for this message
Dominic Sayers (dominicsayers) said :
#4

TOm, thanks for your continued help with this. I think the correct syntax must be:

bzr break-lock bzr+ssh://bazaar.launchpad.net/~dominicsayers/ajaxunit/trunk/.bzr/branch/lock

(two slashes rather than three before the host name)

However I now have the same problem that caused the stray lock in the first place: bzr just sits there showing no progress:

[- ] bzr+ssh > 0KB 0KB/s |

(no change for the last hour)

Revision history for this message
Dominic Sayers (dominicsayers) said :
#5

Update: eventually bzr gave up. So I tried again and got a bit further. This is the current status:

D:\Users\Dominic\Web\Repositories\Launchpad\ajaxUnit>bzr break-lock bzr+ssh://bazaar.launchpad.net/~dominicsayers/ajaxunit/trunk/.bzr/branch/lock
Connection to bazaar.launchpad.net closed by remote host.
Connection to bazaar.launchpad.net closed by remote host.
bzr: ERROR: Connection closed: please check connectivity and permissions

D:\Users\Dominic\Web\Repositories\Launchpad\ajaxUnit>bzr break-lock bzr+ssh://bazaar.launchpad.net/~dominicsayers/ajaxunit/trunk/.bzr/branch/lock
Break lock bzr+ssh://bazaar.launchpad.net/%7Edominicsayers/ajaxunit/trunk/.bzr/branch/lock
held by <email address hidden> on host crowberry [process #7168]
locked 191 hours, 3 minutes ago? [y/n]: y
[| ] bzr+ssh < 3KB 0KB/s |

(no change for an hour)

Revision history for this message
Dominic Sayers (dominicsayers) said :
#6

Update: eventually bzr gave up again. Tried break-lock for a third time and I didn't get an error message but nor did I get any confirmation of success:

D:\Users\Dominic\Web\Repositories\Launchpad\ajaxUnit>bzr break-lock bzr+ssh://bazaar.launchpad.net/~dominicsayers/ajaxunit/trunk/.bzr/branch/lock
[\ ] bzr+ssh < 1KB 3KB/s |

Retrying the original push but bzr has just frozen again:

D:\Users\Dominic\Web\Repositories\Launchpad\ajaxUnit>bzr push
Using saved push location: bzr+ssh://bazaar.launchpad.net/~dominicsayers/ajaxunit/trunk/
[- ] bzr+ssh > 0KB 0KB/s |

(no change for an hour)

Revision history for this message
Dominic Sayers (dominicsayers) said :
#7

Update: timed out again. Tried bzr push again. Worked.

So my only remaining issue is with the timeouts. If it happens again I'll raise a separate ticket since this one is now effectively solved.

Thanks for all Tom's help and anybody else who investigated.