bzr based snap builds with "base: core20" fail

Bug #1876948 reported by Michael Vogt
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Jelmer Vernooij

Bug Description

I tried to build a bzr repo "test-snapd-sh-core20" snap today that uses "base: core20".

When trying this I got a crash from bzr during the build, the full build log is here:

The crash is:
Running repo phase...
brz: ERROR: AttributeError: can't set attribute

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/", line 1016, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/", line 1202, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python3/dist-packages/breezy/", line 759, in run_argv_aliases
  File "/usr/lib/python3/dist-packages/breezy/", line 784, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/", line 136, in run_simple
    return _do_with_cleanups(
  File "/usr/lib/python3/dist-packages/breezy/", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/", line 1465, in run
    accelerator_tree, br_from = controldir.ControlDir.open_tree_or_branch(
  File "/usr/lib/python3/dist-packages/breezy/", line 799, in open_tree_or_branch
    controldir =
  File "/usr/lib/python3/dist-packages/breezy/", line 705, in open
    t = _mod_transport.get_transport(base, possible_transports)
  File "/usr/lib/python3/dist-packages/breezy/transport/", line 1573, in get_transport
    _mod_location.location_to_url(base, purpose=purpose),
  File "/usr/lib/python3/dist-packages/breezy/", line 61, in location_to_url
    location = directories.dereference(location, purpose)
  File "/usr/lib/python3/dist-packages/breezy/", line 89, in dereference
    return directory.look_up(name, url, purpose=purpose)
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/", line 122, in look_up
    return self._resolve(url)
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/", line 178, in _resolve
    result = self._resolve_via_xmlrpc(path, url, _request_factory)
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/", line 154, in _resolve_via_xmlrpc
    result = resolve.submit(service)
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/", line 244, in submit
    return service.send_request(self._methodname, self._request_params())
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/", line 173, in send_request
    result = method(*method_params)
  File "/usr/lib/python3.8/xmlrpc/", line 1109, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.8/xmlrpc/", line 1450, in __request
    response = self.__transport.request(
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/", line 100, in request
    response =
  File "/usr/lib/python3.8/urllib/", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.8/urllib/", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.8/urllib/", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 942, in https_open
    connect = _ConnectRequest(request)
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 583, in __init__
    Request.__init__(self, 'CONNECT', request.get_full_url(),
  File "/usr/lib/python3/dist-packages/breezy/transport/http/", line 528, in __init__
  File "/usr/lib/python3.8/urllib/", line 328, in __init__
    self.full_url = url
  File "/usr/lib/python3.8/urllib/", line 354, in full_url
  File "/usr/lib/python3.8/urllib/", line 384, in _parse, self.selector = _splithost(rest)
AttributeError: can't set attribute

brz 3.0.2 on python 3.8.2 (Linux-4.4.0-178-generic-s390x-with-glibc2.29)
arguments: ['/usr/bin/bzr', 'branch', 'lp:~snappy-dev/snappy-hub/test-snapd-
    sh-core20', 'test-snapd-sh-core20']
plugins: bash_completion[3.0.2], changelog_merge[3.0.2],
    commitfromnews[3.0.2], cvs[3.0.2], darcs[3.0.2], email[3.0.2],
    fastimport[3.0.2], launchpad[3.0.2], mtn[3.0.2],
    netrc_credential_store[3.0.2], news_merge[3.0.2], po_merge[3.0.2],
    propose[3.0.2], repodebug[3.0.2], stats[3.0.2], upload[3.0.2],
encoding: 'utf-8', fsenc: 'utf-8', lang: 'C.UTF-8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
    including this traceback and a description of the problem.
Build failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/", line 256, in run
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/", line 175, in repo
    self.vcs_fetch(, cwd="/build", env=env)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/", line 94, in vcs_fetch, cwd=cwd, env=full_env)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/", line 537, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python2.7/", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['lxc', 'exec', 'lp-focal-s390x', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'http_proxy=', '--env', 'https_proxy=', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy', '--', '/bin/sh', '-c', "cd /build && linux64 bzr branch 'lp:~snappy-dev/snappy-hub/test-snapd-sh-core20' test-snapd-sh-core20"]' returned non-zero exit status 4
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=focal --arch=s390x SNAPBUILD-940030
Scanning for processes to kill in build SNAPBUILD-940030

I worked around it by just using git but I wanted to report it as a low priority issue.

Revision history for this message
JL (blablup007) wrote :

Most properbly it is about the proxy setting. I have the same issue, but if I do it without environment vars "http_proxy" and "https_proxy" it does work.

Revision history for this message
Colin Watson (cjwatson) wrote :

This seems like a breezy bug - I'm not sure there's much we can do about it in Launchpad itself. As far as I can see, urllib.request.Request tries to set self.selector, but breezy.transport.http._ConnectRequest defines selector as a read-only property. Jelmer, does this seem familiar?

affects: launchpad → brz
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Yes, this seems familiar - it's fixed in newer versions of Breezy. Unfortunately I don't have the bug # here, but a more recent Breezy release should address this.

Changed in brz:
status: New → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :
Download full text (4.4 KiB)

Sorry, but this is still reproducible with current Breezy trunk, r7521. Trying to reproduce it against Launchpad runs into other problems which I need to look into, but here's a reproducer with a random branch I had lying around on my home network, and assuming that you have a CONNECT-capable proxy on port 3128:

$ https_proxy=http://localhost:3128/ BRZ_PLUGIN_PATH=-site:-user ./brz info
brz: ERROR: AttributeError: can't set attribute

Traceback (most recent call last):
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 1017, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 1206, in run_bzr
    ret = run(*run_argv)
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 757, in run_argv_aliases
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 782, in run
    return class_run(*args, **kwargs)
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 1223, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 1913, in run
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 771, in open_containing
    return klass.open_containing_from_transport(transport)
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 792, in open_containing_from_transport
    result = klass.open_from_transport(a_transport)
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 754, in open_from_transport
    transport, format = _mod_transport.do_catching_redirections(
  File "/home/cjwatson/src/bzr/brz/brz/breezy/transport/", line 1613, in do_catching_redirections
    return action(transport)
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 742, in find_format
    return transport, ControlDirFormat.find_format(transport,
  File "/home/cjwatson/src/bzr/brz/brz/breezy/", line 1165, in find_format
    return prober.probe_transport(transport)
  File "/home/cjwatson/src/bzr/brz/brz/breezy/bzr/", line 111, in probe_transport
    server_version = medium.protocol_version()
  File "/home/cjwatson/src/bzr/brz/brz/breezy/bzr/smart/", line 829, in protocol_version
  File "/home/cjwatson/src/bzr/brz/brz/breezy/bzr/smart/", line 797, in query_version'hello')
  File "/home/cjwatson/src/bzr/brz/brz/breezy/bzr/smart/", line 635, in call
  File "/home/cjwatson/src/bzr/brz/brz/breezy/bzr/smart/", line 611, in finished_writing
  File "/home/cjwatson/src/bzr/brz/brz/breezy/transport/http/", line 2533, in _finished_writing
    data = self._medium.send_http_smart_request(self._buffer)
  File "/home/cjwatson/src/bzr/brz/brz/breezy/transport/http/", line 2498, in send_http_smart_request
    code, body_filelike = t._post(bytes)
  File "/home/cjwatson/src/bzr/brz...


Jelmer Vernooij (jelmer)
Changed in brz:
status: Fix Released → Triaged
importance: Undecided → Critical
assignee: nobody → Jelmer Vernooij (jelmer)
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.