[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion FSFS corruption

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-08-23 20:01:38 CEST

On Mon, 2005-08-22 at 23:51 -0700, Ted Gould wrote:
> I sent this message the user list on Friday, but I believe that may
> have been the wrong list.

That's the right list for this sort of problem, but your problem is deep
enough that only a couple of people are qualified to look into it
without studying up, and one of them (me) doesn't read the user list.

> I'm not entirely able to make out the file format in the FSFS repository
> files, but I think this is the metadata for the file with the error:

describes the format.

> text: 671 125184612 3924753 3922699 9112d223ba3e88b19e846e429f0ef361

The third number (3924753) is the length of the delta. I downloaded the
file overnight and looked; the delta seems to be of the right length
(that is, 3924753 bytes after the beginning of the delta is an "ENDREP

> svn: Delta does not fill the target window

The problem seems to be within the delta itself. Chunk 30 or so, at
offset 3073127 into the delta, contains instructions which produce
100675 bytes when they are supposed to produce 102400 bytes.

> 2) Assuming I give up on ever seeing img_5633.jpg again, how do I get
> my repository back online?

If there are no derivatives of img_5633.jpg, then you can resolve this
problem through very delicate surgery. The following seems to work:

  * At offset 125184612 in the file, change the word "DELTA" to "PLAIN".

  * In the metadata, where it says

text: 671 125184612 3924753 3922699 9112d223ba3e88b19e846e429f0ef361

    change that to:

text: 671 125184612 0 0 d41d8cd98f00b204e9800998ecf8427e

    where the spaces are important. The length of the line cannot
change, since FSFS relies heavily on offsets into files.

That will morph img_5633.jpg into an empty file.

> 3) Is this a bug? Any other data that you need?

Well, I can see two possibilities:

  * There is a bug in our binary delta code. This would be pretty
surprising, but it's a possibility. Unfortunately, the way to look into
this would be to take the original img_5633.jpg and see if the problem
can be reproduced by checking it in. If that file is gone, it's hard to
see a way forward.

  * The rev file was subtly corrupted during or after its creation by
something other than Subversion. Usually such corruption manifests
itself as a large swath of 0 bytes, which is not the case here.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 23 20:03:17 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.