I'm getting random regression test fails in parallel mode due to a race
in svn_atomic_namespace__create:

W: ERROR:  dump failed: ../src/subversion/libsvn_fs_fs/fs_fs.c:3220: 
(apr_err=160052)
W: ERROR:  dump failed: svnadmin: E160052: Revprop caching for 
'svn-test-work/local_tmp/repos/db' disabled because SHM infrastructure for 
revprop caching failed to initialize.
W: ERROR:  dump failed: ../src/subversion/libsvn_fs_fs/fs_fs.c:3171: 
(apr_err=17)
W: ERROR:  dump failed: ../src/subversion/libsvn_subr/named_atomic.c:430: 
(apr_err=17)
W: ERROR:  dump failed: svnadmin: E000017: Can't get shared memory for named 
atomics: File exists

The code does

  /* First, look for an existing shared memory object.  If it doesn't
   * exist, create one.
   */
  apr_err = apr_shm_attach(&shared_mem, shm_name, result_pool);
  if (apr_err)
    {
      apr_err = apr_shm_create(&shared_mem,
                               sizeof(*new_ns->data),
                               shm_name,
                               result_pool);
      if (apr_err)
        return unlock(&new_ns->mutex,
                      svn_error_wrap_apr(apr_err,
                          _("Can't get shared memory for named atomics")));

and between the failed attach and the create another process could
create the segment.

I can't see any order in which we can do attach/create that doesn't have
a similar race.  I think the best solution is a short loop trying
attach-create a few times before giving up.

-- 
Join us this October at Subversion Live 2012
http://www.wandisco.com/svn-live-2012

Reply via email to