You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Bolstridge, Andrew" <an...@intergraph.com> on 2009/04/22 10:32:07 UTC

svnsync malformed file

Hi all.

I have a problem with a sync'ed repository. Over the last few days I've
been svnsync-ing my large repo to a backup destination. Today I suffered
a power failure that caused the destination machine to reboot (ie not
cleanly).

Now when I try to restart the svnsync it responds with "svnsync:
Malformed file".

I've run svnadmin verify on the destination repository and it says
everything is file - or at least reports no errors, and the last
revision to be copied is verified ok.

I've run svnadmin recover and it too reports no problems.

So - which file is svnsync complaining about, and is there any way I can
get it to restart the sync without having to delete the entire repo and
start from scratch?

(incidentally, I've just tried with svn itself, to list the repository
contents and it reports the same "malformed file" error. Obviously my
repo is screwed, but I'd still like to know if its recoverable and which
file is the malformed one)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1858307

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


RE: svnsync malformed file

Posted by "Bolstridge, Andrew" <an...@intergraph.com>.
Well, I ran svnadmin verify on the entire damaged repository, and it
reported no problems.

So, I'm stuck - although I will restart the sync, I'd still like to know
what's going on with this repo. I've done a diff between the repo files
and another repo and it all looks ok, but obviously something, somewhere
is broken. Is there any debugging I can turn on to help determine which
file is broken?



-----Original Message----- 
From: jsza...@gmail.com [mailto:jsza...@gmail.com] On Behalf Of John
Szakmeister 
Sent: Wednesday, April 22, 2009 12:38 PM 
To: Bolstridge, Andrew Cc: use...@subversion.tigris.org 
Subject: Re: svnsync malformed file

On Wed, Apr 22, 2009 at 6:32 AM, Bolstridge, Andrew
<an...@intergraph.com> wrote: [snip]

(incidentally, I've just tried with svn itself, to list the repository
contents and it reports the same "malformed file" error. Obviously my
repo is screwed, but I'd still like to know if its recoverable and which
file is the malformed one)

Did you run 'svnadmin verify' on the whole repository, or did you just
check the last revision? From the description, it sounds like you did
the latter. I'd recommend you check the whole repository. It can help
tell you which revision is broken.

-John

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1892514

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnsync malformed file

Posted by "Bolstridge, Andrew" <an...@intergraph.com>.
Ah! I fixed it.

Ok, the issue had nothing to do with any revision, what happened was the
power outage interrupted writing to the revprops for both the revision
svnsync was writing, but also revprop 0.

Both these files contained a load of 0s (as in \0).

Fixing my svnsync to continue was as easy as initialising a new
destination with the original repo (so I have a revprop 0 with most of
the correct values), then copying revprop 0 from there to my broken
destination. Edit the 2 revprops svn:sync-currently-copying and
svn:sync-last-merged-rev to the last-but-one revision (note: also edit
the V <length> value before the property, and don't forget to delete the
last corrupt revprop and rev files)

I did this, and and off it went happily syncing from where it left off. 


I wonder if revprops aren't as securely transactional as the rest of the
system, or that svnadmin verify ignores them. 
I think svnadmin should check for valid revprops, and report on any that
are not valid. Another idea that would make life easier (as I worry that
my main repo might suffer the same fate one day) would be to provide an
interface to "backward-sync" a particular revision from my mirror back
to the main repo. If these 2 were available, it would make repairing a
corrupted repository very easy - run svnadmin verify to find the bad
revision/revprop, then copy that revision from a backup to the repo to
repair it (I know I could copy the files manually, but a lot of people
would prefer a tool to do it for them)

Thanks, Andy

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1892873

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnsync malformed file

Posted by "Bolstridge, Andrew" <an...@intergraph.com>.
I did the last thousand or so revisions. Running it on them all will take all day - my repo has 300,000 revisions, the sync had copied 200,000 of them.

I'll give it a go. Thanks.



> -----Original Message-----
> From: jszakmeister@gmail.com [mailto:jszakmeister@gmail.com] On Behalf
> Of John Szakmeister
> Sent: Wednesday, April 22, 2009 12:38 PM
> To: Bolstridge, Andrew
> Cc: users@subversion.tigris.org
> Subject: Re: svnsync malformed file
> 
> On Wed, Apr 22, 2009 at 6:32 AM, Bolstridge, Andrew
> <an...@intergraph.com> wrote:
> [snip]
> > (incidentally, I've just tried with svn itself, to list the
> repository
> > contents and it reports the same "malformed file" error. Obviously my
> > repo is screwed, but I'd still like to know if its recoverable and
> which
> > file is the malformed one)
> 
> Did you run 'svnadmin verify' on the whole repository, or did you just
> check the last revision?  From the description, it sounds like you did
> the latter.  I'd recommend you check the whole repository.  It can
> help tell you which revision is broken.
> 
> -John

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1859397

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svnsync malformed file

Posted by John Szakmeister <jo...@szakmeister.net>.
On Wed, Apr 22, 2009 at 6:32 AM, Bolstridge, Andrew
<an...@intergraph.com> wrote:
[snip]
> (incidentally, I've just tried with svn itself, to list the repository
> contents and it reports the same "malformed file" error. Obviously my
> repo is screwed, but I'd still like to know if its recoverable and which
> file is the malformed one)

Did you run 'svnadmin verify' on the whole repository, or did you just
check the last revision?  From the description, it sounds like you did
the latter.  I'd recommend you check the whole repository.  It can
help tell you which revision is broken.

-John

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1859023

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].