accessing a bzr:// branch with a revisionspec causes bzr to crash

Bug #410332 reported by John Meuser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Unassigned

Bug Description

When attempting to get access to a branch shared via the bzr stand alone server and giving it a revisionspec option, causes the following crash. It works fine if you exclude the revisionspec, and it works fine if you access it via bzr+ssh://, but this combination of options makes it crash every time.

bzr ls -v --show-ids -r-1 bzr://s-ilsfile1/www/www.xxxxxxx.net/

bzr: ERROR: bzrlib.errors.ObjectNotLocked: _KnitGraphIndex(CombinedGraphIndex(GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/ec5413e20554c050597fae577c5b9a8d.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/e2ba533575d64c6b89ff9fc0032700a3.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/e1acb2eeb4097ca0705aa88fba0d6862.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/c46b604a8c45bd41bcb105c6a823bb6d.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/9798d44757ed01409344c5102c883adc.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/78b6218cec5e9379bd24a9f9fc03128a.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/55a0b13205ff81968b9556b0e4fb4bf9.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/4a4fbdc2797d632697c38ea24ec20cf9.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/3f81911ce2c477a02cef8185b3a24a30.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/372c44112ae9ce502aa0a585bbf129dd.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/26c3901c0c1cf7ed16209fbeaaab4bd6.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/17056ecc5c4bb0e8cb247cadd1fb4468.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/01180b7a167da804833121990f4dd7db.rix'))) is not locked

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1030, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 647, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1045, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 2487, in run
    tree = _get_one_revision_tree('ls', revision, branch=branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 132, in _get_one_revision_tree
    rev_tree = revision.as_tree(branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/revisionspec.py", line 260, in as_tree
    return self._as_tree(context_branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/revisionspec.py", line 269, in _as_tree
    revision_id = self.as_revision_id(context_branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/revisionspec.py", line 243, in as_revision_id
    return self._as_revision_id(context_branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/revisionspec.py", line 387, in _as_revision_id
    branch, revno, revision_id = self._lookup(context_branch, None)
  File "/usr/lib/python2.5/site-packages/bzrlib/revisionspec.py", line 380, in _lookup
    revision_id = branch.get_rev_id(revno, revs_or_none)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 2271, in get_rev_id
    revno, last_revision_info)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 691, in get_rev_id_for_revno
    return self._get_rev_id_for_revno_vfs(revno, known_pair)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 684, in _get_rev_id_for_revno_vfs
    revno, known_pair)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 2269, in get_rev_id_for_revno
    self, partial_history, stop_index=distance_from_known)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 4370, in _iter_for_revno
    iterator.next()
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 2299, in iter_reverse_revision_history
    parents = graph.get_parent_map([next_id])[next_id]
  File "/usr/lib/python2.5/site-packages/bzrlib/graph.py", line 167, in get_parent_map
    parent_map = self._get_parent_map(needed_revisions)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 2457, in get_parent_map
    self.revisions.get_parent_map(query_keys).iteritems():
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 1193, in get_parent_map
    return self._get_parent_map_with_sources(keys)[0]
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 1212, in _get_parent_map_with_sources
    new_result = source.get_parent_map(missing)
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 3047, in get_parent_map
    self._check_read()
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 2930, in _check_read
    raise errors.ObjectNotLocked(self)
ObjectNotLocked: _KnitGraphIndex(CombinedGraphIndex(GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/ec5413e20554c050597fae577c5b9a8d.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/e2ba533575d64c6b89ff9fc0032700a3.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/e1acb2eeb4097ca0705aa88fba0d6862.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/c46b604a8c45bd41bcb105c6a823bb6d.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/9798d44757ed01409344c5102c883adc.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/78b6218cec5e9379bd24a9f9fc03128a.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/55a0b13205ff81968b9556b0e4fb4bf9.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/4a4fbdc2797d632697c38ea24ec20cf9.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/3f81911ce2c477a02cef8185b3a24a30.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/372c44112ae9ce502aa0a585bbf129dd.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/26c3901c0c1cf7ed16209fbeaaab4bd6.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/17056ecc5c4bb0e8cb247cadd1fb4468.rix'), GraphIndex('bzr://s-ilsfile1/.bzr/repository/indices/01180b7a167da804833121990f4dd7db.rix'))) is not locked

bzr 1.17 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'ls', '-v', '--show-ids', '-r-1', 'bzr://s-ilsfile1/www/www.xxxxxxx.net/']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.17]
  etckeeper /usr/lib/python2.5/site-packages/bzrlib/plugins/etckeeper [unknown]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [1.17]
  netrc_credential_store /usr/lib/python2.5/site-packages/bzrlib/plugins/netrc_credential_store [1.17]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3]
*** 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.

Revision history for this message
John Meuser (meuserj) wrote :

Just discovered an additional variable. This seems to only happen with repositories served via bzr server, not individual branches.

Revision history for this message
Matthew Fuller (fullermd) wrote :

This may be related to (or a dupe of) bug 389413.

Revision history for this message
John Meuser (meuserj) wrote :

Bug still exists in bzr 2.0.

This is a big problem for Redmine users, since that is the command it uses to get the revision list.

Martin Pool (mbp)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Andrew Bennetts (spiv) wrote :

This is fixed in current bzr. I can reproduce it with an old bzr server (e.g. 1.16) and the same version client as the reporter (1.17), but if I use bzr 2.0.3 or trunk on the client-side this command works for me.

John Meuser: have you tried 2.0.2 or newer? I think this was fixed in 2.0.2 (see bug #445171).

(I did find another crash in 'bzr ls' while investigating this, but it's a different problem so I'll make a new bug about that.)

So I'm closing this bug. Please feel free to reopen if it's still a problem for you with 2.0.3.

Changed in bzr:
status: Confirmed → Fix Released
Revision history for this message
John Meuser (meuserj) wrote :

Yeah, it's fixed. I forgot to update the bug report.

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.