bazaar commit crashes when network is down

Bug #1449400 reported by Iago
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

I got this error when I tried to commit to a bazaar repository having no network connection.

$ bzr commit -m snapshot
ssh: Could not resolve hostname XXX.XXX.XXX: Name or service not known
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
ssh: Could not resolve hostname XXX.XXX.XXX: Name or service not known
bzr: ERROR: bzrlib.errors.TooManyConcurrentRequests: The medium 'SmartSSHClientMedium(bzr+ssh://<email address hidden>/)' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the currently open request.

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 3687, in run
    lossy=lossy)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 218, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 218, in commit
    result = WorkingTree.commit(self, message, revprops, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 218, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 211, in commit
    *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commit.py", line 290, in commit
    lossy=lossy)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 132, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commit.py", line 364, in _commit
    self._check_bound_branch(operation, possible_master_transports)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commit.py", line 542, in _check_bound_branch
    possible_master_transports)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 155, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/branch.py", line 2605, in get_master_branch
    possible_transports)
  File "/usr/lib/python2.7/dist-packages/bzrlib/branch.py", line 2614, in _get_master_branch
    possible_transports=possible_transports)
  File "/usr/lib/python2.7/dist-packages/bzrlib/branch.py", line 186, in open
    possible_transports=possible_transports, _unsupported=_unsupported)
  File "/usr/lib/python2.7/dist-packages/bzrlib/controldir.py", line 689, in open
    _unsupported=_unsupported)
  File "/usr/lib/python2.7/dist-packages/bzrlib/controldir.py", line 723, in open_from_transport
    return format.open(transport, _found=True)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 1486, in open
    return self._open(transport)
  File "/usr/lib/python2.7/dist-packages/bzrlib/remote.py", line 317, in _open
    return RemoteBzrDir(transport, self)
  File "/usr/lib/python2.7/dist-packages/bzrlib/remote.py", line 436, in __init__
    self._probe_bzrdir()
  File "/usr/lib/python2.7/dist-packages/bzrlib/remote.py", line 448, in _probe_bzrdir
    self._rpc_open_2_1(path)
  File "/usr/lib/python2.7/dist-packages/bzrlib/remote.py", line 455, in _rpc_open_2_1
    response = self._call('BzrDir.open_2.1', path)
  File "/usr/lib/python2.7/dist-packages/bzrlib/remote.py", line 73, in _call
    return self._client.call(method, *args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 59, in call
    result, protocol = self.call_expecting_body(method, *args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 72, in call_expecting_body
    method, args, expect_response_body=True)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 55, in _call_and_read_response
    return request.call_and_read_response()
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 155, in call_and_read_response
    return self._call_determining_protocol_version()
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 218, in _call_determining_protocol_version
    response_tuple, response_handler = self._call(protocol_version)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 189, in _call
    response_handler = self._send(protocol_version)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 265, in _send
    encoder, response_handler = self._construct_protocol(protocol_version)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/client.py", line 241, in _construct_protocol
    request = self.client._medium.get_request()
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/medium.py", line 884, in get_request
    return SmartClientStreamMediumRequest(self)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/medium.py", line 1167, in __init__
    raise errors.TooManyConcurrentRequests(self._medium)
TooManyConcurrentRequests: The medium 'SmartSSHClientMedium(bzr+ssh://<email address hidden>/)' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the currently open request.

bzr 2.7.0dev1 on python 2.7.6 (Linux-3.16.0-30-generic-x86_64-with-
    Ubuntu-14.04-trusty)
arguments: ['/usr/bin/bzr', 'commit', '-m', 'snapshot']
plugins: bash_completion[2.7.0dev1], changelog_merge[2.7.0dev1],
    etckeeper[unknown], grep[2.7.0dev1], launchpad[2.7.0dev1],
    netrc_credential_store[2.7.0dev1], news_merge[2.7.0dev1],
    po_merge[2.7.0dev1], weave_fmt[2.7.0dev1]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8

Revision history for this message
Geoff Bache (geoff.bache) wrote :

Just ran into this also, when authentication to Launchpad failed because I forgot to start Pageant. In this case I didn't even get any clues about not being able to find the host.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.