Skip to main content.

2007-Feb-08

My new subversion repo is already corrupt. Used it fine yesterday. It has over a hundred files and many commits. Today running "svn log" and "svn up" against it both resulted in:
svn: Berkeley DB error while opening environment for filesystem /var/svn-repos/dru-freebsd-basics/db:
DB_RUNRECOVERY: Fatal error, run database recovery
svn: bdb: PANIC: fatal region error detected; run recovery
So I had read that Berkeley DB is no good for Subversion. And maybe I should convert to Subversion's FSFS. But Berkeley DB is reliable for non-subversion. I also read that svn+ssh:// (which I am using) doesn't ensure that permissions are correct. Maybe that is my problem.

So I ran: "svnadmin recover" on the repo and it said "Recovery completed." But then I got "Permission denied" when trying to use it remotely, because my "umask" of "0022" made it so the db files are not writable by my group. So I fixed it and it worked.

Anyways, I don't want this to happen again. The suggestion is to use a wrapper around svnserve. So I moved it. And made a shell script to do "umask 002" first and then run the real svnserve.

Details at http://svnbook.red-bean.com/en/1.0/ch06s05.html.