corrupted branch with bzr 1.5, bzr-svn 0.4.10, and roundtripping

Bug #462109 reported by Colin Watson
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Undecided
Unassigned

Bug Description

The GNU GRUB project is currently evaluating Bazaar, starting with a bzr-svn conversion of the existing Subversion repository. Since the maintainer driving this is a Debian developer who, all things being equal, would like the branch to be usable on Debian stable, he's been using the versions of bzr and bzr-svn in Lenny (1.5 and 0.4.10 respectively). I've noted that these are very old in Bazaar terms, and he's receptive to upgrading if we can show that an upgrade will fix some of the problems being encountered.

Following the initial bzr-svn import, Robert made a number of commits to the Subversion repository using a bzr client, relying on roundtripping of revisions. At some point, this resulted in corrupted revisions. 'bzr check' (with bzr 2.0.0) dies as follows:

  bzr: ERROR: bzrlib.errors.SHA1KnitCorrupt: Knit <bzrlib.knit._VFContentMapGenerator object at 0xacacc6c> corrupt: sha-1 of reconstructed text does not match expected sha-1. key ('<email address hidden>',) expected sha 5106634edd37d3b7403caa4c9c2298520f1f5fdc actual sha 54329caf5b6e40f5526416dfbe9b159ae13a70a5

I've attached part of the corrupted repository and branch, pulled from http://bzr.sv.gnu.org/r/grub/trunk; I'm attaching it here because we may zap that repository and start over in order to recover from this. Everything up to revision 1777 checked fine, while revision 1778 failed.

I've also attached the crash file.

Revision history for this message
Colin Watson (cjwatson) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

The problem here is that the text revisions haven't been recorded properly in all cases. Since the text revisions are recorded explicitly in the inventory text this causes sha-1 differences of the inventories, and that causes "bzr check" to blow up like it does. This is a problem with the pre-2a bzr formats since they store the inventory as one big XML blob.

Upgrading the bzr repository to 2a while ignoring this issue fixes the problem. I've pushed a fixed 2a branch to lp:~jelmer/grub/fixed

Revision history for this message
Felix Zielcke (fzielcke) wrote :

Thanks Jelmer for investigating this.
After our repo corrupted the 2nd time, we decided to use the fast-import/fast-export method to convert the svn to bzr and just use bzr now.
And we also switched from bzr+ssh:// to sftp:// and use repo format 2a
That works now fine for us.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I'll close this bug. The issue was a bug in 0.4.10 that has long since been fixed, we can't do much more about problems in existing branches.

If others are also having this problem and need help upgrading their branch to 2a, please let me know.

Changed in bzr-svn:
status: New → Fix Released
Revision history for this message
Robert Millan (rmh-aybabtu) wrote :

Hi,

Note that the second time our repo was corrupted, we were using recent bzr (2.0.1) with recent bzr-svn (1.0.0), although not 2a format yet.

Also, we suspect use of bzr+ssh to Savannah which used to run an old bzr (1.6 I think) might have been the culprit (see https://savannah.gnu.org/support/index.php?107077).

In case you're interested, a snapshot of the repository the second time it was corrupted is in http://people.debian.org/~rmh/grub/bzr-backup2/

Just in case that helps. Problems are solved on our side now.

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.