[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: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Wed, 31 Oct 2012 15:24:10 +0100

On Wed, Oct 31, 2012 at 2:54 PM, Philip Martin
<philip.martin_at_wandisco.com>wrote:

> Philip Martin <philip.martin_at_wandisco.com> writes:
>
> > Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com> writes:
> >
> >> Excellent analysis, Philip! With r1404112, we use "plain"
> >> APR mmap code with almost no coding overhead.
> >> The only downside is that we now have a temporary
> >> file sitting in the db folder.
> >
> > Error handling needs attention:
> >
> > $ svnadmin create repo
> > $ svnadmin dump repo > /dev/null
> > $ chmod -rw repo/db/rev-prop-atomicsShm
> > $ svnadmin dump repo > /dev/null
> > Segmentation fault
>
> We are mmaping a 64k file, that's bigger than a disk block on lots of
> filesystems so updates are not atomic. Do we have to consider
> corruption:
>
> $ svnadmin create repo
> $ dd if=/dev/urandom of=repo/db/rev-prop-atomicsShm bs=64k count=1
> $ svnadmin verify repo
> Segmentation fault
> $ svnadmin recover repo
> Repository lock acquired.
> Please wait; recovering the repository may take some time...
>
> Recovery completed.
> The latest repos revision is 0.
> $ svnadmin verify repo
> Segmentation fault
>
> Perhaps recover should delete the file?
>

Done. Also, random data should no longer result in segfaults.

-- Stefan^2.

-- 
Certified & Supported Apache Subversion Downloads:
*
http://www.wandisco.com/subversion/download
*
Received on 2012-10-31 15:24:48 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.