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

Re: svn_io_file_rename error during add

From: Sébastien Trottier <strot_at_paraxip.com>
Date: 2003-09-12 22:51:37 CEST

Hi guys,
Any update on this issue?
I'm experiencing frequent svn_io_file_xxx errors while doing adds and
deletes under Windows XP Home SP1 (Subversion 0.29.0 r6976). I don't have
the Indexing Service nor any anti-virus software running.

One variant of the error:

>svn add *
[...]
A ace/CLASSIX
svn: Access is denied.
svn: svn_io_file_rename: can't move 'ace/CLASSIX/.svn/tmp/entries' to
'ace/CLASSIX/.svn/entries'

Is there an issue entered in Issuezilla about it? I can help
reproduce/pinpoint the problem if somebody tells me what to look for.

Thank for the great software,

Seb Trottier
Paraxip Technologies

Date: Thu, 17 Jul 2003 23:49:49 -0600
From: "D.J. Heap" <dj@shadyvale.net>
Content-Type: multipart/mixed;
 boundary="------------030102070208060509090805"
Subject: Re: svn_io_file_rename error during add

Philip Martin wrote:
> "Steve Williams" <stevewilliams@kromestudios.com> writes:
>

[snip]

>
>>This is an intermittent issue. I reverted the whole Props folder tree and
>>the 'svn add Props' command worked fine after that.
>
>
> Subversion appears to trigger a race condition somewhere in the
> Windows filesystem. We don't really have a solution.
>

I've resorted to using this little perversion until something better is
found -- and it still doesn't help some of the tests where a newly
created directory cannot be chdir'd into occasionally. But this has
kept us working at least.

I'm going to take another half a day or so this weekend and try to
reproduce it outside of Subversion. Or perhaps study the APR file API
more so I understand better how it's interacting with Win32. Just using
the APR file calls in a similar manner to Subversion's usage has not
yielded any failures yet in my repro attempts -- there's something
unique about Subversion and the tests that I'm missing in the repro
programs.

DJ

Index: subversion/libsvn_subr/io.c
===================================================================
--- subversion/libsvn_subr/io.c (revision 6504)
+++ subversion/libsvn_subr/io.c (working copy)
@@ -847,6 +847,19 @@

   apr_err = apr_file_remove (path_apr, pool);

+#ifdef SVN_WIN32
+ {
+ int retries = 0;
+ for ( retries = 0;
+ retries < 100 && apr_err && APR_TO_OS_ERROR(apr_err) ==
ERROR_ACCESS_DENIED;
+ ++retries )
+ {
+ apr_sleep(1000);
+ apr_err = apr_file_remove( path_apr, pool );
+ }
+ }
+#endif
+
   if (apr_err)
     return svn_error_createf
       (apr_err, NULL,
@@ -1474,6 +1487,19 @@

   status = apr_file_rename (from_path_apr, to_path_apr, pool);

+#ifdef SVN_WIN32
+ {
+ int retries = 0;
+ for ( retries = 0;
+ retries < 100 && status && APR_TO_OS_ERROR(status) ==
ERROR_ACCESS_DENIED;
+ ++retries )
+ {
+ apr_sleep(1000);
+ status = apr_file_rename( from_path_apr, to_path_apr, pool );
+ }
+ }
+#endif
+
   if (status)
     return svn_error_createf (status, NULL,
                               "svn_io_file_rename: can't move '%s' to
'%s'",

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 12 22:50:45 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.