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

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: Thu, 03 Apr 2014 17:06:44 +0200

Hi.

I'm having a problem with a workflow that used to work fine with Subversion
1.6 but stopped working with Subversion 1.8:

I'm using GNU Emacs on an Ubuntu Lucid machine to edit files on an AIX
machine
over a SMB share. Emacs uses the Subversion 1.8.8 command line client to
perform vc-related operations. Read-only operations like showing the log or
diffs work fine. However, operations like "svn resolved" or "svn update"
fail,
e.g. "svn resolved" with

svn: warning: W200033: sqlite[S5]: database is locked

and "svn update" with

svn: E200033: Another process is blocking the working copy database, or the
underlying filesystem does not support file locking; if the working copy
is on
a network filesystem, make sure file locking has been enabled on the file
server
svn: E200033: sqlite[S5]: database is locked

Sounds like a nice error message with good hints to probable causes, right?
I was about to send an email to our IT people, but decided to run
"strace svn
resolved <file>" first to get more details. The output is a bit
confusing, at
least to me ;-). Hopefully someone can shed a little light on this.
Here's an
extract of the trace:

--- snip ---

[...]
lstat("/smb/<path-to-share>/<wc-root>/.svn/wc.db",
{st_mode=S_IFREG|0600, st_size=100352, ...}) = 0
stat("/smb/<path-to-share>/<wc-root>/.svn/wc.db", {st_mode=S_IFREG|0600,
st_size=100352, ...}) = 0
open("/smb/<path-to-share>/<wc-root>/.svn/wc.db", O_RDWR|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=100352, ...}) = 0
fstat(3, {st_mode=S_IFREG|0600, st_size=100352, ...}) = 0
stat("/smb/<path-to-share>/<wc-root>/.svn/wc.db", {st_mode=S_IFREG|0600,
st_size=100352, ...}) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "SQLite format 3\0\4\0\1\1\0@ \0\0\2\315\0\0\0b"..., 100) = 100
fcntl(3, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=1073741824,
len=1}) = 0
fcntl(3, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=1073741826,
len=510}) = 0
fcntl(3, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=1073741824,
len=1}) = 0
access("/smb/<path-to-share>/<wc-root>/.svn/wc.db-journal", F_OK) = -1
ENOENT (No such file or directory)
fstat(3, {st_mode=S_IFREG|0600, st_size=100352, ...}) = 0
access("/smb/<path-to-share>/<wc-root>/.svn/wc.db-wal", F_OK) = -1
ENOENT (No such file or directory)
fstat(3, {st_mode=S_IFREG|0600, st_size=100352, ...}) = 0
[...]
fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=1073741825,
len=1}) = 0
[...]
fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=1073741824,
len=1}) = 0

then 10 times

fcntl(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=1073741826,
len=510}) = -1 EACCES (Permission denied)
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, 0x7fff030c7ab0) = 0

followed by

svn: warning: W200033: sqlite[S5]: database is locked

--- snip ---

Three things are interesting/puzzling:
- fcntl F_SETLK with start=1073741824 when the wc.db file contains only
100352
   bytes? I found nothing in the fcntl man page about this. Is this allowed?
   What's the purpose?
- fcntl F_SETLK with start=1073741825 & len=1 works, but later it fails with
   start=1073741826 & len=510? So the locking over SMB works in
principle, but
   there's a problem a few bytes beyond the 1 GB boundary?!??
- "svn resolved" prints only a warning and returns 0, although the operation
   did fail, i.e. the file is still in conflict state. "svn update" on the
   other hand aborts with E200033 and returns 1. Shouldn't "svn resolved" do
   the same?

Details of the svn client:
svn, version 1.8.8 (r1568071)
    compiled Mar 28 2014, 09:55:49 on x86_64-unknown-linux-gnu

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
   - with Cyrus SASL authentication
   - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
   - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using
serf.
   - using serf 1.3.4
   - handles 'http' scheme
   - handles 'https' scheme

System information:

* running on x86_64-unknown-linux-gnu
   - Ubuntu 10.04.4 LTS (lucid) [Linux 2.6.32-44-generic]
* linked dependencies:
   - APR 1.5.0 (compiled with 1.5.0)
   - APR-Util 1.5.3 (compiled with 1.5.3)
   - SQLite 3.8.4.2 (static)

Any hints are welcome...

Thanks,
Tobias
Received on 2014-04-03 17:07:56 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.