Edgewall Software
Modify

Ticket #741 (closed defect: duplicate)

Opened 8 years ago

Last modified 6 years ago

Database continually becomes corrupt

Reported by: jacob@… Owned by: jonas
Priority: high Milestone: 0.8
Component: general Version: 0.7.1
Severity: critical Keywords: subversion database corruption
Cc:
Release Notes:
API Changes:

Description

On a fairly regular basis — seems like around once every few hours — something about trac causes the subversion database to corrupt, requiring a svnadmin recover to fix it.

This sounds like its related to Ticket #571 (although we're not on Windows); I've tried the umask/chmod g+s stuff that bje@apnic.net suggested on that ticket, and it's slowed down the rate of these errors, but not completely stopped them.

The error we keep getting is: ('Berkeley DB error while opening environment for filesystem /home/svn/repository/db:\nDB_RUNRECOVERY: Fatal error, run database recovery', 160029).

We're running Trac 0.7.1 (as a CGI) under Apache 2.0 on RedHat? ES with Subversion 1.0.6.

Attachments

Change History

comment:1 Changed 8 years ago by jacob@…

Based on some help from #trac, I've done the following:

  1. chmod -R g+s /home/svn/repository

  2. Made sure that all local users are umask 002 (by adding that line to /etc/bashrc)

  3. Replaced svnserve with a wrapper that makes sure svnserve runs umask 002:

    #!/bin/sh
    umask 002
    /usr/bin/svnserve-real "$@"
    

This has (so far) seemed to work pretty well...

comment:2 Changed 8 years ago by duff@…

I had the same problem. I didn't want to change the default umask for all my processes so I added the following to the trac.cgi file:

import os; os.umask(007)

before the try statement. It solved the last of my problems (like you I got improved results from using the setgid bit on the db directory and changing svn/svnserve to scripts which set the umask).

tom


Thomas Duff
duff@…

comment:3 Changed 8 years ago by jacob@…

Interesting…

I'm not sure I totally understand how umasks work, but did you mean 002 instead of 007?

comment:4 Changed 8 years ago by jacob@…

  • Priority changed from normal to high

Just to follow up… the above tricks have helped slow down the frequency somewhat, but this is still happening on a far-to-regular basis.

comment:5 Changed 8 years ago by jacob@…

Tickets #93 and #223 seem to be related to this one.

comment:6 Changed 8 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 8 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

Sorry, I didn't think it would actually let me close the ticket.

comment:8 Changed 8 years ago by anonymous

Here's more on the problem, with details of a workaround:

http://mjtsai.com/blog/2004/09/08/migrating-to-trac/

comment:9 Changed 8 years ago by hendrik@…

I'm encountering the same problem, and the permissions are all set up correctly as far as I can see (including the umask for all involved processes).

Using Trac 0.7.1 (CGI on Apache1) with Subversion 1.0.6 (Apache2 module). OS is Debian Sarge.

comment:10 Changed 8 years ago by daniel

  • Resolution set to duplicate
  • Status changed from reopened to closed

This is a dupe of #571, and still not a Trac bug. Please read the comment trail on #571.

comment:11 Changed 8 years ago by daniel

  • Milestone set to 0.8
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.