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

Re: SVN repository possible race condition

From: Toby COllett <tcollett+lists_at_plan9.net.nz>
Date: Sat, 17 Jan 2009 10:19:56 +1300

Just a final email on the topic, this has been patched in the cifs vfs
module in the linux kernel, however it will be a while till this makes it
into mainstream distribution releases.

Toby

2009/1/7 Toby Collett
<tcollett+lists_at_plan9.net.nz<tcollett%2Blists_at_plan9.net.nz>
>

> Hi,
> I have finally had time to look into this further, and I can confirm that
> the results are reproduceable outside subversion, I have attached a little
> test application that triggers the same behaviour just if anyone is
> interested. I am following up with the samba guys now, hopefully will have
> some success there.
>
> Just to answer the questions below:
> Both samba server and client are linux.
> Not related to server load as at nominally the same time 1.4 and 1.5
> clients are hitting the 1.4 server and only 1.5 has issues.
>
> Toby
>
> 2008/10/3 John Szakmeister <john_at_szakmeister.net>
>
>>
>> After staring at this for a while I think I know what the issue is...
>> although not technically Subversion's fault. Is your Samba share
>> hosted on Windows by chance? What I believe is happening is that
>> apr_dir_read() is returning the 'text-base' dir twice. Apparently
>> some implementations of readdir() are broken when you delete entries.
>> So on anything other than Windows, there is an attempt to rewind the
>> directory. This causes text-base to show up again, and it's a
>> directory when open() is called but has probably been removed by the
>> time getdents() is called. So we've managed to hit a race condition.
>> :-(
>>
>> Unfortunately, I'm not sure what the best solution is here. We
>> already know that the entry we were trying to remove is a directory...
>> so maybe the best answer is to check for that and skip the entry if
>> the remove fails with ENOTDIR?
>>
>> FWIW, not much of this has changed since 1.4... have you upgraded
>> whatever is hosting the share since then? Of course, if the workload
>> of the server has picked up, it could be that you were "winning" the
>> race and just not seeing the issue.
>>
>> -John
>>
>
>
>
> --
> This email is intended for the addressee only and may contain privileged
> and/or confidential information
>

-- 
This email is intended for the addressee only and may contain privileged
and/or confidential information
Received on 2009-01-27 22:55:46 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.