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

Re: ra_svn failure over ssh on release branch.

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-04-15 19:31:18 CEST

Greg Hudson <ghudson@MIT.EDU> writes:

> On Tue, 2003-04-15 at 10:10, Philip Martin wrote:
> > The following patch also appears to do the trick. I think we have a
> > stream, or buffering, or flushing problem somewhere.
>
> In my experience, the problem only happens sometimes; I always blamed it
> on a concurrency problem in libsvn_fs, in which case your patch may
> adjust the timing a little bit (thus masking the problem on your
> system), or it may do nothing, and you were just lucky with the tests
> you did after applying the patch.

This is what happens
    
    1) open tmpfile1
    2) open tmpfile2
    3) open RA session1
    4) get tmpfile1 contents
    5) open RA session
    6) get tmpfile2 contents
    7) close tmpfile1
    8) close tmpfile2

Now when we get the tmpfile1 contents (step 4) they are not
immediately flushed to disk, that doesn't happen until the close.
Before that happens we open the second RA session (step 5), which
calls apr_proc_create to start the ssh process. This involves a
fork/exec and the child process appears to flush it's copy of
tmpfile1, probably in a pool cleanup handler. Then the parent process
closes tmpfile1 (step 7) flushing the parents version of the file.
The result is that tmpfile1 gets the buffered data twice.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 15 19:32:06 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.