Apparent time-dependent bug in hg?
Matt Mackall
mpm at selenic.com
Sun Jun 12 16:43:29 UTC 2005
On Sun, Jun 12, 2005 at 08:00:06AM -0400, Theodore Ts'o wrote:
> To demonstrate the problem, cd into the top-level of this directory
> (containing this README) and run the command "./do-hg-test". This is
> shorthand for:
>
> ./hg-import --init Serialized-test Serialized-test2
>
> which will import 1,534 changesets from e2fsprogs into a repository.
> After doing this, cd into the hg directory, and type the command:
>
> hg annotate tests/f_noroot/expect.2
>
> If it looks like this, the repository is buggy:
>
> 4: Pass 1: Checking inodes, blocks, and sizes
> 4: Pass 2: Checking directory structure
> 4: Pass 3: Checking directory connectivity
> 4: Pass 4: Checking reference counts
> 4: Pass 5: Checking group summary information
> 18: test_filesys: 17/32 files (0.0% non-contiguous), 26/100 blocks
> 4: Exit status is 0
>
> It is missing the change that should have been applied from
> changeset/1.16/patches, from e2fsprogs 1.06. The expect.2 file
> displayed above only has the changes as of changeset/1.15/patches,
> from e2fsprogs 1.05. What it should look like is this:
>
> 4: Pass 1: Checking inodes, blocks, and sizes
> 4: Pass 2: Checking directory structure
> 4: Pass 3: Checking directory connectivity
> 4: Pass 4: Checking reference counts
> 4: Pass 5: Checking group summary information
> 20: test_filesys: 16/32 files (0.0% non-contiguous), 26/100 blocks
> 4: Exit status is 0
>
> ... and it does, if you only import up until bk changeset 1.1485,
> which you can do by executing the command:
>
> ./hg-import --init Serialized-test
>
> But somehow, applying changeset 1.1486 causes the delta introduced in
> 1.15 to be lost.
>
> What is more scary, if you add a 20-second sleep between the 1.1485
> and 1.1486 changesets (which you can do by uncommenting the "sleep 20"
> in hg-import), it seems to make the problem go away.
That is indeed very odd. I'll try to debug this a bit this morning,
but it'd be easier to simply have the correct and incorrect repo files
to compare. That'd be .hg/data/tests/f_noroot/expect.2.{d,i}.
Have you found the debugging commands? hg debugindex .hg/data/<file>.i
will show you how the chunks are layed out.
My first impression from your report is that this smells like a kernel
bug, as there's no reason anything should change between serial
invocations of a single-threaded app like hg.
There were some flush/close bugs with multiple writers when I was
working on pull, but the commit path should be strictly opening one
file at a time.
I presume of course that you're using ext2 and a recent 2.6 kernel?
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list