Corrupt repository? How to fix?
Martin Pool
mbp at canonical.com
Wed Jun 9 01:25:56 BST 2010
On 9 June 2010 06:36, Roland Mas <lolando at debian.org> wrote:
> Hi all,
>
> Bazaar 2.1.2 (from Debian sid) has started throwing very worrying
> exceptions at me in a shared repository tonight, about "error: Error -3
> while decompressing data: incorrect data check" and "ValueError: Unknown
> content control code: c" (or other characters besides "c", including
> non-ASCII chars). I seem unable to commit a revision into that
> repository, I can't branch from a branch stored in there, bzr check
> crashes, so does bzr pack… This is frightening (not to mention annoying,
> since most of my activity revolves around that repository nowadays,
> mostly through a few branches bound to a remote SVN repository). Is is
> possibly something I did (although I never tried any magic voodoo)? A
> bug in Bazaar? Is my repository definitely corrupt, or can it be fixed?
Hi,
Just from a fairly brief skim and previous experience with these
things, errors coming from gzip tend to mean there is some
filesystem-level corruption, perhaps because of a machine crash? It's
fairly unlikely there is a bug in bzr that's causing gzip data to be
messed up between compression and being written to disk.
You can try going into your .bzr/repository/packs directory and
running 'md5sum *'; that should show that the hash of every pack
corresponds to its name. You could also try that in the
obsolete_packs directory.
If one of the recent new packs is damaged, it may be possible to
reinstate one of the old ones. I _think_ if you just move the broken
pack out of the way bzr will try to auto recover.
(It might be nice if we automated this check/remove/recover.)
If you have a recent backup of the repository it may be easier just to
restore from that.
--
Martin
More information about the bazaar
mailing list