[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-19 15:50:29 CEST

On 2004-10-19 15:12+0200, Federico Di Gregorio wrote:

> after some time. note that we have the db directory with g+sw
> permissions, apache with umask 002 and the twisted server running the
> svnlook widget code member of the www-data group (primary group for
> apache). after some web page accesses and some commits the system starts
> to wedge.

This sounds like permission problems.

> "shut down apache, svnadmin recover, start apache" can be
> repeated from 5 to 10 times then there is the unrecoverable corruption.

This should not happen, How did you run recover?

> > So if you do 'head -n 2 db/nodes' you will get something like that:
> >
> > > > svn: File not found: revision '531', path 'psycopg'
> > > > <EE><91>^^^@I^C^@^@d^UaA^>^@^@^@^@^@^@^@^@^@^@^B^@^@^@^@^@^@^@ ^@^
>
> yes. i can send the corrupted archive if anybody bothers.

Your repo doesn't matter, there should not be that 'svn: file not
found...' string in the 'db/node' at the first place. The file is
Berkeley database file, and you just don't add some random data to it,
and hope that you can go with it.

>
> I attached the code to this mail.

Could you try that patch:

--- svn.py~ 2004-10-19 07:29:07.130995421 -0600
+++ svn.py 2004-10-19 07:48:01.060027475 -0600
@@ -52,10 +52,12 @@
             cmd += ' '+self._svn_path
         try:
            os.umask(0002)
- pipe = os.popen(cmd, 'r')
- return [x.strip() for x in pipe.readlines()]
+ (infile, outfile, errfile) = os.popen3(cmd, 'r')
+ return [x.strip() for x in outfile.readlines()]
         finally:
- pipe.close()
+ infile.close()
+ outfile.close()
+ errfile.close()

     def _get_last_revision(self):
         """Get last revision number for given path."""

If this helps, then we have to find why it (svn@r10819) is still
happenning:

Couple of reasons:

1) You have old libraries around, and you are not using 1.0.9's
   version of libsvn_subr. In fact, what 'locate libsvn_subr' tells?

2) There is a similar bug still lurking somewhere

3) Something else in your system (or in svn)

I will try to reproduce the problem with your py-script.

BR, Jani

-- 
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 19 15:51:09 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.