You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by ja...@jrv.org on 2003/09/29 13:43:47 UTC

[repost] SVN commit error: svn_io_file_rename: can't move

This never appeared, so one more time.  As an update, the third commit
loop failed the same way after 253 iterations.  The last remaining
commit loop ran until 12,000 iterations when I killed it.

Of some interest is that I started the same test last night on a
dual-processor FreeBSD 5.1 box with a file:// repository and have one
failure so far:

svn: Item already exists in filesystem
svn: Commit failed (details follow):
svn: successor id `33.0.nx' (for `33.0.nt') already exists in filesystem '/home/james/svn-test/repos/db'
$ 

This failure happened after 218 iterations.  The other three commit
loops are still running at ~ 550 iterations and I'll let them go to
see if others drop out.

The Windows commit failure below was tested on two different systems;
the FreeBSD was a third piece of hardware.

---

C:\>svn --version
svn, version 0.29.0 (r6976)
   compiled Sep  8 2003, 00:45:48 

The test system is Windows XP with all service packs and critical
updates installed, Apache 2.0.48 and db 4.0.14, all distribution
binaries (not locally built).  The system is a 1.3 CPU P-4
(hyper-threading enabled).

Four DOS boxes are opened and the test script is run in each like this:

commit-test a 100
commit-test b 100
commit-test c 100
commit-test d 100

Each instance is using its own local and repository areas.

Of the four runners one failed after 52 iterations and another after
63, both with the error below.  The other two are still running after
158 and 160 iterations.

Sending        x99
Transmitting file data ....................................................................................................svn: A problem occurred; see later errors for details
svn: Commit succeeded, but other errors follow:
svn: Problem running log
svn: Error bumping revisions post-commit (details follow):
svn: in directory 'C:/src/svn-test/a'
svn: start_handler: error processing command 'committed' in 'C:/src/svn-test/a'
svn: error replacing text-base: x98
svn: Access is denied.
svn: svn_io_file_rename: can't move 'C:/src/svn-test/a/.svn/tmp/text-base/x98.svn-base' to 'C:/src/svn-test/a/.svn/text-base/x98.svn-base'

C:\src\svn-test\a>if not errorlevel 1 goto loop

C:\src\svn-test>

The test script below is for Windows NT.  What it does is create a
directory of N files and check it in to the repository.  In each
iteration all N files are modified and committed.


setlocal
set FILES=%2
set REPOS=http://127.0.0.1/svn/svn-test
set COUNT=0

mkdir %1
set I=1
:mkfiles
echo %COUNT% > %1\x%I%
set /a I=%I% + 1
if %I% leq %FILES% goto mkfiles

svn import -m - %1 %REPOS%/%1
rm -rf %1
svn checkout %REPOS%/%1 %1
cd %1

:loop
set /a COUNT=%COUNT% + 1
title %1 commit %COUNT%

set I=1
:files
echo %COUNT% > x%I%
set /a I=%I% + 1
if %I% leq %FILES% goto files

svn commit -m -
if not errorlevel 1 goto loop


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [repost] SVN commit error: svn_io_file_rename: can't move

Posted by Ben Collins-Sussman <su...@collab.net>.
james-tigris@jrv.org writes:

> > > svn: Access is denied.
> > > svn: svn_io_file_rename: can't move 'C:/src/svn-test/a/.svn/tmp/text-base/x98.svn-base' to 'C:/src/svn-test/a/.svn/text-base/x98.svn-base'

Isn't this the same old mysterious Win32 filesystem race-condition
bug?  The one we've been seeing for months, unable to reproduce
reliably?

It sure looks the same to me.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [repost] SVN commit error: svn_io_file_rename: can't move

Posted by "D.J. Heap" <dj...@dhiprovo.com>.
James Van Artsdalen wrote:
> One of my test systems isn't running any virus or indexing software
> or any other filesystem walker that I know of.
> 
> http://www.sysinternals.com/ has a free FileMon program that is a
> sort of poor man's ktrace.  It might be able to catch the bug in the act.
> 
> Can you point me to the patch or the line in SVN's source code of
> interest?  I have a repeatable test case; perhaps I can instrument it and
> learn something.
> 

The Windows 'access denied' problem is not limited to commits -- I've 
seen it on Checkouts, Updates, Merges, etc -- basically anything that 
touches the admin directory.  The other problem you posted about 'txn 
already exists' looks like it is a different problem and not related (it 
is server-side, while the 'access denied' is during post-commit 
client-side updating).

