You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by J Kramer <kr...@gmail.com> on 2007/07/31 23:41:14 UTC

File Corruption Problem

Hi.  First let me apologize to those of you who read the SVN Google
group.  This question is posted there, but it looks like few people read
that group (and this is a crucial problem).

I'm running SVN over Apache and having an issue.  It seems that
an older revision file (110) is corrupt.  We are on revision 998 right
now and haven't had any problems before this.  The on-site back ups
for this file are corrupt also (well, the files are okay, but empty, I
presume as a result of the original being corrupt).  There are some
older off-site backups that might be able to be used to restore.

My apache error log is as follows:

[Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Unable to
PUT new contents for /svn/PATTRepository/!svn/wrk/f312b441-4ca6-1045-
bbac-214dfd993366/PATT Development/trunk/PATT Libraries/Merged/SW,
GENERIC.LIX.  [403, #0]
[Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Could not
prepare to write the file  [500, #70014]
[Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Can't read
file 'E:\\SVN\\PATTRepository\\db\\revs\\110': End of file found
[500, #70014]
[Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Unable to
PUT new contents for /svn/PATTRepository/!svn/wrk/f312b441-4ca6-1045-
bbac-214dfd993366/PATT Development/trunk/PATT Libraries/Merged/SW,
GENERIC.LIX.  [403, #0]
[Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Could not
prepare to write the file  [500, #160012]
[Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Cannot
write to the prototype revision file of transaction '998-1' because a
previous representation is currently being written by this process
[500, #160012]

Why am I just getting this error message now?  I've committed this
file many times before this.  Is it because I had to reinstall SVN
recently?

Is there a way to fix this without recovering rev 110? I have all of the
new files in the repository.

Re: File Corruption Problem

Posted by J Kramer <kr...@gmail.com>.
All,

Thanks so much for your helpful suggestions.  Unfortunately, I left a few
details out when explaining this issue.  The disk that held the repository
first became corrupt ... then failed all together.  So I don't really even
have the corrupt file system.  Rather, I have a backup of that system after
it became corrupt.  Thus the file in question is simply empty, so no fsfs
file system tools can help :(

That's why I was probing in the direction of reconstructing the repository
using the info available.  I.e. all of the good revisions plus the current
state.  Basically, I wanted a way to reconstruct a valid revision
110--perhaps with the exact information gone, but one that was valid that
would allow us to move on.

We are still waiting for the off site backups so that we can hopefully get
the needed file which would make all of this moot, but not sure if the file
will be corrupt there either.

Anyway, thanks for all this help with this difficult situation.

John

On 8/1/07, eg <eg...@gmail.com> wrote:
>
> J Kramer wrote:
> > Hi Jonathan,
> >
> > Thanks so much for your help I really appreciate it.  I wrote a batch
> > file (yes this is Windows) to dump the revisions.  I'm not sure that I'm
> > doing it correctly, though.  I've tried doing it a couple of different
> > ways.  Here's an error that I'm getting:
> >
> > E:\SVN>svnadmin dump PATTRepository -r 111 --incremental  1>rep111
> > svnadmin: Can't set position pointer in file
> > 'PATTRepository\db\revs\110': An at
> > tempt was made to move the file pointer before the beginning of the
> file.
> >
> > E:\SVN>svnadmin dump PATTRepository -r 111 --deltas  1>rep111
> > svnadmin: Can't read file 'PATTRepository\db\revs\110': End of file
> found
> >
> > It looks like svnadmin dump is trying to read revision 110.  Is there a
> > way to run it that won't?  I thought that --deltas would?
> >
>
>
> First, I would try FsFsVerify which can be found at:
> http://www.szakmeister.net/blog/?page_id=16
>
> It may or may not be helpful in your case.
>
> If not:
> Next, read the following threads for a similar discuss / question
> http://thread.gmane.org/gmane.comp.version-control.subversion.user/67285
>
> It refers to some other posts in which someone was able to zero out the
> checksum to enable Dump / verify to get by.
>
>
>
>

Re: File Corruption Problem

Posted by eg <eg...@gmail.com>.
J Kramer wrote:
> Hi Jonathan,
> 
> Thanks so much for your help I really appreciate it.  I wrote a batch 
> file (yes this is Windows) to dump the revisions.  I'm not sure that I'm 
> doing it correctly, though.  I've tried doing it a couple of different 
> ways.  Here's an error that I'm getting:
> 
> E:\SVN>svnadmin dump PATTRepository -r 111 --incremental  1>rep111
> svnadmin: Can't set position pointer in file 
> 'PATTRepository\db\revs\110': An at
> tempt was made to move the file pointer before the beginning of the file.
> 
> E:\SVN>svnadmin dump PATTRepository -r 111 --deltas  1>rep111
> svnadmin: Can't read file 'PATTRepository\db\revs\110': End of file found
> 
> It looks like svnadmin dump is trying to read revision 110.  Is there a 
> way to run it that won't?  I thought that --deltas would?
> 


First, I would try FsFsVerify which can be found at:
http://www.szakmeister.net/blog/?page_id=16

It may or may not be helpful in your case.

If not:
Next, read the following threads for a similar discuss / question
http://thread.gmane.org/gmane.comp.version-control.subversion.user/67285

It refers to some other posts in which someone was able to zero out the 
checksum to enable Dump / verify to get by.



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

Re: File Corruption Problem

Posted by J Kramer <kr...@gmail.com>.
Hi Jonathan,

Thanks so much for your help I really appreciate it.  I wrote a batch file
(yes this is Windows) to dump the revisions.  I'm not sure that I'm doing it
correctly, though.  I've tried doing it a couple of different ways.  Here's
an error that I'm getting:

E:\SVN>svnadmin dump PATTRepository -r 111 --incremental  1>rep111
svnadmin: Can't set position pointer in file 'PATTRepository\db\revs\110':
An at
tempt was made to move the file pointer before the beginning of the file.

E:\SVN>svnadmin dump PATTRepository -r 111 --deltas  1>rep111
svnadmin: Can't read file 'PATTRepository\db\revs\110': End of file found

It looks like svnadmin dump is trying to read revision 110.  Is there a way
to run it that won't?  I thought that --deltas would?

John

On 8/1/07, Johnathan Gifford <jg...@wernervas.com> wrote:
>
> When we encounter our issue like this last year, it was due to hardware
> failure that corrupt about 12 revisions and didn't find for about six
> months at which we were about 4000 revision beyond.  Your 110 revision
> may not be the only revision that is bad.  At this point, you really
> need to try identifying each revision that is bad.  This will involve
> dumping incrementally every revision from 111 to HEAD.
>
> If your repository is FSFS, you can also inspect each revision in the
> repository in the db/revs directory of the repository.  If all the
> content is garbage for the revision file instead of being laid out
> logically, this is a bad revision, but the dump will be more accurate if
> the revision is bad.  We had a couple files that looked good, but
> wouldn't dump.  We think the end of file indicator was missing and the
> dump didn't know how to handle that and then erred out.
>
> There are couple tools available for FSFS to inspect and possibly
> repair a revision that are available on the Internet as well.  Just
> google for SVN FSFS and corruption and I think you'll find them.
>
> Do you have a support contract with someone like CollabNet?  Many
> support providers have tools they've developed internally to deal with
> issues like this.   I know CollabNet does and the fixed our revisions.
> If you have e-mails displaying the diffs for each revision committed,
> this will also help them reconstruct the revision.
>
> Johnathan
>
> >>> On Wed, Aug 1, 2007 at 12:34 PM, in message
> <99...@mail.gmail.com>, "J
> Kramer"
> <kr...@gmail.com> wrote:
> > It did.  I got the error:
> >
> > svnadmin: Can't set position pointer in file 'db\revs\110': An
> attempt was
> > made
> > to move the file pointer before the beginning of the file.
> >
> > I don't necessarily need to recover the deltas from that transaction.
> I
> > need to have a valid repository.  Also, I need the current files to
> be
> > correctly stored in the repository.  It is likely that most of that
> revision
> > has been subsumed by new commits anyway, but I don't know how to make
> the
> > repository whole again.
> >
> > Any help would be appreciated.  In the mean time, I'm trying to get
> my hands
> > on those offsite backups which will (hopefully) contain the revision
> in
> > uncorrupted form.
> >
> > John
> >
> > On 8/1/07, Johnathan Gifford <jg...@wernervas.com> wrote:
> >>
> >> Have you run 'svnadmin verify' on the repository yet?  Did it fail
> at
> >> that same revision number?
> >>
> >> Johnathan
> >>
> >> >>> On Tue, Jul 31, 2007 at  6:41 PM, in message
> >> <99...@mail.gmail.com>, "J
> >> Kramer"
> >> <kr...@gmail.com> wrote:
> >> > Hi.  First let me apologize to those of you who read the SVN
> Google
> >> > group.  This question is posted there, but it looks like few
> people
> >> read
> >> > that group (and this is a crucial problem).
> >> >
> >> > I'm running SVN over Apache and having an issue.  It seems that
> >> > an older revision file (110) is corrupt.  We are on revision 998
> >> right
> >> > now and haven't had any problems before this.  The on-  site back
> ups
> >> > for this file are corrupt also (well, the files are okay, but
> empty,
> >> I
> >> > presume as a result of the original being corrupt).  There are
> some
> >> > older off-  site backups that might be able to be used to
> restore.
> >> >
> >> > My apache error log is as follows:
> >> >
> >> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116]
> Unable
> >> to
> >> > PUT new contents for /svn/PATTRepository/!svn/wrk/f312b441-
> 4ca6-
> >> 1045-
> >> > bbac-  214dfd993366/PATT Development/trunk/PATT
> Libraries/Merged/SW,
> >> > GENERIC.LIX.  [403, #0]
> >> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Could
> >> not
> >> > prepare to write the file  [500, #70014]
> >> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Can't
> >> read
> >> > file 'E:\\SVN\\PATTRepository\\db\\revs\\110': End of file found
> >> > [500, #70014]
> >> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116]
> Unable
> >> to
> >> > PUT new contents for /svn/PATTRepository/!svn/wrk/f312b441-
> 4ca6-
> >> 1045-
> >> > bbac-  214dfd993366/PATT Development/trunk/PATT
> Libraries/Merged/SW,
> >> > GENERIC.LIX.  [403, #0]
> >> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Could
> >> not
> >> > prepare to write the file  [500, #160012]
> >> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116]
> Cannot
> >> > write to the prototype revision file of transaction '998-  1'
> because
> >> a
> >> > previous representation is currently being written by this
> process
> >> > [500, #160012]
> >> >
> >> > Why am I just getting this error message now?  I've committed
> this
> >> > file many times before this.  Is it because I had to reinstall
> SVN
> >> > recently?
> >> >
> >> > Is there a way to fix this without recovering rev 110? I have all
> of
> >> the
> >> > new files in the repository.
> >>
> >>
>
>

Re: File Corruption Problem

Posted by Johnathan Gifford <jg...@wernervas.com>.
When we encounter our issue like this last year, it was due to hardware
failure that corrupt about 12 revisions and didn't find for about six
months at which we were about 4000 revision beyond.  Your 110 revision
may not be the only revision that is bad.  At this point, you really
need to try identifying each revision that is bad.  This will involve
dumping incrementally every revision from 111 to HEAD.

If your repository is FSFS, you can also inspect each revision in the
repository in the db/revs directory of the repository.  If all the
content is garbage for the revision file instead of being laid out
logically, this is a bad revision, but the dump will be more accurate if
the revision is bad.  We had a couple files that looked good, but
wouldn't dump.  We think the end of file indicator was missing and the
dump didn't know how to handle that and then erred out.

There are couple tools available for FSFS to inspect and possibly
repair a revision that are available on the Internet as well.  Just
google for SVN FSFS and corruption and I think you'll find them.

Do you have a support contract with someone like CollabNet?  Many
support providers have tools they've developed internally to deal with
issues like this.   I know CollabNet does and the fixed our revisions. 
If you have e-mails displaying the diffs for each revision committed,
this will also help them reconstruct the revision.

Johnathan

>>> On Wed, Aug 1, 2007 at 12:34 PM, in message
<99...@mail.gmail.com>, "J
Kramer"
<kr...@gmail.com> wrote: 
> It did.  I got the error:
> 
> svnadmin: Can't set position pointer in file 'db\revs\110': An
attempt was
> made
> to move the file pointer before the beginning of the file.
> 
> I don't necessarily need to recover the deltas from that transaction.
 I
> need to have a valid repository.  Also, I need the current files to
be
> correctly stored in the repository.  It is likely that most of that
revision
> has been subsumed by new commits anyway, but I don't know how to make
the
> repository whole again.
> 
> Any help would be appreciated.  In the mean time, I'm trying to get
my hands
> on those offsite backups which will (hopefully) contain the revision
in
> uncorrupted form.
> 
> John
> 
> On 8/1/07, Johnathan Gifford <jg...@wernervas.com> wrote:
>>
>> Have you run 'svnadmin verify' on the repository yet?  Did it fail
at
>> that same revision number?
>>
>> Johnathan
>>
>> >>> On Tue, Jul 31, 2007 at  6:41 PM, in message
>> <99...@mail.gmail.com>, "J
>> Kramer"
>> <kr...@gmail.com> wrote:
>> > Hi.  First let me apologize to those of you who read the SVN
Google
>> > group.  This question is posted there, but it looks like few
people
>> read
>> > that group (and this is a crucial problem).
>> >
>> > I'm running SVN over Apache and having an issue.  It seems that
>> > an older revision file (110) is corrupt.  We are on revision 998
>> right
>> > now and haven't had any problems before this.  The on-  site back
ups
>> > for this file are corrupt also (well, the files are okay, but
empty,
>> I
>> > presume as a result of the original being corrupt).  There are
some
>> > older off-  site backups that might be able to be used to
restore.
>> >
>> > My apache error log is as follows:
>> >
>> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116]
Unable
>> to
>> > PUT new contents for /svn/PATTRepository/!svn/wrk/f312b441- 
4ca6-
>> 1045-
>> > bbac-  214dfd993366/PATT Development/trunk/PATT
Libraries/Merged/SW,
>> > GENERIC.LIX.  [403, #0]
>> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Could
>> not
>> > prepare to write the file  [500, #70014]
>> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Can't
>> read
>> > file 'E:\\SVN\\PATTRepository\\db\\revs\\110': End of file found
>> > [500, #70014]
>> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116]
Unable
>> to
>> > PUT new contents for /svn/PATTRepository/!svn/wrk/f312b441- 
4ca6-
>> 1045-
>> > bbac-  214dfd993366/PATT Development/trunk/PATT
Libraries/Merged/SW,
>> > GENERIC.LIX.  [403, #0]
>> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Could
>> not
>> > prepare to write the file  [500, #160012]
>> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116]
Cannot
>> > write to the prototype revision file of transaction '998-  1'
because
>> a
>> > previous representation is currently being written by this
process
>> > [500, #160012]
>> >
>> > Why am I just getting this error message now?  I've committed
this
>> > file many times before this.  Is it because I had to reinstall
SVN
>> > recently?
>> >
>> > Is there a way to fix this without recovering rev 110? I have all
of
>> the
>> > new files in the repository.
>>
>>

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

Re: File Corruption Problem

Posted by J Kramer <kr...@gmail.com>.
It did.  I got the error:

svnadmin: Can't set position pointer in file 'db\revs\110': An attempt was
made
to move the file pointer before the beginning of the file.

I don't necessarily need to recover the deltas from that transaction.  I
need to have a valid repository.  Also, I need the current files to be
correctly stored in the repository.  It is likely that most of that revision
has been subsumed by new commits anyway, but I don't know how to make the
repository whole again.

Any help would be appreciated.  In the mean time, I'm trying to get my hands
on those offsite backups which will (hopefully) contain the revision in
uncorrupted form.

John

On 8/1/07, Johnathan Gifford <jg...@wernervas.com> wrote:
>
> Have you run 'svnadmin verify' on the repository yet?  Did it fail at
> that same revision number?
>
> Johnathan
>
> >>> On Tue, Jul 31, 2007 at  6:41 PM, in message
> <99...@mail.gmail.com>, "J
> Kramer"
> <kr...@gmail.com> wrote:
> > Hi.  First let me apologize to those of you who read the SVN Google
> > group.  This question is posted there, but it looks like few people
> read
> > that group (and this is a crucial problem).
> >
> > I'm running SVN over Apache and having an issue.  It seems that
> > an older revision file (110) is corrupt.  We are on revision 998
> right
> > now and haven't had any problems before this.  The on- site back ups
> > for this file are corrupt also (well, the files are okay, but empty,
> I
> > presume as a result of the original being corrupt).  There are some
> > older off- site backups that might be able to be used to restore.
> >
> > My apache error log is as follows:
> >
> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Unable
> to
> > PUT new contents for /svn/PATTRepository/!svn/wrk/f312b441- 4ca6-
> 1045-
> > bbac- 214dfd993366/PATT Development/trunk/PATT Libraries/Merged/SW,
> > GENERIC.LIX.  [403, #0]
> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Could
> not
> > prepare to write the file  [500, #70014]
> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Can't
> read
> > file 'E:\\SVN\\PATTRepository\\db\\revs\\110': End of file found
> > [500, #70014]
> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Unable
> to
> > PUT new contents for /svn/PATTRepository/!svn/wrk/f312b441- 4ca6-
> 1045-
> > bbac- 214dfd993366/PATT Development/trunk/PATT Libraries/Merged/SW,
> > GENERIC.LIX.  [403, #0]
> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Could
> not
> > prepare to write the file  [500, #160012]
> > [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Cannot
> > write to the prototype revision file of transaction '998- 1' because
> a
> > previous representation is currently being written by this process
> > [500, #160012]
> >
> > Why am I just getting this error message now?  I've committed this
> > file many times before this.  Is it because I had to reinstall SVN
> > recently?
> >
> > Is there a way to fix this without recovering rev 110? I have all of
> the
> > new files in the repository.
>
>

Re: File Corruption Problem

Posted by Johnathan Gifford <jg...@wernervas.com>.
Have you run 'svnadmin verify' on the repository yet?  Did it fail at
that same revision number?

Johnathan

>>> On Tue, Jul 31, 2007 at  6:41 PM, in message
<99...@mail.gmail.com>, "J
Kramer"
<kr...@gmail.com> wrote: 
> Hi.  First let me apologize to those of you who read the SVN Google
> group.  This question is posted there, but it looks like few people
read
> that group (and this is a crucial problem).
> 
> I'm running SVN over Apache and having an issue.  It seems that
> an older revision file (110) is corrupt.  We are on revision 998
right
> now and haven't had any problems before this.  The on- site back ups
> for this file are corrupt also (well, the files are okay, but empty,
I
> presume as a result of the original being corrupt).  There are some
> older off- site backups that might be able to be used to restore.
> 
> My apache error log is as follows:
> 
> [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Unable
to
> PUT new contents for /svn/PATTRepository/!svn/wrk/f312b441- 4ca6-
1045-
> bbac- 214dfd993366/PATT Development/trunk/PATT Libraries/Merged/SW,
> GENERIC.LIX.  [403, #0]
> [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Could
not
> prepare to write the file  [500, #70014]
> [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Can't
read
> file 'E:\\SVN\\PATTRepository\\db\\revs\\110': End of file found
> [500, #70014]
> [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Unable
to
> PUT new contents for /svn/PATTRepository/!svn/wrk/f312b441- 4ca6-
1045-
> bbac- 214dfd993366/PATT Development/trunk/PATT Libraries/Merged/SW,
> GENERIC.LIX.  [403, #0]
> [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Could
not
> prepare to write the file  [500, #160012]
> [Tue Jul 31 14:12:43 2007] [error] [client 131.252.150.116] Cannot
> write to the prototype revision file of transaction '998- 1' because
a
> previous representation is currently being written by this process
> [500, #160012]
> 
> Why am I just getting this error message now?  I've committed this
> file many times before this.  Is it because I had to reinstall SVN
> recently?
> 
> Is there a way to fix this without recovering rev 110? I have all of
the
> new files in the repository.

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