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

SVN repository possible race condition

From: Toby Collett <tcollett+lists_at_plan9.net.nz>
Date: Tue, 23 Sep 2008 18:09:24 +1200

I have an SVN repository which gets into an inconsistent state and reports
errors along the following lines

Can't read directory 'db/config/.svn/tmp/text-base': Not a directory

svn cleanup will report the same errors, although the length of time between
errors and the folder it complains about change on consecutive runs.

The checkout is on a samba file share, and if I copy it to a local folder
the problem will go away.

running svn under strace show that subversion creates the folder, deletes
the folder and then proceeds to try open it.

stat("db/schemas/.svn/lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("db/schemas/.svn/tmp", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
brk(0x68f000) = 0x68f000
getdents(3, /* 2 entries */, 16384) = 48
getdents(3, /* 0 entries */, 16384) = 0
brk(0x68b000) = 0x68b000
close(3) = 0
rmdir("db/schemas/.svn/tmp") = 0
lstat("db/schemas/.svn/lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mkdir("db/schemas/.svn/tmp", 0777) = 0
lstat("db/schemas/.svn/lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

*mkdir("db/schemas/.svn/tmp/text-base", 0777) = 0*

lstat("db/schemas/.svn/lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mkdir("db/schemas/.svn/tmp/prop-base", 0777) = 0
lstat("db/schemas/.svn/lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mkdir("db/schemas/.svn/tmp/props", 0777) = 0
unlink("db/schemas/.svn/lock") = 0
lstat("db/.project", {st_mode=S_IFREG|0755, st_size=1960, ...}) = 0
open("db/.svn/prop-base/.project.svn-base", O_RDONLY) = 3
read(3, "K 14\nsvn:executable\nV 1\n*\nEND\n", 4096) = 30
close(3) = 0
open("db/.svn/prop-base/.project.svn-base", O_RDONLY) = 3
read(3, "K 14\nsvn:executable\nV 1\n*\nEND\n", 4096) = 30
close(3)
.
.
.
.
.
.
.
.
.
close(4) = 0
lstat("db/config/.svn/lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("db/config/.svn/tmp/entries", O_WRONLY|O_CREAT|O_EXCL, 0666) = 3
write(3, "9\n\ndir\n3818\nhttps://svn/svn/kryt"..., 695) = 695
close(3) = 0
rename("db/config/.svn/tmp/entries", "db/config/.svn/entries") = 0
lstat("db/config/.svn/entries", {st_mode=S_IFREG|0644, st_size=695, ...}) =
0
chmod("db/config/.svn/entries", 0444) = 0
open("db/config/.svn/KILLME", O_RDONLY) = -1 ENOENT (No such file or
directory)
lstat("db/config/.svn/log", 0x7fffca82ac70) = -1 ENOENT (No such file or
directory)
lstat("db/config/.svn", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lstat("db/config/.svn/lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("db/config/.svn/tmp", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(3, /* 5 entries */, 16384) = 144
open("db/config/.svn/tmp/text-base",
O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(4, /* 2 entries */, 16384) = 48
getdents(4, /* 0 entries */, 16384) = 0
close(4) = 0
*rmdir("db/config/.svn/tmp/text-base") = 0*
open("db/config/.svn/tmp/props", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) =
4
fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(4, /* 2 entries */, 16384) = 48
getdents(4, /* 0 entries */, 16384) = 0
close(4) = 0
rmdir("db/config/.svn/tmp/props") = 0
open("db/config/.svn/tmp/prop-base",
O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(4, /* 2 entries */, 16384) = 48
getdents(4, /* 0 entries */, 16384) = 0
close(4) = 0
rmdir("db/config/.svn/tmp/prop-base") = 0
getdents(3, /* 0 entries */, 16384) = 0
lseek(3, 0, SEEK_SET) = 0
getdents(3, /* 5 entries */, 16384) = 144
*open("db/config/.svn/tmp/text-base",
O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 4*
fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(4, 0x67f9b8, 16384) = -1 ENOTDIR (Not a directory)
select(0, NULL, NULL, NULL, {1, 30417}) = 0 (Timeout)
write(2, "svn: Can\'t read directory \'db/co"..., 74svn: Can't read
directory 'db/config/.svn/tmp/text-base': Not a directory
) = 74
close(4) = 0
close(3) = 0
exit_group(1) = ?
Process 24312 detached

subversion install from ubuntu hardy backports

svn --version
svn, version 1.5.1 (r32289)
   compiled Sep 4 2008, 18:45:31

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (
http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using
Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* 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

Does anyone have any pointers as to what is wrong, is this a genuine bug? we
havent seen any of this sort of behaviour under subversion 1.4

Thanks,
Toby Collett

-- 
This email is intended for the addressee only and may contain privileged
and/or confidential information
Received on 2008-09-23 08:09:53 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.