As far as I am aware, the 'access denied' problem only affects the 
rename and remove functions.  The patch I've been using to work around 
it is attached.  However, even with this patch we've had problems when 
virus scanning is on (100 retries still fails).

I'd be very happy if you can supply a script to reliably reproduce it on 
different machines -- it seems to vary widely with machine speed.  Or if 
you find any patterns or info from tracing.  I've spent an inordinate 
amount of time trying to reproduce it outside of Subversion so I can get 
a bug issue going with MS, but I've not yet succeeded and don't have a 
lot of time to work on it.

DJ



**********************************************************************
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email
in error please notify the system manager.

This footnote also confirms that this email message has been
swept by MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


Re: [repost] SVN commit error: svn_io_file_rename: can't move

Posted by mark benedetto king <mb...@lowlatency.com>.
On Mon, Sep 29, 2003 at 11:15:17AM -0500, James Van Artsdalen wrote:
> One of my test systems isn't running any virus or indexing software
> or any other filesystem walker that I know of.
> 
> http://www.sysinternals.com/ has a free FileMon program that is a
> sort of poor man's ktrace.  It might be able to catch the bug in the act.
> 
> Can you point me to the patch or the line in SVN's source code of
> interest?  I have a repeatable test case; perhaps I can instrument it and
> learn something.
> 

I can't find the patch that I'm thinking of, which had a bounded retry
loop (100 tries, IIRC), but this patch from D.J. Heap should get you
started in the right direction:

http://www.contactor.se/~dast/svn/archive-2003-05/2115.shtml

--ben


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [repost] SVN commit error: svn_io_file_rename: can't move

Posted by Philip Martin <ph...@codematters.co.uk>.
James Van Artsdalen <ja...@jrv.org> writes:

> Can you point me to the patch or the line in SVN's source code of
> interest?  I have a repeatable test case; perhaps I can instrument it and
> learn something.

Search the dev list for "access is denied" :-) There appear to be a
few fundamental filesystem operations that occasionally fail.  Efforts
to reproduce the problem outside of Subversion have not been
successful as far as I recall.  At one point CVS on Windows was
reported to suffer from the same problem.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [repost] SVN commit error: svn_io_file_rename: can't move

Posted by James Van Artsdalen <ja...@jrv.org>.
One of my test systems isn't running any virus or indexing software
or any other filesystem walker that I know of.

http://www.sysinternals.com/ has a free FileMon program that is a
sort of poor man's ktrace.  It might be able to catch the bug in the act.

Can you point me to the patch or the line in SVN's source code of
interest?  I have a repeatable test case; perhaps I can instrument it and
learn something.

> Date: Mon, 29 Sep 2003 11:49:02 -0400
> From: mark benedetto king <mb...@lowlatency.com>
> 
> On Mon, Sep 29, 2003 at 10:27:27AM -0500, james-tigris@jrv.org wrote:
> > A permission problem on the 253rd commit?  Keep in mind that every
> > test case worked many times before the failure.
> 
> This is a known issue with svn on Win32.  As far as we can tell, it is
> an race-condition in Win32 itself, and not in our usage of it.  We're
> pretty confident of this for several reasons.
> 
> There is a workaround patch floating around that simply retries the
> move several times before giving up.
> 
> This problem is likely to be exacerbated by products that walk into
> .svn directories, such as anti-virus and indexing programs.  You might
> try disabling those sorts of things if you have them turned on.
> 
> 
> --ben
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [repost] SVN commit error: svn_io_file_rename: can't move

Posted by mark benedetto king <mb...@lowlatency.com>.
On Mon, Sep 29, 2003 at 10:19:12AM -0500, kfogel@collab.net wrote:
> mark benedetto king <mb...@lowlatency.com> writes:
> > This is a known issue with svn on Win32.  As far as we can tell, it is
> > an race-condition in Win32 itself, and not in our usage of it.  We're
> > pretty confident of this for several reasons.
> > 
> > There is a workaround patch floating around that simply retries the
> > move several times before giving up.
> > 
> > This problem is likely to be exacerbated by products that walk into
> > .svn directories, such as anti-virus and indexing programs.  You might
> > try disabling those sorts of things if you have them turned on.
> 
> Thanks for the clarification, mbk.  If there is not a FAQ on this
> already, would you be willing to write one?  (Sounds like you know the
> most.)
> 

