You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2018/01/30 10:09:37 UTC
svn commit: r1822624 - in /httpd/httpd/trunk: CHANGES
modules/http2/h2_bucket_beam.c modules/http2/h2_stream.c
modules/http2/h2_stream.h modules/http2/h2_version.h
Author: icing
Date: Tue Jan 30 10:09:36 2018
New Revision: 1822624
URL: http://svn.apache.org/viewvc?rev=1822624&view=rev
Log:
On the trunk:
mod_http2: removed obsolete stream detach code, no longer generating events
in beam shutdown on pool destroy.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/http2/h2_bucket_beam.c
httpd/httpd/trunk/modules/http2/h2_stream.c
httpd/httpd/trunk/modules/http2/h2_stream.h
httpd/httpd/trunk/modules/http2/h2_version.h
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1822624&r1=1822623&r2=1822624&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Jan 30 10:09:36 2018
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.1
+ *) mod_http2: removed obsolete stream detach code, no longer generating events
+ in beam shutdown on pool destroy. [Stefan Eissing]
+
*) mod_slotmem_shm: Rework SHM reuse/deletion to fix races with graceful
restarts. PR 62044. [Yann Ylavic, Jim Jagielski]
Modified: httpd/httpd/trunk/modules/http2/h2_bucket_beam.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_bucket_beam.c?rev=1822624&r1=1822623&r2=1822624&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_bucket_beam.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_bucket_beam.c Tue Jan 30 10:09:36 2018
@@ -556,9 +556,8 @@ static void recv_buffer_cleanup(h2_bucke
}
}
-static apr_status_t beam_cleanup(void *data)
+static apr_status_t beam_cleanup(h2_bucket_beam *beam, int from_pool)
{
- h2_bucket_beam *beam = data;
apr_status_t status = APR_SUCCESS;
int safe_send = (beam->owner == H2_BEAM_OWNER_SEND);
int safe_recv = (beam->owner == H2_BEAM_OWNER_RECV);
@@ -571,6 +570,11 @@ static apr_status_t beam_cleanup(void *d
* Clean up receiver first, if safe, then cleanup sender, if safe.
*/
+ /* When called from pool destroy, io callbacks are disabled */
+ if (from_pool) {
+ beam->cons_io_cb = NULL;
+ }
+
/* When modify send is not safe, this means we still have multi-thread
* protection and the owner is receiving the buckets. If the sending
* side has not gone away, this means we could have dangling buckets
@@ -606,10 +610,15 @@ static apr_status_t beam_cleanup(void *d
return status;
}
+static apr_status_t beam_pool_cleanup(void *data)
+{
+ return beam_cleanup(data, 1);
+}
+
apr_status_t h2_beam_destroy(h2_bucket_beam *beam)
{
- apr_pool_cleanup_kill(beam->pool, beam, beam_cleanup);
- return beam_cleanup(beam);
+ apr_pool_cleanup_kill(beam->pool, beam, beam_pool_cleanup);
+ return beam_cleanup(beam, 0);
}
apr_status_t h2_beam_create(h2_bucket_beam **pbeam, apr_pool_t *pool,
@@ -642,7 +651,7 @@ apr_status_t h2_beam_create(h2_bucket_be
if (APR_SUCCESS == rv) {
rv = apr_thread_cond_create(&beam->change, pool);
if (APR_SUCCESS == rv) {
- apr_pool_pre_cleanup_register(pool, beam, beam_cleanup);
+ apr_pool_pre_cleanup_register(pool, beam, beam_pool_cleanup);
*pbeam = beam;
}
}
Modified: httpd/httpd/trunk/modules/http2/h2_stream.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_stream.c?rev=1822624&r1=1822623&r2=1822624&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_stream.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_stream.c Tue Jan 30 10:09:36 2018
@@ -578,17 +578,7 @@ void h2_stream_destroy(h2_stream *stream
ap_assert(stream);
ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, stream->session->c,
H2_STRM_MSG(stream, "destroy"));
- if (stream->pool) {
- apr_pool_destroy(stream->pool);
- stream->pool = NULL;
- }
-}
-
-apr_pool_t *h2_stream_detach_pool(h2_stream *stream)
-{
- apr_pool_t *pool = stream->pool;
- stream->pool = NULL;
- return pool;
+ apr_pool_destroy(stream->pool);
}
apr_status_t h2_stream_prep_processing(h2_stream *stream)
Modified: httpd/httpd/trunk/modules/http2/h2_stream.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_stream.h?rev=1822624&r1=1822623&r2=1822624&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_stream.h (original)
+++ httpd/httpd/trunk/modules/http2/h2_stream.h Tue Jan 30 10:09:36 2018
@@ -158,15 +158,6 @@ void h2_stream_dispatch(h2_stream *strea
void h2_stream_cleanup(h2_stream *stream);
/**
- * Detach the memory pool from the stream. Will prevent stream
- * destruction to take the pool with it.
- *
- * @param stream the stream to detach the pool from
- * @result the detached memory pool or NULL if stream no longer has one
- */
-apr_pool_t *h2_stream_detach_pool(h2_stream *stream);
-
-/**
* Notify the stream that amount bytes have been consumed of its input
* since the last invocation of this method (delta amount).
*/
Modified: httpd/httpd/trunk/modules/http2/h2_version.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_version.h?rev=1822624&r1=1822623&r2=1822624&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_version.h (original)
+++ httpd/httpd/trunk/modules/http2/h2_version.h Tue Jan 30 10:09:36 2018
@@ -27,7 +27,7 @@
* @macro
* Version number of the http2 module as c string
*/
-#define MOD_HTTP2_VERSION "1.10.15-DEV"
+#define MOD_HTTP2_VERSION "1.10.16-DEV"
/**
* @macro
@@ -35,7 +35,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 0x010a0f
+#define MOD_HTTP2_VERSION_NUM 0x010a10
#endif /* mod_h2_h2_version_h */