Generic bzr smart protocol error: bad request '232' when connecting to bzr 1.0 smart server

Bug #185394 reported by Elliot Murphy
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Critical
Andrew Bennetts
Nominated for 1.2 by Marius Kruger

Bug Description

I am using bzr.dev, trying to pull over bzr+ssh from a machine with bzr 1.0 installed, and get a 'bad request' error. bzr missing works fine.

Here is the .bzr.log:
0.100 bzr arguments: [u'missing']
0.100 looking for plugins in /home/emurphy/.bazaar/plugins
0.207 looking for plugins in /home/emurphy/src/bzr.dev/bzrlib/plugins
0.207 Plugin name __init__ already loaded
0.207 Plugin name __init__ already loaded
0.213 encoding stdout as sys.stdout encoding 'UTF-8'
0.301 ssh implementation is OpenSSH
56.492 return code 1

0.099 bzr arguments: [u'pull']
0.099 looking for plugins in /home/emurphy/.bazaar/plugins
0.206 looking for plugins in /home/emurphy/src/bzr.dev/bzrlib/plugins
0.207 Plugin name __init__ already loaded
0.207 Plugin name __init__ already loaded
0.211 encoding stdout as sys.stdout encoding 'UTF-8'
0.245 opening working tree '/home/emurphy/canonical/lp-branches/trunk'
0.301 ssh implementation is OpenSSH
5.030 Using fetch logic to copy between RemoteRepository(bzr+ssh://devpad.canonical.com/code/rocketfuel/launchpad/.bzr/)(remote) and KnitPackRepository('file:///home/emurphy/canonical/lp-branches/.bzr/repository/')(<RepositoryFormatKnitPack1>)
5.031 fetch up to rev {<email address hidden>}
14.868 Traceback (most recent call last):
  File "/home/emurphy/src/bzr.dev/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/emurphy/src/bzr.dev/bzrlib/commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "/home/emurphy/src/bzr.dev/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/emurphy/src/bzr.dev/bzrlib/builtins.py", line 646, in run
    possible_transports=possible_transports)
  File "/home/emurphy/src/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/emurphy/src/bzr.dev/bzrlib/workingtree.py", line 1566, in pull
    possible_transports=possible_transports)
  File "/home/emurphy/src/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/emurphy/src/bzr.dev/bzrlib/branch.py", line 1731, in pull
    run_hooks=run_hooks)
  File "/home/emurphy/src/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/emurphy/src/bzr.dev/bzrlib/branch.py", line 1530, in pull
    self.update_revisions(source, stop_revision, overwrite=overwrite)
  File "/home/emurphy/src/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/emurphy/src/bzr.dev/bzrlib/branch.py", line 1482, in update_revisions
    self.fetch(other, stop_revision)
  File "/home/emurphy/src/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/emurphy/src/bzr.dev/bzrlib/branch.py", line 286, in fetch
    pb=nested_pb)
  File "/home/emurphy/src/bzr.dev/bzrlib/repository.py", line 951, in fetch
    return inter.fetch(revision_id=revision_id, pb=pb, find_ghosts=find_ghosts)
  File "/home/emurphy/src/bzr.dev/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/home/emurphy/src/bzr.dev/bzrlib/repository.py", line 2933, in fetch
    pb=pb, find_ghosts=find_ghosts)
  File "/home/emurphy/src/bzr.dev/bzrlib/fetch.py", line 109, in __init__
    self.__fetch()
  File "/home/emurphy/src/bzr.dev/bzrlib/fetch.py", line 139, in __fetch
    self._fetch_everything_for_search(search, pp)
  File "/home/emurphy/src/bzr.dev/bzrlib/fetch.py", line 418, in _fetch_everything_for_search
    self.to_repository.insert_data_stream(data_stream)
  File "/home/emurphy/src/bzr.dev/bzrlib/repository.py", line 832, in insert_data_stream
    for item_key, bytes in stream:
  File "/home/emurphy/src/bzr.dev/bzrlib/repofmt/knitrepo.py", line 174, in get_data_stream_for_search
    for knit_kind, file_id, versions in item_keys:
  File "/home/emurphy/src/bzr.dev/bzrlib/repository.py", line 1453, in item_keys_introduced_by
    inv_w = self.get_inventory_weave()
  File "/home/emurphy/src/bzr.dev/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/home/emurphy/src/bzr.dev/bzrlib/repository.py", line 1492, in get_inventory_weave
    self.get_transaction())
  File "/home/emurphy/src/bzr.dev/bzrlib/store/versioned/__init__.py", line 150, in get_weave
    **self._versionedfile_kwargs)
  File "/home/emurphy/src/bzr.dev/bzrlib/knit.py", line 481, in __init__
    dir_mode=dir_mode)
  File "/home/emurphy/src/bzr.dev/bzrlib/knit.py", line 1369, in __init__
    fp = self._transport.get(self._filename)
  File "/home/emurphy/src/bzr.dev/bzrlib/transport/remote.py", line 184, in get
    return StringIO(self.get_bytes(relpath))
  File "/home/emurphy/src/bzr.dev/bzrlib/transport/remote.py", line 194, in get_bytes
    self._translate_error(resp, relpath)
  File "/home/emurphy/src/bzr.dev/bzrlib/transport/remote.py", line 364, in _translate_error
    raise errors.SmartProtocolError(unicode(resp[1]))
