Hi Stefan,

On Tue, Jan 31, 2017 at 4:01 PM, Stefan Priebe - Profihost AG
<s.pri...@profihost.ag> wrote:
>
> any ideas?

I wonder if the attached patch (related to mod_ssl and proposed for
another segfault report) could help in your case.

Would you mind give it a try?


Thanks,
Yann.
Index: modules/ssl/ssl_engine_io.c
===================================================================
--- modules/ssl/ssl_engine_io.c	(revision 1781324)
+++ modules/ssl/ssl_engine_io.c	(working copy)
@@ -138,6 +138,7 @@ static int bio_filter_out_pass(bio_filter_out_ctx_
 
     outctx->rc = ap_pass_brigade(outctx->filter_ctx->pOutputFilter->next,
                                  outctx->bb);
+    apr_brigade_cleanup(outctx->bb);
     /* Fail if the connection was reset: */
     if (outctx->rc == APR_SUCCESS && outctx->c->aborted) {
         outctx->rc = APR_ECONNRESET;
@@ -1699,13 +1700,12 @@ static apr_status_t ssl_io_filter_output(ap_filter
     while (!APR_BRIGADE_EMPTY(bb) && status == APR_SUCCESS) {
         apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
 
-        if (APR_BUCKET_IS_METADATA(bucket)) {
+        if (APR_BUCKET_IS_METADATA(bucket) || !filter_ctx->pssl) {
             /* Pass through metadata buckets untouched.  EOC is
              * special; terminate the SSL layer first. */
             if (AP_BUCKET_IS_EOC(bucket)) {
                 ssl_filter_io_shutdown(filter_ctx, f->c, 0);
             }
-            AP_DEBUG_ASSERT(APR_BRIGADE_EMPTY(outctx->bb));
 
             /* Metadata buckets are passed one per brigade; it might
              * be more efficient (but also more complex) to use
@@ -1712,11 +1712,10 @@ static apr_status_t ssl_io_filter_output(ap_filter
              * outctx->bb as a true buffer and interleave these with
              * data buckets. */
             APR_BUCKET_REMOVE(bucket);
-            APR_BRIGADE_INSERT_HEAD(outctx->bb, bucket);
-            status = ap_pass_brigade(f->next, outctx->bb);
-            if (status == APR_SUCCESS && f->c->aborted)
-                status = APR_ECONNRESET;
-            apr_brigade_cleanup(outctx->bb);
+            APR_BRIGADE_INSERT_TAIL(outctx->bb, bucket);
+            if (bio_filter_out_pass(outctx) < 0) {
+                status = outctx->rc;
+            }
         }
         else {
             /* Filter a data bucket. */

Reply via email to