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

Re: SHA-1 collision in repository?

From: Philip Martin <philip_at_codematters.co.uk>
Date: Sat, 24 Feb 2018 01:42:02 +0000

Philip Martin <philip_at_codematters.co.uk> writes:

> There are a couple of options:
>
> A) disable rep-caching by editing fsfs.conf inside the repository
>
> B) reset the mapping by deleting/renaming the file db/rep-cache.db
> inside the repository (but please rename rather than delete if you
> want to help us identify the corruption)
>
> Doing either of these should allow the commit to succeed.

To verify the corruption start with the rep-cache:

  sqlite3 db/rep-cache.db "select * from rep_cache where hash='db11617ef1454332336e00abc311d44bc698f3b3'"

That should give you five numbers: the hash, the revision (604440), the
offset, the size and the expanded size.

Then examine the revision file for r604440. It could be unpacked:

  grep -a "^text: 604440.*/_" db/revs/604/604440

or packed:

  grep -a "^text: 604440.*/_" db/revs/604.pack/pack

One of the lines from grep should contain the hash and that line should
start:

  text: 604440

followed by three more numbers then hashes and other stuff. The three
numbers are the offset, size and expanded size and should match the
values from the rep-cache but I suspect the rep-cache has the wrong
offset.

-- 
Philip
Received on 2018-02-24 02:42:14 CET

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

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