Actually, D.J. Heap knows the most, I think, but if he doesn't respond
in the next day or two, I'd be happy to write a FAQ entry.

--ben


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [repost] SVN commit error: svn_io_file_rename: can't move

Posted by kf...@collab.net.
mark benedetto king <mb...@lowlatency.com> writes:
> This is a known issue with svn on Win32.  As far as we can tell, it is
> an race-condition in Win32 itself, and not in our usage of it.  We're
> pretty confident of this for several reasons.
> 
> There is a workaround patch floating around that simply retries the
> move several times before giving up.
> 
> This problem is likely to be exacerbated by products that walk into
> .svn directories, such as anti-virus and indexing programs.  You might
> try disabling those sorts of things if you have them turned on.

Thanks for the clarification, mbk.  If there is not a FAQ on this
already, would you be willing to write one?  (Sounds like you know the
most.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [repost] SVN commit error: svn_io_file_rename: can't move

Posted by mark benedetto king <mb...@lowlatency.com>.
On Mon, Sep 29, 2003 at 10:27:27AM -0500, james-tigris@jrv.org wrote:
> A permission problem on the 253rd commit?  Keep in mind that every
> test case worked many times before the failure.

This is a known issue with svn on Win32.  As far as we can tell, it is
an race-condition in Win32 itself, and not in our usage of it.  We're
pretty confident of this for several reasons.

There is a workaround patch floating around that simply retries the
move several times before giving up.

This problem is likely to be exacerbated by products that walk into
.svn directories, such as anti-virus and indexing programs.  You might
try disabling those sorts of things if you have them turned on.


--ben


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [repost] SVN commit error: svn_io_file_rename: can't move

Posted by ja...@jrv.org.
A permission problem on the 253rd commit?  Keep in mind that every
test case worked many times before the failure.

I'm deeply suspicious about multiprocessor support.  I have not seen
any MP system, whatever OS or file:// or http://, successfully support
more than one committer or one importer in a stress test.

Are there other versions of db4 I should compile against and retest?
I'm using 4.0.14.

I'll try this again as soon as svnadmin recover finishes (13 hours and
still going).  I'm skeptical of the text of the error message: my gut
feeling is that it's a Red Herring.

> From: kfogel@collab.net
> Date: 29 Sep 2003 09:12:40 -0500
> 
> james-tigris@jrv.org writes:
> > Sending        x99
> > Transmitting file data ....................................................................................................svn: A problem occurred; see later errors for details
> > svn: Commit succeeded, but other errors follow:
> > svn: Problem running log
> > svn: Error bumping revisions post-commit (details follow):
> > svn: in directory 'C:/src/svn-test/a'
> > svn: start_handler: error processing command 'committed' in 'C:/src/svn-test/a'
> > svn: error replacing text-base: x98
> > svn: Access is denied.
> > svn: svn_io_file_rename: can't move 'C:/src/svn-test/a/.svn/tmp/text-base/x98.svn-base' to 'C:/src/svn-test/a/.svn/text-base/x98.svn-base'
> 
> Sure looks like some sort of permissions problem, but I'm not a
> Windows NT expert.  After the error, does 
> 
>    C:/src/svn-test/a/.svn/tmp/text-base/x98.svn-base
> 
> exist, and what happens if you try to rename it manually to
> 
>    C:/src/svn-test/a/.svn/text-base/x98.svn-base
> 
> ?
> 
> -Karl
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [repost] SVN commit error: svn_io_file_rename: can't move

Posted by kf...@collab.net.
james-tigris@jrv.org writes:
> Sending        x99
> Transmitting file data ....................................................................................................svn: A problem occurred; see later errors for details
> svn: Commit succeeded, but other errors follow:
> svn: Problem running log
> svn: Error bumping revisions post-commit (details follow):
> svn: in directory 'C:/src/svn-test/a'
> svn: start_handler: error processing command 'committed' in 'C:/src/svn-test/a'
> svn: error replacing text-base: x98
> svn: Access is denied.
> svn: svn_io_file_rename: can't move 'C:/src/svn-test/a/.svn/tmp/text-base/x98.svn-base' to 'C:/src/svn-test/a/.svn/text-base/x98.svn-base'

Sure looks like some sort of permissions problem, but I'm not a
Windows NT expert.  After the error, does 

   C:/src/svn-test/a/.svn/tmp/text-base/x98.svn-base

exist, and what happens if you try to rename it manually to

   C:/src/svn-test/a/.svn/text-base/x98.svn-base

?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org