bzr-search errors when indexing stacked branches

Bug #388020 reported by Martin Albisetti on 2009-06-16
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr search plugin
High
Unassigned

Bug Description

When pushing to 1.16rc1 server from 1.14.1 (OSX), even though the push seems to complete, I get the following traceback:

Tue 2009-06-16 14:21:41 -0300
0.040 bzr arguments: [u'push']
0.064 looking for plugins in /Users/lisandromartinezbasabilvaso/.bazaar/plugins
0.064 looking for plugins in /Library/Python/2.5/site-packages/bzrlib/plugins
0.249 encoding stdout as osutils.get_user_encoding() 'ascii'
0.414 ssh implementation is OpenSSH
4.660 Using fetch logic to copy between CHKInventoryRepository('file:///Users/lisandromartinezbasabilvaso/Sites/activa2000/.bzr/repository/')(<RepositoryFormatCHK1>) and RemoteRepository(bzr+ssh://<email address hidden>:1122/var/www/private/activa2000/.bzr/)(<RemoteRepositoryFormat>)
4.661 fetch up to rev {<email address hidden>}
11.333 Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 727, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 922, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 559, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.5/site-packages/bzrlib/builtins.py", line 1055, in run
    use_existing_dir=use_existing_dir)
  File "/Library/Python/2.5/site-packages/bzrlib/push.py", line 146, in _show_push_branch
    remember)
  File "/Library/Python/2.5/site-packages/bzrlib/bzrdir.py", line 1241, in push_branch
    overwrite, stop_revision=revision_id)
  File "/Library/Python/2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/branch.py", line 2120, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/Library/Python/2.5/site-packages/bzrlib/branch.py", line 2767, in _run_with_write_locked_target
    result = callable(*args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/branch.py", line 2159, in _push_with_bound_branches
    result = self._basic_push(target, overwrite, stop_revision)
  File "/Library/Python/2.5/site-packages/bzrlib/branch.py", line 2182, in _basic_push
    graph=graph)
  File "/Library/Python/2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/branch.py", line 776, in update_revisions
    overwrite, graph)
  File "/Library/Python/2.5/site-packages/bzrlib/branch.py", line 2856, in update_revisions
    self.target.set_last_revision_info(stop_revno, stop_revision)
  File "/Library/Python/2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/remote.py", line 2349, in set_last_revision_info
    str(revno), revision_id)
  File "/Library/Python/2.5/site-packages/bzrlib/remote.py", line 57, in _call
    self._translate_error(err, **err_context)
  File "/Library/Python/2.5/site-packages/bzrlib/remote.py", line 2009, in _translate_error
    self.repository._translate_error(err, branch=self, **context)
  File "/Library/Python/2.5/site-packages/bzrlib/remote.py", line 688, in _translate_error
    self.bzrdir._translate_error(err, repository=self, **context)
  File "/Library/Python/2.5/site-packages/bzrlib/remote.py", line 129, in _translate_error
    _translate_error(err, bzrdir=self, **context)
  File "/Library/Python/2.5/site-packages/bzrlib/remote.py", line 2559, in _translate_error
    raise errors.UnknownErrorFromSmartServer(err)
UnknownErrorFromSmartServer: Server sent an unexpected error: ('error', "'smeinardo@pentaserv-20090605170656-x0kas6gjdw5ev1wl'")

Also happens when pushing 1.16rc1 to 1.16rc1, with this traceback (note the KeyError):

5.357 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/request.py", line 323, in _call_converting_errors
    return callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/request.py", line 132, in execute
    return self.do(*args)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/branch.py", line 49, in do
    return self.do_with_branch(branch, *args)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/branch.py", line 69, in do_with_branch
    return self.do_with_locked_branch(branch, *args)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/branch.py", line 143, in do_with_locked_branch
    return self.do_tip_change_with_locked_branch(branch, *args)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/branch.py", line 233, in do_tip_change_with_locked_branch
    branch.set_last_revision_info(int(new_revno), new_last_revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 2419, in set_last_revision_info
    self._run_post_change_branch_tip_hooks(old_revno, old_revid)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 988, in _run_post_change_branch_tip_hooks
    hook(params)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/search/__init__.py", line 59, in auto_index_branch
    search_index.index_branch(result.branch, result.new_revid)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/search/index.py", line 320, in index_branch
    self.index_revisions(branch, revs_to_index)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/search/index.py", line 335, in index_revisions
    outer_bar)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/search/index.py", line 374, in _index_revisions
    locked_branch.repository, terms, order_dict)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/search/index.py", line 701, in _terms_for_file_terms
    order.sort(key=lambda revid:order_dict[revid])
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/search/index.py", line 701, in <lambda>
    order.sort(key=lambda revid:order_dict[revid])
