You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Robert Feldt <Ro...@htu.se> on 2004/09/25 21:34:33 UTC

DB_RUNRECOVERY but recovery attempts do not work

Hi,

I've been running svn on several projects for a long time and been very 
happy with it. However, now I seem to have problems with several of my 
repositories and I can't seem to get back to a consistent db state. Here 
is a transcript of what I've tried:

svn@trind repos $ svnadmin dump rubysharp > dump_rubysharp
svn: Berkeley DB error while opening 'nodes' table for filesystem 
rubysharp/db:
DB_RUNRECOVERY: Fatal error, run database recovery
svn@trind repos $ svnadmin recover rubysharp
Please wait; recovering the repository may take some time...
svn: DB_RUNRECOVERY: Fatal error, run database recovery
svn@trind repos $ db_recover -h rubysharp/db
db_recover: Ignoring log file: rubysharp/db/log.0000000023: unsupported 
log vers
ion 7
db_recover: PANIC: Invalid argument
db_recover: DBENV->open: DB_RUNRECOVERY: Fatal error, run database recovery
svn@trind repos $ db_recover -V
Sleepycat Software: Berkeley DB 3.2.9: (January 24, 2001)
svn@trind repos $ svnadmin --version
svnadmin, version 1.0.0
   compiled Mar 25 2004, 02:23:49

Copyright (C) 2000-2004 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/

Granted, I haven't been updating the subversion version so I'm still at 
1.0 but do I really have to scrap my changes from the last week and 
restart from the latest backupped state (ok, I should take backups more 
often but anyway)? This is not good; I don't want to be forced back to cvs!

I'd also be interested in knowing what could have caused this.

Thanks for any ideas,

Robert Feldt


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

Re: DB_RUNRECOVERY but recovery attempts do not work

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Robert Feldt wrote:

> I don't understand why this worked but I imagine it could have been due 
> to a file not being closed properly? Could also have something to do 
> with access rights on the repo.

The read/write permissions on the repo are most likely the cause.

-garrett

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

Re: DB_RUNRECOVERY but recovery attempts do not work

Posted by Robert Feldt <Ro...@htu.se>.
Garrett Rooney wrote:

>> Thanks for your answer; that sounds reasonable. Is there some way to 
>> find out which version that is or should any 4.x version work?
>
>
> Please keep questions CCing the list, so others can learn from the 
> answers...
>
Oops, sorry.

> The answer to your question depends on your operating system.  On most 
> unix systems you can run 'ldd /path/to/svnadmin' to see what libraries 
> it's linked against.  Then you need to find the version of db_recover 
> that came with that version of berkeley db (it'll probably be 
> something like db4_recover or db42_recover).  On Mac OS X you'd do 
> 'otool -L /path/to/svnadmin', which should show you the same information.
>
Thanks but it didn't help running db_recover in the repository. I tested 
several different versions of Berkeley DB without any luck. However, 
after having copied the repository with a simple "copy -R repo t" I 
could run "svnadmin recover t" on the copy and it was recovered with all 
revisions intact. I then simply moved the temp reposotory back as the 
original one and everything works nicely again. This same procedure 
worked for several affected repositories.

I don't understand why this worked but I imagine it could have been due 
to a file not being closed properly? Could also have something to do 
with access rights on the repo.

Thanks for your help,

Robert Feldt


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

Re: DB_RUNRECOVERY but recovery attempts do not work

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Robert Feldt wrote:

>> You're running the wrong version of db_recover.  It's from version 
>> 3.2.9 of Berkeley DB, you want the one from whatever version 
>> Subversion is linked with (4.x).
>>
> Thanks for your answer; that sounds reasonable. Is there some way to 
> find out which version that is or should any 4.x version work?

Please keep questions CCing the list, so others can learn from the 
answers...

The answer to your question depends on your operating system.  On most 
unix systems you can run 'ldd /path/to/svnadmin' to see what libraries 
it's linked against.  Then you need to find the version of db_recover 
that came with that version of berkeley db (it'll probably be something 
like db4_recover or db42_recover).  On Mac OS X you'd do 'otool -L 
/path/to/svnadmin', which should show you the same information.

-garrett

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

Re: DB_RUNRECOVERY but recovery attempts do not work

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Robert Feldt wrote:
> Hi,
> 
> I've been running svn on several projects for a long time and been very 
> happy with it. However, now I seem to have problems with several of my 
> repositories and I can't seem to get back to a consistent db state. Here 
> is a transcript of what I've tried:
> 
> svn@trind repos $ svnadmin dump rubysharp > dump_rubysharp
> svn: Berkeley DB error while opening 'nodes' table for filesystem 
> rubysharp/db:
> DB_RUNRECOVERY: Fatal error, run database recovery
> svn@trind repos $ svnadmin recover rubysharp
> Please wait; recovering the repository may take some time...
> svn: DB_RUNRECOVERY: Fatal error, run database recovery
> svn@trind repos $ db_recover -h rubysharp/db
> db_recover: Ignoring log file: rubysharp/db/log.0000000023: unsupported 
> log vers
> ion 7
> db_recover: PANIC: Invalid argument
> db_recover: DBENV->open: DB_RUNRECOVERY: Fatal error, run database recovery
> svn@trind repos $ db_recover -V
> Sleepycat Software: Berkeley DB 3.2.9: (January 24, 2001)

You're running the wrong version of db_recover.  It's from version 3.2.9 
of Berkeley DB, you want the one from whatever version Subversion is 
linked with (4.x).

-garrett

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