Ruediger Pluem wrote:

On 10/19/2005 08:25 PM, William A. Rowe, Jr. wrote:

[..cut..]


Ruediger - I'm questioning if it's the BRIGADE_CONCAT, or actually if we
are
failing to respect transient buckets in the core / ssl filters.  If we are
failing to pay attention to transient buckets (or not allocating the
buckets
as transient when, in fact, they are) then this might be the root bug.


Agreed. The question is what we can expect from the core / ssl filters (Is
there any kind of contract defined?). This defines if it is a bug in
core / ssl or in the proxy code.
So I guess the solution is either to handle transient buckets carefully later 
by setting
them aside in this situation, as the current patches do or to adjust the
core / ssl filters in a way that they do not deliver transient buckets any 
longer.
The attached quick and dirty patch following this way seems to solve the 
problem too,
but

- I am not sure about its sideeffects.
- There are further places in the SSL code where transient buckets get used. 
They
  would need to checked as well.

The problem is -not- in creating the transient buckets (if they are sent, that's
goodness).  The problem is in transforming them to persistant buckets before the
core, ssl, or other filters who have set-aside operations decide to return.  So
there should have been no trouble creating the transient bucket below, the
trouble came in when the core filter didn't send the data, and also didn't set
it aside :-(

Bill

BTW: The problem does not happen without SSL because in this case we get heap 
buckets
(checked with gdb, but not in the code).

Index: modules/ssl/ssl_engine_io.c
===================================================================
--- modules/ssl/ssl_engine_io.c (Revision 326481)
+++ modules/ssl/ssl_engine_io.c (Arbeitskopie)
@@ -1324,7 +1324,7 @@
     /* Create a transient bucket out of the decrypted data. */
     if (len > 0) {
         apr_bucket *bucket =
-            apr_bucket_transient_create(inctx->buffer, len, 
f->c->bucket_alloc);
+            apr_bucket_heap_create(inctx->buffer, len, NULL, 
f->c->bucket_alloc);
         APR_BRIGADE_INSERT_TAIL(bb, bucket);
     }

Reply via email to