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

Re: [bug] FSFS errors when doing simultaneous commits - win32 apr_file_mktemp is broken

From: C.A.T.Magic <c.a.t.magic_at_gmx.at>
Date: 2004-05-09 19:40:16 CEST

Josh Pieper wrote:
> C.A.T.Magic wrote:
>
>>which means that apr_file_mktemp is failing -
>>maybe a bug in apr for win32?
>
> C.A.T.: Do you think you could figure out why apr_file_mktemp is
> failing? Perhaps find the exact error code it is returning?

please change the flags for apr_file_mktemp in fsfs.c to
    APR_CREATE | APR_READ | APR_WRITE | APR_EXCL
because otherways apr always fails with EACCES on win32.

i debugged into the APR code and from what i see, i can tell
that apr's "gettemp" implementation is doint it quite
ineffective: it takes the "current time" and used that as a
seed for its random files --- which then collides quite often
if two processes (e.g HyperThread CPU) generate a temp file at
approximately the same time. its also generating "Foo" and fOO"
which are identical for win32.
it then tries to create the same filename in both threads and
fails with errorcode
   720080 -- The file exists
which is probably the most senseless thing a generate unique
file function could ever return :)

since apr is broken this way, you should probably remove
all uses of apr_file_mktemp from svn, since you can't expect
all users to have the newest apr-fixes.
can someone point that behaviour out on the apr mailing list?

=======
c.a.t.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun May 9 19:40:33 2004

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.