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

Re: Fwd: Re: ISSUE: "To many open files" not being logged by master server when sync fails.

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 24 May 2012 11:11:27 +0100

Kenneth Miles <kmiles_at_voyagergaming.com> writes:

> Yes i have tried both scenarios you have described. Do you need the
> strace output of both as it might be quite large.

Somebody has to debug the problem and I can't reproduce it. This is the
sort of thing I tried:

svnadmin create repo
svn mkdir -mm --parents file://`pwd`/repo/A/B/C
for i in `seq 2 6543`;do svnmucc -mm propset p $i file://`pwd`/repo/A/B/C;done
svn co file://`pwd`/repo wc
for i in `seq 0 1200`;do dd if=/dev/urandom of=wc/A/B/C/f$i count=1;done
svn add wc/A/B/C/f*
svn ci -mm wc
ulimit -n 256
svnserve -Tdr.
svnadmin create repo2
ln -s /bin/true repo2/hooks/pre-revprop-change
echo "[general]" >> repo2/conf/svnserve.conf
echo "anon-access=write" >> repo2/conf/svnserve.conf
svnsync init svn://localhost/repo2 svn://localhost/repo
svnsync sync svn://localhost/repo2 svn://localhost/repo

but the sync always works. Perhaps you can come up with a recipe that
reproduces the problem? Failing that perhaps you can debug the problem
itself? if we take a bit of the strace:

[pid 16437] open("/tmp/work/svn/egm/db/revs/8/8093", O_RDONLY|O_LARGEFILE) = 783
[pid 16437] open("/tmp/work/svn/egm/db/revs/8/8965", O_RDONLY|O_LARGEFILE) = 784
[pid 16437] close(784) = 0
[pid 16437] open("/tmp/work/svn/egm/db/revs/8/8965", O_RDONLY|O_LARGEFILE) = 784
[pid 16437] close(784) = 0
[pid 16437] open("/tmp/work/svn/egm/db/revs/8/8271", O_RDONLY|O_LARGEFILE) = 784
[pid 16437] open("/tmp/work/svn/egm/db/revs/8/8840", O_RDONLY|O_LARGEFILE) = 785
[pid 16437] close(785) = 0
[pid 16437] open("/tmp/work/svn/egm/db/revs/8/8840", O_RDONLY|O_LARGEFILE) = 785
[pid 16437] close(785) = 0
[pid 16437] open("/tmp/work/svn/egm/db/revs/8/8093", O_RDONLY|O_LARGEFILE) = 785
[pid 16437] open("/tmp/work/svn/egm/db/revs/8/8840", O_RDONLY|O_LARGEFILE) = 786
[pid 16437] close(786) = 0
[pid 16437] open("/tmp/work/svn/egm/db/revs/8/8840", O_RDONLY|O_LARGEFILE) = 786
[pid 16437] close(786) = 0
[pid 16437] open("/tmp/work/svn/egm/db/revs/5/5984", O_RDONLY|O_LARGEFILE) = 786
[pid 16437] open("/tmp/work/svn/egm/db/revs/8/8840", O_RDONLY|O_LARGEFILE) = 787
[pid 16437] close(787) = 0

we see that some of the rev files are opened and closed whereas others
are opened and left open. We need to find out why the files held open
are not closed. All the rev files are opened in the function
open_pack_or_rev_file--the tricky bit is it to identify an open without
a corresponding close. Then we want the stack trace for the open as
shown by gdb.

-- 
Philip
Received on 2012-05-24 12:12:10 CEST

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