SVN cannot get exclusive lock in file <repo> / db / txn-current-lock ': Bad address

After an hour, I cannot commit my svn repository. All repositories on my svn server are affected.

Updating and checking are working. Committing gives the following error:

  svn: Commit failed (details follow):
 svn: Can't get exclusive lock on file '/ var / svn / repos / <repo name> / db / txn-current-lock': 
   Bad address

The problem started when I created a new repository called "config", although I'm not sure if this caused the problems I am facing.

svnadmin recover <repo name> gives:

svnadmin: Can't get exclusive lock on file '<repo name>/db/write-lock': Invalid argument

Why does this lock problem occur?

[edit] The server got worse and started Segfaulting when trying to install updates. After a reboot, the whole problem seems to be resolved ...

+4
source share
3 answers

The repository is corrupt, see the Berkeley DB Recovery part of the SVN book. In short, you have to do;

 svnadmin recover /path/to/repos 
+1
source

I just ran into this problem after migrating SVN servers. For this, I used my own svn export and import commands. On the new server, I got the same error as the OP. I noticed that if I executed commit as sudo from the shell, it worked, but it didn’t work under my regular user account.

In the end, these were file permissions. I just quickly made chmod 777-R, which is great for me, because its only my local Dev-box at home.

svn recovery did not solve the problem. You cannot lock the file because you do not have write permissions.

0
source

I only encountered this problem this morning after moving the repository around the world. The problem was that root belonged to the directory on the server, but the web server was acting as a different user. Change the owner of the directory on the server using

 chown -R user:group /path/to/repository 

to solve the problem, replacing the "user" with the user who runs the web server, and the "group" should usually be the same as the user.

0
source

Source: https://habr.com/ru/post/1335817/


All Articles