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

Re: Race in svn_atomic_namespace__create

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 30 Oct 2012 00:18:45 +0000

Philip Martin <philip.martin_at_wandisco.com> writes:

> Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com> writes:
>
>> The creation code is protected by a repo-global lock/unlock pair.
>> So, in theory, there should be no race condition.
>
> Which lock and where? Does this lock out other processes?

I see it's db/rev-prop-atomicsMutex

>> It's on my TODO list to identify the root cause of this issue.

I can reproduce the error as follows:

   $ svnadmin create repo
   $ gdb -arg subversion/svnadmin/.libs/lt-svnadmin dump repo
   (gdb) b svn_atomic_namespace__create
   (gdb) run
   Breakpoint 1, svn_atomic_namespace__create
   (gdb) fin
   (gdb) kill
   (gdb) shell rm repo/db/rev-prop-atomicsShm
   (gdb) run
   Breakpoint 1, svn_atomic_namespace__create
   (gdb) cont

   ../src/subversion/libsvn_fs_fs/fs_fs.c:3220: (apr_err=160052)
   svnadmin: E160052: Revprop caching for 'repo/db' disabled because SHM infrastructure for revprop caching failed to initialize.
   ../src/subversion/libsvn_fs_fs/fs_fs.c:3171: (apr_err=17)
   ../src/subversion/libsvn_subr/named_atomic.c:455: (apr_err=17)
   svnadmin: E000017: Can't get shared memory for named atomics: File exists

Not sure I understand it.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2012-10-30 01:19:23 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.