]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
uplifting 1.4.7 fixes, version bump
authorStefan Eissing <icing@apache.org>
Tue, 19 Apr 2016 14:04:47 +0000 (14:04 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 19 Apr 2016 14:04:47 +0000 (14:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1739932 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http2/h2_bucket_beam.c
modules/http2/h2_session.c
modules/http2/h2_version.h

diff --git a/CHANGES b/CHANGES
index 6e92461c5ccc3ce7c546cc7aea9bf1773b4d104b..07cc585a8f313d7a7855d737a8df9bf2f31954eb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_http2: disabling mmap for file buckets transport due to segmenation
+     faults when files change on the fly.
+     
   *) mod_http2: new "bucket beam" technology to transport buckets across
      threads without buffer copy. Delaying response start until flush or
      enough body data has been accumulated. [Stefan Eissing]
index fee6c7bc87d82919d3f86344928096705f9a7cdd..aaf5300be4fc9531de1634e2881804d7ecca97d5 100644 (file)
@@ -21,7 +21,9 @@
 #include <apr_thread_cond.h>
 
 #include <httpd.h>
+#include <http_log.h>
 
+#include "h2_private.h"
 #include "h2_util.h"
 #include "h2_bucket_beam.h"
 
@@ -284,6 +286,11 @@ static apr_status_t beam_cleanup(void *data)
 {
     h2_bucket_beam *beam = data;
 
+    if (beam->live_beam_buckets) {
+        ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, beam->life_pool, 
+                      "h2_beam(%d-%s) cleanup with live %d buckets", 
+                      beam->id, beam->tag, (int)beam->live_beam_buckets);
+    }
     AP_DEBUG_ASSERT(beam->live_beam_buckets == 0);
     h2_blist_cleanup(&beam->red);
     h2_blist_cleanup(&beam->purge);
@@ -619,7 +626,7 @@ apr_status_t h2_beam_receive(h2_bucket_beam *beam,
                              apr_off_t readbytes)
 {
     apr_thread_mutex_t *lock;
-    apr_bucket *bred, *bgreen;
+    apr_bucket *bred, *bgreen, *ng;
     int acquired, transferred = 0;
     apr_status_t status = APR_SUCCESS;
     apr_off_t remain = readbytes;
@@ -683,8 +690,14 @@ transfer:
                     }
                     ++beam->files_beamed;
                 }
-                apr_brigade_insert_file(bb, fd, bred->start, bred->length, 
-                                        bb->p);
+                ng = apr_brigade_insert_file(bb, fd, bred->start, bred->length, 
+                                             bb->p);
+#if APR_HAS_MMAP
+                /* disable mmap handling as this leads to segfaults when
+                 * the underlying file is changed while memory pointer has
+                 * been handed out. See also PR 59348 */
+                apr_bucket_file_enable_mmap(ng, 0);
+#endif
                 remain -= bred->length;
                 ++transferred;
             }
index e491f1f1b7ef22c9ccf360f50018f07b63adbe60..d64c3fce96f114c25d9e0b4313a338465fb2979a 100644 (file)
@@ -2177,6 +2177,9 @@ apr_status_t h2_session_process(h2_session *session, int async)
                         /* continue reading handling */
                     }
                     else {
+                        ap_log_cerror( APLOG_MARK, APLOG_TRACE1, status, c,
+                                      "h2_session(%ld): idle(1 sec timeout) "
+                                      "read failed", session->id);
                         dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, "error");
                     }
                 }
index 191af8be4c8200776fe0313d49f810ae7a587d75..ed74198a045811c863f14d125ed7dc711fc5e17e 100644 (file)
@@ -26,7 +26,7 @@
  * @macro
  * Version number of the http2 module as c string
  */
-#define MOD_HTTP2_VERSION "1.5.0-DEV"
+#define MOD_HTTP2_VERSION "1.5.1-DEV"
 
 /**
  * @macro
@@ -34,7 +34,7 @@
  * release. This is a 24 bit number with 8 bits for major number, 8 bits
  * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
  */
-#define MOD_HTTP2_VERSION_NUM 0x010500
+#define MOD_HTTP2_VERSION_NUM 0x010501
 
 
 #endif /* mod_h2_h2_version_h */