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

Corrupted repository after power failure

From: Guido Anzuoni <Guido.Anzuoni_at_technomind.it>
Date: 2005-05-31 19:11:27 CEST

I have experience the first repository corruption in about 2 years of
usage.
The cause should be a power failure just after a commit.
I have found 3 corrupted repository at the next startup.
Running the command:
> svnadmin verify xxxxx
the output is the following for two of them:

svn: Berkeley DB error while checkpointing after Berkeley DB transaction
for filesystem adkext/db:
Invalid argument
svn: bdb: DB_ENV->log_flush: LSN of 3/1030804 past current end-of-log of
3/940055
svn: bdb: Database environment corrupt; the wrong log files may have
been removed or incompatible database files imported from another
environment
svn: bdb: strings: unable to flush page: 0
svn: bdb: txn_checkpoint: failed to flush the buffer cache Invalid
argument
 
The third one gives instead:
svn: Berkeley DB error while opening environment for filesystem jdo/db:
DB_RUNRECOVERY: Fatal error, run database recovery
svn: bdb: PANIC: fatal region error detected; run recovery
 
For this repos I issued the command
svnadmin recover <repos>
with the following output:
Repository lock acquired.
Please wait; recovering the repository may take some time...
 
Recovery completed.
The latest repos revision is 17.
 
Then I was able to dump & restore in a new repository.
 
For the other two, svnadmin recover gave the following output:
 
Repository lock acquired.
Please wait; recovering the repository may take some time...
svn: DB_RUNRECOVERY: Fatal error, run database recovery
svn: bdb: DB_ENV->log_flush: LSN of 9/406742 past current end-of-log of
9/339144
 
svn: bdb: Database environment corrupt; the wrong log files may have
been removed or incompatible database files imported from another
environment
svn: bdb: strings: unable to flush page: 0
svn: bdb: txn_checkpoint: failed to flush the buffer cache Invalid
argument
svn: bdb: PANIC: Invalid argument
 
but soon after the svnadmin verify <repos> gave:
* Verified revision 0.
* Verified revision 1.
* Verified revision 2.
* Verified revision 3.
* Verified revision 4.
* Verified revision 5.
* Verified revision 6.
....
with the correct total number of revisions
 
Again I was able to dump & restore in a new repository, restart apache
and resume normal operations without any further problem.
 
The question is:
did I followed a correct recovery procedure ?
I mean, should I trust the output of the various svnadmin command
(expecially dump & load) or should I try to export some
revisions ?
 
Thanks in advance,
Guido.
Received on Tue May 31 19:14:49 2005

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