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

Trying to Fix Corrupt Revision File

From: Brian Besterman <bbesterman_at_walkerdigital.com>
Date: 2007-03-14 01:19:14 CET

I have a corrupt revision file that was created while committing 2
large files to the subversion repository (FSFS). Since that time, we
have continued to commit to the repository with few problems,
although the 2 files that were part of the corrupt commit are being
archived elsewhere. We have been using Linux FC4 with Subversion
1.3.0, apr 0.9.6, served with Apache 2.0.56, mod_python 3.2.8.

Since my research indicated that the problem may have been due to a
bug in the APR library, and for other reasons related to old
hardware, I decided to upgrade my server hardware from a 32-bit to a
64-bit machine, and also upgrade to FC6 and all the latest versions
of Subversion/apr/Apache. In transferring the subversion repository,
I am creating dumpfiles from the old repository and loading them
sequentially into the new one. I have successfully dumped all
revisions up to the corrupt one, but have not been able to proceed
past this point. At first, I got a checksum error:

svnadmin dump /var/walker/data/svn/wdtechnet -r 7010 --incremental >
7010.dmp
subversion/libsvn_fs_fs/fs_fs.c:1643: (apr_err=160004)
svnadmin: Checksum mismatch while reading representation:
    expected: bb8d6063e81108b88322a7db18059393
      actual: f17f216c2cfac21553e9f02450b74672

I then went into the revision file with an editor to replace the bad
checksum with all 0's, to try and get past the error. I realize that
this is a hack, but I am not concerned at all with recovering these 2
files. I just want to get past this revision without losing changes
in other revisions.

This is what I saw in editing the file:

DELTA 6966 0 2147051
SVN
DELTA 6966 2147064 5213009
SVN<binary data>ENDREP
id: 64e.0.r7010/92199635
type: file
pred: 64e.0.r7007/11969377
count: 4
text: 7010 0 8685775 8684144 bb8d6063e81108b88322a7db18059393
props: 6966 7360086 84 0 18430312c76e2a3663b09f456a8d5295
cpath: /development/wd-projects/trunk/flash/handheld/TotalService.swf
copyroot: 0 /

id: 64f.0.r7010/92199919
type: file
pred: 64f.0.r7007/11969661
count: 4
text: 7010 8685803 83513798 89222144 af44eed012ec8316aafdf6b18a978982
props: 6966 7360439 84 0 18430312c76e2a3663b09f456a8d5295
cpath: /development/wd-projects/trunk/flash/handheld/TotalService.fla
copyroot: 0 /

<several PLAIN representations>

64e.0.t7009-1 modify true false /development/wd-projects/trunk/flash/
handheld/TotalService.swf

64f.0.t7009-1 modify true false /development/wd-projects/trunk/flash/
handheld/TotalService.fla

92204989 92205141

 From what I have read, I thought that one of the node-revisions
should have been positioned after the first ENDREP. But I figured I
would start by dealing with the checksum error. So after replacing
the first hash with 32 0's, I tried to dump the revision again and
got the following error:

svnadmin dump /var/walker/data/svn/wdtechnet -r 7010 --incremental >
7010.dmp
subversion/libsvn_fs_fs/fs_fs.c:614: (apr_err=160004)
svnadmin: Malformed text rep offset line in node-rev

I have since tried moving each of the node-revisions to the line
following the first ENDREP. After moving the first node revision
("id: 64e...copyroot: 0 /\n\n"), I got the following error:

svnadmin dump /var/walker/data/svn/wdtechnet -r 7010 --incremental >
7010.dmp
subversion/libsvn_fs_fs/fs_fs.c:962: (apr_err=160004)
svnadmin: Malformed representation header

I then undid that edit and tried moving the 2nd node-revision, and
got the following error:

svnadmin dump /var/walker/data/svn/wdtechnet -r 7010 --incremental >
7010.dmp
subversion/libsvn_fs_fs/fs_fs.c:462: (apr_err=160004)
svnadmin: Found malformed header in revision file

So I am now not sure what to do. I do not know the error message that
was printed at the time of the commit, or exactly what my developer
did after getting the error. He did try to commit these same files
several times, and consequently I have several other revisions past
this point that report the error "Found malformed header in revision
file" when I try to dump them. Is it safe to just create dumpfiles
without these particular revisions and load them into the new
repository?

Any help would be appreciated.

Thanks,
Brian Besterman
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Mar 14 01:19:59 2007

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