bazaar corruption causing crash

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Jan 6 16:35:46 UTC 2011


>>>>> Henry Gomersall <heng at cantab.net> writes:


    > I submitted the problem as a bug report (697815), but its seriously
    > stalling me so I am keen to get feedback on how I can get my repository
    > up and running again.

You made the bug private and I can't access it.

    > My bzr metadata has somehow become corrupted making any bzr operations
    > fail with a crash like that submitted (although bzr status returns
    > fine).

    > Doing md5sum on the files in packs/ gives me one file with an incorrect
    > name (that given by 4d46aaa30ce4a05d9a71342fb858bfe7.pack with the same
    > name as the .rix file referenced in the bug report).

If md5sum gives you a number different than the file name, you have a
serious problem: the name is defined by the file content md5sum,
i.e. the file is created under a temporary name, its md5 sum calculated
and the file renamed with it. bzr *never* change the content of the file
after its creation.

So either you have a dying hard drive or you had a crash corrupting your
file system.

    > To fail like this is pretty serious.

Indeed. What OS/file system are you using, did you experience crashes
lately ?

    > How much of the version data is lost?

The content of the pack file itself, so depending on its size one or
several revisions.

    > Is there any way to revert it?

If the revisions have been pushed elsewhere (or pulled from elsewhere),
yes.

First you need to get rid of the broken pack file and repair the
repository. There are various ways to do it but we'll need more details
first like:
- ls -lR .bzr
- bzr dump-btree ./bzr/repository/pack-names

    > It seems the data itself is fine, so its not a catastrophe, but
    > I'm currently unable to commit changes. I am not aware of any
    > problem that could have led to this - how do I avoid it in future?

If it's your hard disk dying, get a new one :-/

   Vincent



More information about the bazaar mailing list