From: Stefan Eissing Date: Tue, 19 Apr 2016 14:04:47 +0000 (+0000) Subject: uplifting 1.4.7 fixes, version bump X-Git-Tag: 2.5.0-alpha~1730 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74db5f63bd56116abea800d420d23133c27462f3;p=thirdparty%2Fapache%2Fhttpd.git uplifting 1.4.7 fixes, version bump git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1739932 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 6e92461c5cc..07cc585a8f3 100644 --- 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] diff --git a/modules/http2/h2_bucket_beam.c b/modules/http2/h2_bucket_beam.c index fee6c7bc87d..aaf5300be4f 100644 --- a/modules/http2/h2_bucket_beam.c +++ b/modules/http2/h2_bucket_beam.c @@ -21,7 +21,9 @@ #include #include +#include +#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; } diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c index e491f1f1b7e..d64c3fce96f 100644 --- a/modules/http2/h2_session.c +++ b/modules/http2/h2_session.c @@ -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"); } } diff --git a/modules/http2/h2_version.h b/modules/http2/h2_version.h index 191af8be4c8..ed74198a045 100644 --- a/modules/http2/h2_version.h +++ b/modules/http2/h2_version.h @@ -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 */