SmartProtocolError: Generic bzr smart protocol error: Generic bzr smart protocol error: bad request '232'

24.174 return code 3

Also, here is my bzr version info:
Bazaar (bzr) 1.2.0.dev.0
  from bzr checkout /home/emurphy/src/bzr.dev
    revision: 3198
    revid: <email address hidden>
    branch nick: bzr.dev
  Python interpreter: /usr/bin/python 2.5.2.alpha.0
  Python standard library: /usr/lib/python2.5
  bzrlib: /home/emurphy/src/bzr.dev/bzrlib
  Bazaar configuration: /home/emurphy/.bazaar
  Bazaar log file: /home/emurphy/.bzr.log

results of lsb_release -a
LSB Version: core-2.0-noarch:core-3.0-noarch:core-3.1-noarch:core-2.0-amd64:core-3.0-amd64:core-3.1-amd64:cxx-2.0-noarch:cxx-3.0-noarch:cxx-3.1-noarch:cxx-2.0-amd64:cxx-3.0-amd64:cxx-3.1-amd64:desktop-3.1-noarch:desktop-3.1-amd64:graphics-2.0-noarch:graphics-3.0-noarch:graphics-3.1-noarch:graphics-2.0-amd64:graphics-3.0-amd64:graphics-3.1-amd64
Distributor ID: Ubuntu
Description: Ubuntu hardy (development branch)
Release: 8.04
Codename: hardy

Also, here is the bzr version info from the remote machine:
Bazaar (bzr) 1.0.0
  Python interpreter: /usr/bin/python 2.4.3.final.0
  Python standard library: /usr/lib/python2.4
  bzrlib: /usr/lib/python2.4/site-packages/bzrlib
  Bazaar configuration: /home/emurphy/.bazaar
  Bazaar log file: /home/emurphy/.bzr.log
results of lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 6.06.1 LTS
Release: 6.06
Codename: dapper

Tags: hpss

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :

known interoperability problem with bzr.dev and 1.0/1.1 servers: the server cannot tell that a body is following an unknown verb.

Changed in bzr:
assignee: nobody → spiv
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Marius Kruger (amanica) wrote : Re: Generic bzr smart protocol error: bad request '70' when connecting to bzr 0.90.0 smart server

hi,
as I noted on the list, I get a similar error when conecting from bzr.dev to bzr.0.90.0 over bzr://
This has been happening for about a week (I'm not exactly sure when I updated my bzr.dev).

$ bzr co bzr://some_server/some_branch/
bzr: ERROR: Generic bzr smart protocol error: Generic bzr smart protocol error: bad request '70'
$ cd some_branch/
$ bzr st
bzr: ERROR: No WorkingTree exists for "file:///some_branch/.bzr/checkout/".
$ bzr checkout
$ bzr st
$ bzr update
bzr: ERROR: Generic bzr smart protocol error: Generic bzr smart protocol error: bad request '70'
/stuph/projects/bzr/bzr.repo/bzr.dev/bzrlib/lockable_files.py:110: UserWarning: file group LockableFiles(<bzrlib.transport.remote.RemoteTCPTransport url=bzr://some_server/.bzr/repository/>) was not explicitly unlocked
  warn("file group %r was not explicitly unlocked" % self)

let me know if you need more information / debugging / help fixing it,
as I can quite reliably reproduce it at the moment.

regards
marius

Revision history for this message
John A Meinel (jameinel) wrote :

I just wanted to comment that this currently breaks stuff like "bzr checkout lp:bzr" because lp is using bzr~1.0.0. I thought Andrew had a patch for this already (to at least close the connection if you sent an unknown request which has a body). The other solution for that is to just upgrade LP.

Revision history for this message
Marius Kruger (amanica) wrote : Re: [Bug 185394] Re: Generic bzr smart protocol error: bad request '232' when connecting to bzr 1.0 smart server

On Jan 30, 2008 12:09 AM, John A Meinel <email address hidden> wrote:

> I just wanted to comment that this currently breaks stuff like "bzr
> checkout lp:bzr" because lp is using bzr~1.0.0. I thought Andrew had a
> patch for this already (to at least close the connection if you sent an
> unknown request which has a body).

I thought that his patch would help too. But after updating to the latest
bzr.dev
and even trying
http://bundlebuggy.aaronbentley.com/request/%<email address hidden>%3E
which seems related, it still does not work.
(I dont know of any other patches)

> The other solution for that is to
> just upgrade LP.
>

I view it as a regression, and would really like it to be fixed before the
next release.

Revision history for this message
Andrew Bennetts (spiv) wrote :

I have a fix for this in <https://code.launchpad.net/~spiv/bzr/request-body-recovery>. I've submitted it to the list for review, and it should land in 1.2.

Changed in bzr:
milestone: none → 1.2
status: In Progress → Fix Committed
Revision history for this message
Andrew Bennetts (spiv) wrote :

Landed in bzr.dev r3220, <email address hidden>. Will be in 1.2rc1.

Changed in bzr:
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.