You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Brian Besterman <bb...@walkerdigital.com> on 2007/03/14 00:19:14 UTC

Trying to Fix Corrupt Revision File

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<binary data>ENDREP
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


Re: Trying to Fix Corrupt Revision File

Posted by Brian Besterman <bb...@walkerdigital.com>.
Well, except for some bad checksums, we have been very happy with  
Subversion.  Of course, we may have corrupt data somewhere, but  
nothing that we have noticed.  In over 7200 commits with a 6 GB  
repository, I had about 10 bad checksums during my dump/load  
sequence.  That is a 0.14% error rate.  And with that, there may  
still not be any data corruption.  Since we were using old hardware  
and software, I can only hope that we will not see this issue again.

By the way, I did get past the bad checksum.  It turns out, I was  
converting the checksum to hex 00's instead of ASCII "0"s (hex 30).   
Once I realized that, the particular revision was dumped without  
"error".

Thanks,
Brian


On Mar 14, 2007, at 12:47 PM, Joshua Chen wrote:

> I think svn + threaded httpd is still far away from acceptable  
> quality and
> some guys are working on that already, however the progress is  
> disappointed.
> In fact, we encounter this similar situation again and again and i  
> m forced
> to back to the old cvs world where each file's corruption is not  
> too harmful
> as a  whole.
>
> sorry, no much help.
>
> -----Original Message-----
> From: Brian Besterman [mailto:bbesterman@walkerdigital.com]
> Sent: Wednesday, March 14, 2007 8:19 AM
> To: users@subversion.tigris.org
> Subject: Trying to Fix Corrupt Revision File
>
>
> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
> ______________________________________________________________________
> This email has been scanned by MessageLabs Email Security System  
> for spam, virus, and inappropriate content.
> ______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Trying to Fix Corrupt Revision File

Posted by Joshua Chen <jo...@wiki-bazar.net>.
I think svn + threaded httpd is still far away from acceptable quality and
some guys are working on that already, however the progress is disappointed.
In fact, we encounter this similar situation again and again and i m forced
to back to the old cvs world where each file's corruption is not too harmful
as a  whole.

sorry, no much help.

-----Original Message-----
From: Brian Besterman [mailto:bbesterman@walkerdigital.com]
Sent: Wednesday, March 14, 2007 8:19 AM
To: users@subversion.tigris.org
Subject: Trying to Fix Corrupt Revision File


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.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org