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

Re: FSFS caching and apr_thread_rwlock_t performance on Windows

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Mon, 2 Feb 2015 16:40:16 +0300

On 22 December 2014 at 23:16, Stefan Fuhrmann
<stefan.fuhrmann_at_wandisco.com> wrote:
> On Mon, Dec 22, 2014 at 2:09 PM, Ivan Zhakov <ivan_at_visualsvn.com> wrote:
>>
>> On 19 December 2014 at 19:26, Ivan Zhakov <ivan_at_visualsvn.com> wrote:
>> >
>> > On 19 December 2014 at 18:55, Branko Čibej <brane_at_wandisco.com> wrote:
>> > > On 19.12.2014 15:37, Ivan Zhakov wrote:
[...]
>>
>> So the best option will be to commit Bert's
>> > >> patch, but I cannot do this since I'm not APR committer :(
>> > >>
>> > >> Thoughts?
>> > >
>> > >
>> > >
>> > > Thanks for the reminder ... I remember that thread on apr-dev, but it
>> > > slipped my mind. If I don't review and commit Bert's patch in the next
>> > > week or so, feel free to send another nagging e-mail. :)
>> > >
>> > Will do!
>> >
>> > > FWIW, committing to APR trunk isn't enough: should be back-ported to
>> > > 1.6
>> > > and 1.5, too.
>> > >
>> > Yes, you are right. We need this to be backported to 1.6 and 1.5 APR
>> > branches.
>> >
>>
>> Btw it's not the only problem with APR read/write lock on Windows and
>> OS/2: rwlock sometimes allows a writer to take the lock while a reader
>> has the lock. The detailed explanation of possible race-condition
>> given in issue 45455 [1].
>>
>> Subversion 1.8.x is affected by this issue and FSFS membuffer cache
>> may be corrupted. I'm thinking about backporting r1611380 to 1.8.x or
>> switch back to simple mutex for FSFS caches for all platforms.
>
>
> We should backport r1611380. This probably needs
> a backport branch.
>
I agree that r1611380 is best workaround for 1.8.x, so I've nominated
it to 1.8.x.

But I think we should avoid using different synchronization mechanism
on different platforms in long-term (trunk and 1.9.x): it increases
number of configurations that need to be tested/covered. The recently
discovered named atomic problems on Windows [1] is a good example why
we should avoid platform specific code in Subversion if possible.

So I think we should either fix rwlock problems in APR on Windows or
switch back to simple mutex for FSFS caches for all platforms.

I'm fine with both approaches.

[1] http://svn.haxx.se/dev/archive-2014-09/0048.shtml

-- 
Ivan Zhakov
Received on 2015-02-02 14:43:38 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.