hg verify: 'unknown compression type'
Matt Mackall
mpm at selenic.com
Tue Aug 23 02:07:30 UTC 2005
On Mon, Aug 22, 2005 at 09:45:40PM -0400, Bart Trojanowski wrote:
> * Matt Mackall <mpm at selenic.com> [050822 21:25]:
> > If you change revlog.py:35 to:
> >
> > raise Exception("unknown compression type %s" % t)
> >
> > ..we'll see which file and revision broken. Then send me a copy and
> > I'll try to dissect it. It's probably a single bit error in the index,
> > so be sure to send both files.
>
> Here is the new output (much more informative):
>
> $ hg verify
> checking changesets
> checking manifests
> crosschecking files in changesets and manifests
> checking files
> unpacking file drivers/scsi/ips.c b24ecf466101: unknown compression type ?
> unpacking file drivers/scsi/ips.c 48935937a763: unknown compression type ?
> unpacking file drivers/scsi/ips.c 0d0af05b95a1: unknown compression type ?
...
You could use hg debugindex .hg/.../ips.c.d to verify that 'b24ecf..'
is indeed the first revision.
> 18336 files, 5916 changesets, 112883 total revisions
> 26 integrity errors encountered!
>
> BTW, the type reported is character 0xFE.
Ahh. I thought it was a literal '?', which is what my mailer is
showing me. Are -all- the question marks the same 0xFE? That would
point to some sort of systematic problem.
> Now that I know what file is corrupted, here is more info on that file:
>
> $ md5sum linux-2.6{,-broken}/.hg/data/drivers/scsi/ips.c.*
> 28026f793eec2e07889a6f06343eef83 linux-2.6/.hg/data/drivers/scsi/ips.c.d
> 781b89546dc92dbd5e0d5f5db90f1a07 linux-2.6/.hg/data/drivers/scsi/ips.c.i
> c72b952034b4656f9e1afe8d26afdbb3 linux-2.6-broken/.hg/data/drivers/scsi/ips.c.d
> 781b89546dc92dbd5e0d5f5db90f1a07 linux-2.6-broken/.hg/data/drivers/scsi/ips.c.i
>
> It looks like .i files are the same... so presumably they are on the same
> revision. However, the .d files are differnet.
Useful.
> $ hex linux-2.6-broken/.hg/data/drivers/scsi/ips.c.d | head
> 0x00000000: fe dd 85 44 ea 04 da 9d - 00 ff ad b2 a6 84 78 5d ??.D......??..x]
> 0x00000010: 48 11 05 49 78 9c ec 7d - 6d 7b 1a 39 b2 e8 67 fb H..Ix..}m{.9??g.
> 0x00000020: 57 68 7c 9e c9 40 82 df - 9d 4c 36 1e 67 2f 06 6c Wh|.. at ...L6.g/.l
> 0x00000030: 73 06 83 87 c6 c9 cc e6 - e4 e1 69 43 63 fa 04 68 s...??????iCc..h
> 0x00000040: a6 1b 62 fb ee ce fd ed - b7 aa f4 d2 52 b7 1a 1a ..b????????.R...
Ok, there's our 0xfe. The corresponding byte at the bottom is 'x',
which indicates a compressed revision. This same sequence seems to
start above at 0x14.
> $ hex linux-2.6/.hg/data/drivers/scsi/ips.c.d | head
> 0x00000000: 78 9c ec 7d 6d 7b 1a 39 - b2 e8 67 fb 57 68 7c 9e x..}m{.9??g.Wh|.
> 0x00000010: c9 40 82 df 9d 4c 36 1e - 67 2f 06 6c 73 06 83 87 . at ...L6.g/.ls...
> 0x00000020: c6 c9 cc e6 e4 e1 69 43 - 63 fa 04 68 a6 1b 62 fb ??????iCc..h..b??
> 0x00000030: ee ce fd ed b7 aa f4 d2 - 52 b7 1a 1a 8f 9d 8d 77 .??????.R......w
> 0x00000040: c2 ce 3a d0 2d 95 a4 92 - 54 aa 2a d5 cb f6 f3 87 ??:.-...T.*????.
The interesting thing about this is it appears to be inserted at the
beginning of a file in a revision that was part of the original repo
commit. We only ever append to a file or copy it outright, so there
aren't any good explanations as to how this repo worked at one point
and then broke.
What filesystem are you using?
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list