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

Re: database corruption

From: Jani Averbach <jaa_at_jaa.iki.fi>
Date: 2004-10-05 17:28:40 CEST

On 2004-10-05 12:58+0200, Federico Di Gregorio wrote:
> Thank you very much for your answer. Here is some more information. Note
> that the svn repository run perfectly well for about 4 weeks before the
> first corruption. the corruption happened about 2h after we activated
> the "svnlook widget" (I can provide the code if necessary).

ok.

> libdb4.2 4.2.52-17 Berkeley v4.2 Database Libraries [runtime]
> apache2-mpm-pr 2.0.50-11 Traditional model for Apache2
> subversion 1.0.6-2 Advanced version control system (aka. svn)
> libapache2-svn 1.0.6-1.2.1 Apache modules for Subversion (aka. svn)

ok.

> I know db/nodes is corrupted because when I try "svnadmin recover" I
> get:
>
> Please wait; recovering the repository may take some time...
> svn: DB_RUNRECOVERY: Fatal error, run database recovery

yeah, see below.

> > - Have you tried to run recovery when your Apache has been up and running?
>
> no, obviously not. I shut down every other access method when trying
> recovery.

I just had to ask, no offence. =)

> > - Also which command printed the quoted error message?
>
> no command. the quote referred to the first few lines of the db/nodes
> file. i.e., "less db/nodes" shows:
>
> svn: File not found: revision '531', path 'psycopg'
> <EE><91>^^^@I^C^@^@d^UaA^>^@^@^@^@^@^@^@^@^@^@^B^@^@^@^@^@^@^@ ^@^
> ...

gasp, This is very, very wrong. Your node file, which is a
BerkeleyDB's database file contains an error output of svn command
line tool.

So how this cmdline error message got there in first place?

There was (and still is in your version (1.0.6)) an error which will
cause this kind of repository corruption if filedescriptors
(stdout,stderr) are closed when e.g. svnadmin dump is runned[1]. The
fix are in r10819, r10855@trunk, and they were backported to the 1.0.x
and released in 1.0.7. The fix was for lib_subr/cmdline.c, so this
same case should be true also for svnlook.

Could you try to upgrade your system at least to the 1.0.7 version?
or take extra care that your widged isn't messing with stdin/out/err?

Before you could sort out the exact reason for this, don't use your
widged, because its use is destroying your repository data
by unrecoverable way.

BR, Jani

1) http://www.contactor.se/~dast/svn/archive-2004-09/0137.shtml

-- 
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Oct 5 17:29:11 2004

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.