NoSuchRevision during "bzr check"

Bug #507040 reported by Nicola Larosa
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Expired
Medium
Unassigned

Bug Description

I got the following while running "bzr check", crash log attached.

Checking repository at 'file:///home/nl/canonical/ubuntuone/'.
bzr: ERROR: bzrlib.errors.NoSuchRevision: CHKInventoryRepository('file:///home/nl/canonical/ubuntuone/.bzr/repository/') has no revision ('<email address hidden>',)

*** 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
    attaching the crash file
        /home/nl/.cache/crash/bzr-20100113153736-12355.crash
    and including a description of the problem.

 Traceback (most recent call last):
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 842, in exception_to_return_code
     return the_callable(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1037, in run_bzr
     ret = run(*run_argv)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 654, in run_argv_aliases
     return self.run(**all_cmd_args)
   File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 3145, in run
     check_dwim(path, verbose, do_branch=branch, do_repo=repo, do_tree=tree)
   File "/usr/lib/python2.6/dist-packages/bzrlib/check.py", line 456, in check_dwim
     check_repo=do_repo)
   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/repository.py", line 2766, in check
     check_repo=check_repo)
   File "/usr/lib/python2.6/dist-packages/bzrlib/repository.py", line 2770, in _check
     result.check(callback_refs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/check.py", line 124, in check
     refs[ref] = repo.revision_tree(value)
   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/repository.py", line 2568, in revision_tree
     inv = self.get_revision_inventory(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/repository.py", line 2527, in get_revision_inventory
     return self.get_inventory(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/repository.py", line 2357, in get_inventory
     return self.iter_inventories([revision_id]).next()
   File "/usr/lib/python2.6/dist-packages/bzrlib/repofmt/groupcompress_repo.py", line 895, in _iter_inventories
     raise errors.NoSuchRevision(self, record.key)
 NoSuchRevision: CHKInventoryRepository('file:///home/nl/canonical/ubuntuone/.bzr/repository/') has no revision ('<email address hidden>',)

Revision history for this message
Nicola Larosa (teknico) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

Are you seeing any other problems with this repository?

summary: - Crash during "bzr check"
+ NoSuchRevision during "bzr check"
description: updated
Changed in bzr:
status: New → Confirmed
importance: Undecided → High
importance: High → Medium
Revision history for this message
Nicola Larosa (teknico) wrote :

No, I'm not. I was being helped about #506974, was asked to do a "bzr check", and this was the outcome. #506974 is about another, unrelated repo, so feel free to disregard.

Revision history for this message
Martin Pool (mbp) wrote :

This might be a dupe of bug 507566?

Revision history for this message
Vincent Ladeuil (vila) wrote :

Not sure about the dupe here but Nicola said that this repo is used by branches stacked on *another* repo.

So 'bzr check' may just be failing because it doesn't know about the other repo.

@Nicola, try to run 'bzr check' from a directory that set things up correctly, a stacked branch or a working tree
associated with a stacked branch.

But even there, if several branches (sharing that repo) are stacked onto *several* other repos, check can still crash
that way since it's supposed to check *all* revisions in the repository and some of them may refer to revisions
present in some stacked-on repos that check is not aware of....

If that's the case, I can see several ways to address the problem:
- scan all branches to collect all relevant repos before starting the check (urgh),
- add an option to check only the revisions appearing in the branch ancestry,
- if the error occur while checking a repo, output a warning about stacked branches ?

@Nicola: Can you tell us how you use that shared repo ?
Are all branches stacked onto the same external repo ?
If yes, does a 'bzr check' from one of the branches succeeds ?
If still yes, does it succeeds for all the branches ?

Changed in bzr:
status: Confirmed → Incomplete
Revision history for this message
Nicola Larosa (teknico) wrote :

Vincent, I'm not sure I'm following you.

The repo in question is the top of a stacked repo located at ~/canonical/ubuntuone . Running "bzr info" in it shows:

Location:
  shared repository: .

Underneath it there are a few branch, all clones of ~/canonical/ubuntuone/trunk . Running "bzr info in the latter shows:

Location:
  shared repository: /home/nl/canonical/ubuntuone
  repository branch: .

I run "bzr check" again in the top shared repo, and got a similar error, but this time referencing a different version.

I don't really know what's going on, I don't even know whether this is a real problem. I'm mainly concerned with #506974.

Again, feel free to disregard.

Revision history for this message
Nicola Larosa (teknico) wrote :

More info: I rebuilt the dev environ in a virtual machine, problem #506974 is solved, but this same error is still happening, with another different revision. It does not seem to cause real problems, though, so I'm leaving it at that.

Revision history for this message
Vincent Ladeuil (vila) wrote :

> The repo in question is the top of a stacked repo located at ~/canonical/ubuntuone .

There is no such things as stacked repos, only stacked branches. So I considered
that you were talking about a repo shared by stacked branches.

> Underneath it there are a few branch, all clones of ~/canonical/ubuntuone/trunk .

Try running 'bzr check -v' *there*, i.e. where bzr will be able to find the reference to the stacked-on branch
and will probably be happy.

Are my questions in comment #5 clearer that way ?

Can you answer them ?

Jelmer Vernooij (jelmer)
tags: added: check missing-inventory
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Bazaar because there has been no activity for 60 days.]

Changed in bzr:
status: Incomplete → Expired
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

Remote bug watches

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