[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: Wed, 31 Oct 2012 13:54:05 +0000

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

$ 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?

Certified & Supported Apache Subversion Downloads:
Received on 2012-10-31 14:54:45 CET

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