bzrlib.errors.ObjectNotLocked annotating file from other branch

Bug #496590 reported by Martin von Gagern
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Andrew Bennetts
2.0
Fix Released
Medium
Andrew Bennetts
2.1
Fix Released
Undecided
Andrew Bennetts

Bug Description

Steps to reproduce:
$ bzr init-repo repo
$ cd repo
$ bzr init trunk
$ cd trunk
$ echo foo > foo
$ bzr add foo
$ bzr ci -m foo
$ cd ..
$ bzr co --lightweight trunk work
$ cd work
$ bzr --no-plugins annotate -r branch:../trunk foo

bzr: ERROR: bzrlib.errors.ObjectNotLocked: <bzrlib.groupcompress._GCGraphIndex object at 0x1f7c250> is not locked

Traceback (most recent call last):
  File ".../bzr.dev/bzrlib/commands.py", line 826, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File ".../bzr.dev/bzrlib/commands.py", line 1027, in run_bzr
    ret = run(*run_argv)
  File ".../bzr.dev/bzrlib/commands.py", line 638, in run_argv_aliases
    return self.run(**all_cmd_args)
  File ".../bzr.dev/bzrlib/commands.py", line 1042, in ignore_pipe
    result = func(*args, **kwargs)
  File ".../bzr.dev/bzrlib/builtins.py", line 4512, in run
    file_version = tree.inventory[file_id].revision
  File ".../bzr.dev/bzrlib/inventory.py", line 2016, in __getitem__
    self.id_to_entry.iteritems([StaticTuple(file_id,)]).next()[1])
  File ".../bzr.dev/bzrlib/chk_map.py", line 494, in iteritems
    self._ensure_root()
  File ".../bzr.dev/bzrlib/chk_map.py", line 143, in _ensure_root
    self._root_node = self._get_node(self._root_node)
  File ".../bzr.dev/bzrlib/chk_map.py", line 156, in _get_node
    bytes = self._read_bytes(node)
  File ".../bzr.dev/bzrlib/chk_map.py", line 167, in _read_bytes
    bytes = stream.next().get_bytes_as('fulltext')
  File ".../bzr.dev/bzrlib/groupcompress.py", line 1413, in get_record_stream
    orig_keys, ordering, include_delta_closure):
  File ".../bzr.dev/bzrlib/groupcompress.py", line 1518, in _get_remaining_record_stream
    locations = self._index.get_build_details(keys)
  File ".../bzr.dev/bzrlib/groupcompress.py", line 2003, in get_build_details
    self._check_read()
  File ".../bzr.dev/bzrlib/groupcompress.py", line 1923, in _check_read
    raise errors.ObjectNotLocked(self)
ObjectNotLocked: <bzrlib.groupcompress._GCGraphIndex object at 0x1f7c250> is not locked

bzr 2.1.0dev4 on python 2.6.4 (Linux-2.6.32-gentoo-x86_64-AMD_Phenom-tm-_II_X4_945_Processor-with-gentoo-2.0.1)
arguments: ['.../bzr.dev/bzr', '--no-plugins', 'annotate', '-r', 'branch:../trunk', 'foo']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.utf8'
plugins:

*** 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
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

This happened with current bzr.dev, i.e. 4894 resp. <email address hidden>

Tags: annotate

Related branches

Martin Pool (mbp)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
tags: added: annotate
Andrew Bennetts (spiv)
Changed in bzr:
status: Confirmed → Fix Committed
assignee: nobody → Andrew Bennetts (spiv)
Revision history for this message
Martin Pool (mbp) wrote :

Is this now fix released in 2.1?

Revision history for this message
Martin von Gagern (gagern) wrote :

Still can reproduce with current trunk and current 2.1 branch.

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

Neither of my branches (one is targetted to 2.0, the other to trunk) have landed yet, hopefully tomorrow though.

Also, for convenience, here's a shell script that reproduces. I've confirmed that both branches fix this bug.

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

Fixed in lp:bzr r4948, and lp:bzr/2.0 r4721.

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.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.