On 12.06.2012 10:51, Justin Erenkrantz wrote:
> It seems we've tweaked how we handle EAGAIN inside of ra_serf and are
> treating it as a critical error.
>
> Right now, what Johan is seeing with his anti-virus software is that
> we very often receive EAGAIN from the sockets. However, we're
> treating EAGAIN as a fatal error inside of
> svn_ra_serf__context_run_wait(). I believe we ought to be handling
> EAGAIN specifically and just (re)run the serf context loop again.
>
> The patch below fixes Johan's situation...but, I'd appreciate some
> eyes on it before committing. -- justin
>
> Index: subversion/libsvn_ra_serf/util.c
> ===================================================================
> --- subversion/libsvn_ra_serf/util.c (revision 1349176)
> +++ subversion/libsvn_ra_serf/util.c (working copy)
> @@ -734,6 +734,13 @@ svn_ra_serf__context_run_wait(svn_boolean_t *done,
> _("Connection timed out"));
> }
>
> + if (err && APR_STATUS_IS_EAGAIN(err->apr_err))
> + {
> + svn_error_clear(err);
> + err = SVN_NO_ERROR;
> + status = APR_SUCCESS;
> + }
> +
> SVN_ERR(err);
> if (status)
> {
You probably don't want to spin indefinitely here, but do something
similar to the win32 file access loop -- i.e., spin a finite number of
times before failing, while exponentially increasing the poll timeout
(and resetting the timeout and spin counter once you get a real response).
-- Brane
Received on 2012-06-12 12:46:33 CEST