You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2010/11/19 07:33:26 UTC
Re: svn commit: r1035605 - /httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
On 11/16/2010 01:08 PM, minfrin@apache.org wrote:
> Author: minfrin
> Date: Tue Nov 16 12:08:38 2010
> New Revision: 1035605
>
> URL: http://svn.apache.org/viewvc?rev=1035605&view=rev
> Log:
> When the proxy closes the backend connection early, force a setaside on
> any buckets still outstanding to ensure they've been copied out of the
> backend connection's pool and it is safe to release the backend connection.
>
> Modified:
> httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
>
> Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c?rev=1035605&r1=1035604&r2=1035605&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
> +++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Tue Nov 16 12:08:38 2010
* left waiting for a slow client to eventually
> @@ -1930,6 +1946,7 @@ apr_status_t ap_proxy_http_process_respo
>
> /* make sure we always clean up after ourselves */
> apr_brigade_cleanup(pass_bb);
> + apr_brigade_cleanup(bb);
Is this safe? If we released the backend connection we know that bb is empty, because
we already called apr_brigade_cleanup(bb);, but what if the pool and the allocator
of the backend connection have died meanwhile? Is this operation still safe in this case?
Regards
Rüdiger
RE: svn commit: r1035605 - /httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
Posted by "Plüm, Rüdiger, VF-Group" <ru...@vodafone.com>.
> -----Original Message-----
> From: Graham Leggett
> Sent: Freitag, 19. November 2010 12:19
> To: dev@httpd.apache.org
> Subject: Re: svn commit: r1035605 -
> /httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
>
>
> bb is created like so:
>
> bb = apr_brigade_create(p, c->bucket_alloc);
>
> In other words, from the front side connection's allocator.
> When we've
> closed early, bb will be empty, which means this is a noop, but the
> brigade is guaranteed to still exist.
Ahh, ok. Thanks for clarification.
Regards
Rüdiger
Re: svn commit: r1035605 - /httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 19 Nov 2010, at 8:33 AM, Ruediger Pluem wrote:
>> Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c?rev=1035605&r1=1035604&r2=1035605&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
>> +++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Tue Nov 16
>> 12:08:38 2010
> * left waiting for a slow client to eventually
>> @@ -1930,6 +1946,7 @@ apr_status_t ap_proxy_http_process_respo
>>
>> /* make sure we always clean up after ourselves
>> */
>> apr_brigade_cleanup(pass_bb);
>> + apr_brigade_cleanup(bb);
>
> Is this safe? If we released the backend connection we know that bb
> is empty, because
> we already called apr_brigade_cleanup(bb);, but what if the pool and
> the allocator
> of the backend connection have died meanwhile? Is this operation
> still safe in this case?
bb is created like so:
bb = apr_brigade_create(p, c->bucket_alloc);
In other words, from the front side connection's allocator. When we've
closed early, bb will be empty, which means this is a noop, but the
brigade is guaranteed to still exist.
Regards,
Graham
--