Corrupt repository

Greg Ward greg-hg at gerg.ca
Fri Jun 26 18:45:38 CDT 2009


On Fri, Jun 26, 2009 at 12:43 PM, Matt Mackall<mpm at selenic.com> wrote:
> Hg doesn't really 'crash', it only reports prettier or uglier
> exceptions. We could probably make this one prettier.

Picky, picky.  ;-)  I habitually use "crash" as shorthand for
"terminate abnormally with an uncaught exception".  Gets people's
attention, if nothing else.

> You should also check if the problem persists over reboot. It's more
> likely for corruption to appear when reading than when writing, as we
> only write a block once.

Son-of-a-gun: the problem disappeared after a reboot.  Huh.

For the record, this is on a 6-year-old Toshiba laptop running Ubuntu
8.10 (Linux 2.6.27).  Original RAM and hard drive to the best of my
knowledge.

> It's almost certainly a hardware error. Doing a binary compare on
> 00manifest.d against a good 00manifest.d should give us a hint what's
> up.

Not sure how meaningful that would be.  The repository in question was
a clone of hg-crew, and unsurprisingly I happened to have another
clone handy.  But the manifest files don't look very comparable:

[~/src/corrupt-hg-crew] ll .hg/store/00*
-rw-r--r-- 1 greg greg 1678005 2009-06-26 19:20 .hg/store/00changelog.d
-rw-r--r-- 1 greg greg  572544 2009-06-26 19:20 .hg/store/00changelog.i
-rw-r--r-- 1 greg greg 3033490 2009-06-26 19:20 .hg/store/00manifest.d
-rw-r--r-- 1 greg greg  572288 2009-06-26 19:20 .hg/store/00manifest.i

[~/src/hg-crew] ll .hg/store/00*
-rw-r--r-- 1 greg greg 1677593 2009-06-26 19:25 .hg/store/00changelog.d
-rw-r--r-- 1 greg greg  572544 2009-06-26 19:25 .hg/store/00changelog.i
-rw-r--r-- 1 greg greg 4953350 2009-06-26 19:25 .hg/store/00manifest.d
-rw-r--r-- 1 greg greg  572288 2009-06-26 19:25 .hg/store/00manifest.i

That's in spite of the fact that both clones contain the same graph of
changesets, according to incoming, outgoing, and verify.

I did a binary comparison of 00manifest.d anyways.  The diff starts at
byte 952363, and the two files are totally different after that point.
 From "hg debugindex", that looks like it's around rev 3876, which is
a long time before the corruption reported by "hg verify".  It's also
from long before I started keeping clones of hg-crew around for
hacking on Mercurial, so I'm not sure why the two manifests diverge so
early.

Greg


More information about the Mercurial mailing list