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

Re: [PATCH] ra_serf and APR_EAGAIN handling

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Tue, 12 Jun 2012 13:50:37 +0200

On Tue, Jun 12, 2012 at 1:18 PM, Justin Erenkrantz
<justin_at_erenkrantz.com> wrote:
> On Tue, Jun 12, 2012 at 1:01 PM, Lieven Govaerts <lgo_at_mobsol.be> wrote:
>> That seems strange, serf_context_run is not documented to return
>> APR_EGAIN. While the response handler can return APR_EAGAIN, serf
>> itself will translate this to APR_SUCCESS. As a result, ra_serf
>> doesn't expect it and - rightfully IMO - treats it as an error.
>>
>> Are you trying to solve this issue:
>> http://subversion.tigris.org/issues/show_bug.cgi?id=4175 ?
>
> Not quite.
>
> While the 404 code is what we're looking at right now (Ivan & Johan
> are to my right trying to debug it)...this patch is about EAGAIN
> always being returned from the network layer.
>
> FWIW, ra_serf will still cause a crash even with this patch in the 404...
>
>> If so, the solution - as discussed in
>> http://svn.haxx.se/dev/archive-2012-05/0133.shtml - lies in getting
>> the response handler not labeling the request as done until the
>> complete response has been read, including retrying on APR_EAGAIN.
>
> I looked at that thread...but, it doesn't make much sense.  =(
>
> How is it supposed to retry?  ra_serf needs to let the context_run
> loop execute again to pull off the remaining bits from the socket.
> Without the patch, we treat EAGAIN as a fatal error and it gets
> returned all the way to the client.  -- justin

Justin, here's the patch for the 404 which you made on my machine ...

-- 
Johan

Received on 2012-06-12 13:51:32 CEST

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.