bzr: ERROR: Server sent an unexpected error: ('error', "invalid literal for int() with base 10: 'None'")

Bug #397452 reported by Pyromaths
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazitis
Fix Released
Critical
David Caro

Bug Description

I've installed bazitis on a open-bsd server with bzr 1.13.1. I've followed the instructions from www.vimtips.org. I've added my ssh key with sudo -H -u bzr bazitis-init < /tmp/id_rsa.pub and I've been able to have bazitis-admin on my client (Ubuntu 9.04, bzr 1.13.1). When I make any modification, commit it and try to push the result, I have the following answer :
bzr push bzr+ssh://<email address hidden>/bazitis-admin
bzr: ERROR: bzrlib.errors.ErrorFromSmartServer: Error received from smart server: ('error', "invalid literal for int() with base 10: 'None'")

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 716, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 911, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 547, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 1033, in run
    use_existing_dir=use_existing_dir)
  File "/usr/lib/python2.6/dist-packages/bzrlib/push.py", line 159, in _show_push_branch
    stop_revision=revision_id)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2071, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2757, in _run_with_write_locked_target
    result = callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2110, in _push_with_bound_branches
    result = self._basic_push(target, overwrite, stop_revision)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2133, in _basic_push
    graph=graph)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 725, in update_revisions
    overwrite, graph)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2828, in update_revisions
    self.target.fetch(self.source, stop_revision)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 495, in fetch
    pb=nested_pb)
  File "/usr/lib/python2.6/dist-packages/bzrlib/remote.py", line 1126, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 3414, in fetch
    pb, find_ghosts, fetch_spec=fetch_spec)
  File "/usr/lib/python2.6/dist-packages/bzrlib/fetch.py", line 103, in __init__
    self.__fetch()
  File "/usr/lib/python2.6/dist-packages/bzrlib/fetch.py", line 130, in __fetch
    self._fetch_everything_for_search(search, pp)
  File "/usr/lib/python2.6/dist-packages/bzrlib/fetch.py", line 156, in _fetch_everything_for_search
    stream, from_format, [])
  File "/usr/lib/python2.6/dist-packages/bzrlib/remote.py", line 1552, in insert_stream
    ('Repository.insert_stream', path, resume_tokens), byte_stream)
  File "/usr/lib/python2.6/dist-packages/bzrlib/smart/client.py", line 178, in call_with_body_stream
    expect_response_body=False)
  File "/usr/lib/python2.6/dist-packages/bzrlib/smart/client.py", line 78, in _call_and_read_response
    expect_body=expect_response_body),
  File "/usr/lib/python2.6/dist-packages/bzrlib/smart/message.py", line 304, in read_response_tuple
    _translate_error(self.args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/smart/message.py", line 355, in _translate_error
    raise errors.ErrorFromSmartServer(error_tuple)
ErrorFromSmartServer: Error received from smart server: ('error', "invalid literal for int() with base 10: 'None'")

bzr 1.13.1 on python 2.6.2 (linux2)
arguments: ['/usr/bin/bzr', 'push', 'bzr+ssh://<email address hidden>/bazitis-admin']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'fr_FR.UTF-8'
plugins:
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [unknown]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [unknown]
*** 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.

On the server /var/bzr/.bzr.log, there is this strange information :
bzr arguments: [u'serve', u'--inet', u'--directory=/sd-5497', u'--allow-writes']
where sd-5497 is my user name. I've attached this file.

Thanks for your help.
Jérôme

Related branches

Revision history for this message
Pyromaths (jerome-ortais) wrote :
Revision history for this message
dknell (dk45) wrote :

This same error happens on all versions of Bazaar later that 1.6.1. I sent an email to the developer but have not heard back. Has anyone found a fix for this???

Revision history for this message
David Caro (dcaro) wrote :

Sorry for the delay, but I'm just starting to maintain this project.

@Jérôme: This is only happenning on open-bsd? Can you please try with the latest bazaar version?

@dknell: Can you please try it on the latest bazaar version too?

Thanks

Changed in bazitis:
status: New → Incomplete
assignee: nobody → David Caro (dcaro)
Revision history for this message
Pyromaths (jerome-ortais) wrote :

Hi David,
I' won't be able to help you, as I've switched to git.
Best regards.

Revision history for this message
David Caro (dcaro) wrote :

Hi Jérôme,
no problem, the bug is also very old anyway.

Thanks for answering

Revision history for this message
David Caro (dcaro) wrote :
Download full text (3.2 KiB)

I've been able to reproduce this error on a Ubunu Server 11.04 machine, the error stack trace on the server is:

sáb 2012-06-02 22:19:34 +0200
0.035 bazaar version: 2.3.4
0.035 bzr arguments: [u'serve', u'--inet', u'--directory=/cascara@prometeus', u'--allow-writes']
0.049 looking for plugins in /home/bzr/.bazaar/plugins
0.075 looking for plugins in /usr/lib/python2.7/dist-packages/bzrlib/plugins
0.088 encoding stdout as osutils.get_user_encoding() 'UTF-8'
1.323 Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/request.py", line 355, in _call_converting_errors
    return callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/repository.py", line 760, in _inserter_thread
    stream, src_format, self.tokens)
  File "/usr/lib/python2.7/dist-packages/bzrlib/repository.py", line 4101, in insert_stream
    hint = self.target_repo.commit_write_group()
  File "/usr/lib/python2.7/dist-packages/bzrlib/repository.py", line 1636, in commit_write_group
    result = self._commit_write_group()
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 2333, in _commit_write_group
    hint = self._pack_collection._commit_write_group()
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 2197, in _commit_write_group
    return self._save_pack_names()
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 2009, in _save_pack_names
    self._syncronize_pack_names_from_disk_nodes(disk_nodes)
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 1950, in _syncronize_pack_names_from_disk_nodes
    sizes = self._parse_index_sizes(value)
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 1678, in _parse_index_sizes
    return tuple([int(digits) for digits in value.split(' ')])
ValueError: invalid literal for int() with base 10: 'None'

1.446 Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/request.py", line 355, in _call_converting_errors
    return callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/request.py", line 140, in execute
    return self.do(*args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/branch.py", line 52, in do
    return self.do_with_branch(branch, *args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/smart/branch.py", line 344, in do_with_branch
    branch.repository.lock_write(token=repo_token)
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 2384, in lock_write
    self._refresh_data()
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 2327, in _refresh_data
    self._pack_collection.reload_pack_names()
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 2035, in reload_pack_names
    first_read = self.ensure_loaded()
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 1667, in ensure_loaded
    self._names[name] = self._parse_index_sizes(value)
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 1678, in _parse_index_sizes
    return tuple([int(digits) for digits in va...

Read more...

Changed in bazitis:
status: Incomplete → Confirmed
Revision history for this message
David Caro (dcaro) wrote :

I submitted a branch to the bzr code that fixes this.... I hope that it does not break somethin else.

I made some tests (create a repo, push, branch, merge) and found no more issues.

The bzr bug report is here: lp:1008223

I will close this one when that one is closed.

Revision history for this message
David Caro (dcaro) wrote :

I know what's failing, and I will reimplement most of the code to avoid this. I need to get a little more experience with bzrlib internals to get this working. I'm keepeing this bug open until the changes are made (one or two weeks at much).

Thanks!

David Caro (dcaro)
Changed in bazitis:
status: Confirmed → Fix Released
importance: Undecided → Critical
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.