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

Re: strange E/W200033 (b)locking error/warning when trying to modify a svn 1.8 working copy over SMB share

From: Tobias Bading <tbading_at_web.de>
Date: Wed, 09 Apr 2014 13:20:53 +0200

On 09.04.2014 12:19, Stefan Sperling wrote:
> On Wed, Apr 09, 2014 at 11:46:05AM +0200, Tobias Bading wrote:
>> Hi,
>>
>> follow-up regarding my problems with "database is locked" errors
when trying
>> to access a Subversion 1.8 working copy located on an AIX machine
remotely
>> via SMB from a GNU/Linux machine:
>>
>> - A Windows SMB share causes the same errors, so it's not specific
to Samba.
>>
>> - The problem can be circumvented by mounting the SMB share with option
>> 'nobrl'. From the mount.cifs(8) man page:
>>
>> nobrl
>> Do not send byte range lock requests to the server. This is
necessary
>> for certain applications that break with cifs style
mandatory byte
>> range locks (and most cifs servers do not yet support requesting
>> advisory byte range locks).
>>
>> I'm currently giving the 'nobrl' option in combination with
>>
>> [working-copy]
>> exclusive-locking-clients = svn
>>
>> in ~/.subversion/config a try. So far it seems to work just fine. :-)
>>
>> Tobias
>
> Hi Tobias,
>
> That's very nice!
>
> Would be able to prepare a patch against our FAQ to document this?
> Perhaps this entry could be extended:
> http://subversion.apache.org/faq.html#nfs
>
> Source code of the website is here:
> http://svn.apache.org/repos/asf/subversion/site/publish/

Well, so far I didn't do much testing. Basic things like Emacs running a
"svn resolved" when the last conflict marker is gone works, as does a "svn
update" from the Linux machine. But it might be possible that I've managed
to outmaneuver SQLite's locking mechanism(s) entirely. A "strace svn update"
shows that calls like

fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=1073741826,
len=510}) = 0

work now, which is to be expected of course if the 'nobrl' option basically
converted these calls into no-ops. I had hoped though that the
'exclusive-locking-clients = svn' option would cause svn to lock the wc.db
file completely, but I can't see anything like that in the trace, just a few
byte-range locks via fcntl(F_SETLK). So my guess would be that at the
moment, svn commands running on the Linux machine don't lock the working
copy on the AIX machine at all. That's fine for my use cases, but not
something I would recommend to others in general.
Received on 2014-04-09 13:21:33 CEST

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.