KeyError: 'smeinardo@pentaserv-20090612145747-5228o2i4av5mjksk'

5.703 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 729, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 924, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 560, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 1077, in run
    use_existing_dir=use_existing_dir)
  File "/usr/lib/python2.5/site-packages/bzrlib/push.py", line 128, in _show_push_branch
    remember)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1275, in push_branch
    overwrite, stop_revision=revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 864, in push
    *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 3058, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 2874, in _run_with_write_locked_target
    result = callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 3098, in _push_with_bound_branches
    stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 2232, in _basic_push
    overwrite=overwrite, graph=graph)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 808, in update_revisions
    overwrite, graph)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 2981, in update_revisions
    self.target.set_last_revision_info(stop_revno, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 2389, in set_last_revision_info
    str(revno), revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 58, in _call
    self._translate_error(err, **err_context)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 2030, in _translate_error
    self.repository._translate_error(err, branch=self, **context)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 702, in _translate_error
    self.bzrdir._translate_error(err, repository=self, **context)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 130, in _translate_error
    _translate_error(err, bzrdir=self, **context)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 2648, in _translate_error
    raise errors.UnknownErrorFromSmartServer(err)
UnknownErrorFromSmartServer: Server sent an unexpected error: ('error', "'smeinardo@pentaserv-20090612145747-5228o2i4av5mjksk'")

Martin Albisetti (beuno) on 2009-06-16
summary: - UnknownErrorFromSmartServer when pushing a bbc branch to bzr 1.16rc1
- server from 1.14.1
+ UnknownErrorFromSmartServer when pushing with 1.6rc1
description: updated
summary: - UnknownErrorFromSmartServer when pushing with 1.6rc1
+ UnknownErrorFromSmartServer when pushing with 1.16rc1

Martin, I think this is a bug in bzr-search -- we noticed something like this when preparing the 1.16rc1 release.

The description & title should probably be edited by someone more knowledgeable than I.

affects: bzr → bzr-search
Changed in bzr-search:
status: New → Incomplete

 status confirmed
 importance low
 summary "bzr-search errors when indexing stacked branches"

This looks to me like bzr-search is accessing data that is ghosted in
the stacked environment.

I'm setting it to low importance because the main user of stacked
branches - launchpad - shouldn't have indices on any branches and as
such bzr-search should stop without trying to index anything.

If I'm wrong - if the branch pushed too wasn't stacked, or didn't have
an index, let me know.

-Rob

summary: - UnknownErrorFromSmartServer when pushing with 1.16rc1
+ bzr-search errors when indexing stacked branches
Changed in bzr-search:
importance: Undecided → Low
status: Incomplete → Confirmed

On Tue, Jun 16, 2009 at 10:25 PM, Robert
Collins<email address hidden> wrote:
> If I'm wrong - if the branch pushed too wasn't stacked, or didn't have
> an index, let me know.

It's not stacked on either end, but it is indexed.

--
Martin

> It's not stacked on either end, but it is indexed.

 importance high

Very odd.

Changed in bzr-search:
importance: Low → High
Vincent Ladeuil (vila) wrote :

I've seen it without bzr-search installed.

I didn't realize sooner I encounter the problem as the push indeed succeeds (well, a commit in a bound lp branch in my case) but the error was lost (for me) in the 'VFS Repository access triggered' tracebacks :-/

affects: bzr-search → bzr
summary: - bzr-search errors when indexing stacked branches
+ UnknownErrorFromSmartServer when pushing (or committing to a bound
+ branch) with 1.16rc1

bzr-search is very clearly in the trace.

affects: bzr → bzr-search
summary: - UnknownErrorFromSmartServer when pushing (or committing to a bound
- branch) with 1.16rc1
+ bzr-search errors when indexing stacked branches
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers