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

failed svnadmin recover attempt (Berkeley DB)

From: Peter Thomas <pjt9_at_case.edu>
Date: 2007-01-08 04:27:54 CET

Dear Subversion Users:

I seem to have a corrupted svn database that svnadmin recover was not
able to handle.
Following the instructions in the SVN book, I am sending details to
the users list.

I have version 1.1.3 (r12730, compiled Apr 22 2005, 20:33:21) on my
server (under OS X Server 10.4)
and version 1.3.1 (r19032, compiled Apr 4 2006, 00:30:54) on my
client (under OS X 10.4.8).
As recently as Jan 3, 2007 I was able to commit changes.

Since then something has happened to the database, so that now (Jan
7) when I try making an update I get the following error:

> localmachine:/Users/Shared/projects/multiunit pjthomas$ svn up
> Password:
> subversion/libsvn_fs_base/bdb/bdb-err.c:74: (apr_err=160029)
> svn: Berkeley DB error while opening environment for filesystem /
> projects/multiunit/db:
> DB_RUNRECOVERY: Fatal error, run database recovery
> subversion/libsvn_fs_base/fs.c:312: (apr_err=0)
> svn: bdb: PANIC: fatal region error detected; run recovery

So I logged into the server (as the owner of svn) and ran svnadmin
recover <path>,
which generated more panic:

> server:/projects/multiunit svnowner$ svnadmin recover ./
> Repository lock acquired.
> Please wait; recovering the repository may take some time...
> svn: DB_RUNRECOVERY: Fatal error, run database recovery
> svn: bdb: db/log.0000004644: log file open failed: Permission denied
> svn: bdb: PANIC: Permission denied
> svn: bdb: DB_ENV->log_put: 4644: DB_RUNRECOVERY: Fatal error, run
> database recovery
> svn: bdb: txn_checkpoint: log failed at LSN [4644 328702]
> DB_RUNRECOVERY: Fatal error, run database recovery
> svn: bdb: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
> svn: bdb: db/log.0000004644: log file open failed: Permission denied
> svn: bdb: PANIC: Permission denied
> svn: bdb: DB_ENV->log_put: 4644: DB_RUNRECOVERY: Fatal error, run
> database recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery
> svn: bdb: PANIC: fatal region error detected; run recovery

I ran recovery again with the same result.

Here's what happened between Jan 3 and Jan 7, as far as I can
reconstruct:

On Jan 5, 2007 I initiated a backup of the repository /projects/
multiunit along with a few others to an external hardrive using
rsync. The database is about 4 Gb so it was going to take a while.
At about the same time one of my students tried making a new checkout
of /projects/multiunit. He mistakenly ssh'd into the server and
tried svn co svn+ssh://server_address/projects/multiunit from his
home directory. At that point I had neglected to add him the svn
authorized users group. Later he tried svn co svn+ssh://
server_address/projects/multiunit on his own local machine. After I
added him to the svn authorized user group on the server, he tried
again and got the Berkeley DB error I quoted above.

One other piece of information: the file db/log.0000004644 owner is
set to me (pjthomas) rather than the repository owner. But this is
true in other repositories that are not experiencing problems.

I plan to try restoring /projects/multiunit wholesale from my most
recent backup, and then checking in the files on my local machine
which are the most recent working copies. Any suggestions or ideas
about what went wrong with the database would be most welcome!

Sincerely,

Peter Thomas

Peter J. Thomas
Assistant Professor of Mathematics, Biology & Cognitive Science
Case Western Reserve University // Department of Mathematics
210 Yost Hall, 10900 Euclid Ave, Cleveland, OH 44106-7058
http://www.case.edu/artsci/math/thomas/thomas.html
pjt9 -- at -- case.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jan 11 23:01:55 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.