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

Re: BDB problem, caused by copying repository

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 25 Mar 2014 13:24:09 -0400

On 03/25/2014 12:30 PM, Bert Huijben wrote:
> Hi,
>
> On the OpenBSD bot I see a BDB test failure.
>
> [[[
> subversion/tests/libsvn_wc/op-depth-test.c:9617,
> subversion/tests/libsvn_wc/utils.c:498,
> subversion/libsvn_client/relocate.c:251,
> subversion/libsvn_wc/relocate.c:165,
> subversion/libsvn_client/relocate.c:108,
> subversion/libsvn_client/util.c:279,
> subversion/libsvn_client/ra.c:475,
> subversion/libsvn_client/ra.c:454,
> subversion/libsvn_ra/ra_loader.c:485:
> (apr_err=SVN_ERR_RA_CANNOT_CREATE_SESSION)
> svn_tests: E170013: Unable to connect to a repository at URL
> 'file:///home/buildslave16/slave16/bb-openbsd/build/subversion/tests/libsvn_
> wc/svn-test-work/repositories/repo_wc_copy-2'
> subversion/libsvn_ra_local/ra_plugin.c:589,
> subversion/libsvn_ra_local/split_url.c:55:
> (apr_err=SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED)
> svn_tests: E180001: Unable to open repository
> 'file:///home/buildslave16/slave16/bb-openbsd/build/subversion/tests/libsvn_
> wc/svn-test-work/repositories/repo_wc_copy-2'
> subversion/libsvn_repos/repos.c:1466,
> subversion/libsvn_fs/fs-loader.c:512,
> subversion/libsvn_fs_base/fs.c:611: (apr_err=SVN_ERR_FS_BERKELEY_DB)
> svn_tests: E160029: Berkeley DB error for filesystem
> '/home/buildslave16/slave16/bb-openbsd/build/subversion/tests/libsvn_wc/svn-
> test-work/repositories/repo_wc_copy-2/db' while opening environment:
>
> subversion/libsvn_fs_base/bdb/env.c:679,
> subversion/libsvn_fs_base/bdb/env.c:646,
> subversion/libsvn_fs_base/bdb/env.c:562,
> subversion/libsvn_fs_base/bdb/bdb-err.c:62: (apr_err=SVN_ERR_FS_BERKELEY_DB)
> svn_tests: E160029: Invalid argument
> subversion/libsvn_fs_base/bdb/env.c:230: (apr_err=SVN_ERR_FS_BERKELEY_DB)
> svn_tests: E160029: bdb: DB_REGISTER limits processes to one open DB_ENV
> handle per environment
> FAIL: op-depth-test 88: repo_wc_copy
> ]]]
>
> This error is caused by copying the entire repository to a new location and
> then relocating a working copy to the new location.
>
> I would say that there must be some supported way to do this from the test
> suite, but:
> * I can't move the repository (as there are open files)
> * I can't hotcopy the repository (that somehow hangs)
> * And copying doesn't work either... see this error.
>
> Any BDB experts around that can find a way how to fix this?

It is definitely a requirement of our BDB integration that a given
process only attempt to hold open a single connection to the Berkeley DB
environment at a time, and it is the DB_REGISTER subsystem which
enforces that. I assume that what's happening is that your process
opens the original repository, copies the repository (which carries with
it the db.register file), and then upon trying to open the copied
repository runs into problems because BDB sees the PID in the
db.register file already. If this is the case, the solution should
simply be to ensure that you don't have the original repository open at
the time you copy it.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development
Received on 2014-03-25 18:24:54 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.