You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/01/06 22:39:10 UTC
[trafficserver] branch 9.0.x updated (4fb0e11 -> ad1fa77)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.
from 4fb0e11 Updated CHANGELOG
new cca5aca Make sure shutdown_cont_event isn't holding any garbage references.
new ad1fa77 Add in_destroy to Http2ConnectionState to prevent double delete (similar to Http2ClientSession)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
proxy/http2/Http2ConnectionState.h | 7 +++++++
1 file changed, 7 insertions(+)
[trafficserver] 01/02: Make sure shutdown_cont_event isn't holding
any garbage references.
Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit cca5aca74c9435490d23e07d1a9bb03ac8e0ac5f
Author: Sudheer Vinukonda <su...@apache.org>
AuthorDate: Fri Sep 27 10:15:41 2019 -0700
Make sure shutdown_cont_event isn't holding any garbage references.
As it seems like there could be a race condition because the handling of
HTTP2_SESSION_EVENT_SHUTDOWN_INIT is going through the event loop again
and therefore may come in after the Session and its
associated contexts are already cleaned up thus causing an use-after-free possibility
(cherry picked from commit b0685dbd4d00f303ded4727a74f06d0a7cddcd93)
---
proxy/http2/Http2ConnectionState.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index afd4385..3f49fa1 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -142,6 +142,7 @@ public:
{
if (shutdown_cont_event) {
shutdown_cont_event->cancel();
+ shutdown_cont_event = nullptr;
}
cleanup_streams();
[trafficserver] 02/02: Add in_destroy to Http2ConnectionState to
prevent double delete (similar to Http2ClientSession)
Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit ad1fa77fce656fe3d7d993a336ae446a80c96c3c
Author: Sudheer Vinukonda <su...@apache.org>
AuthorDate: Mon Aug 26 20:21:20 2019 -0700
Add in_destroy to Http2ConnectionState to prevent
double delete (similar to Http2ClientSession)
Add zombie_event when destroy() is called more than once.
(cherry picked from commit e894d18608ec371d2b8976ad131b9f2cd0b2e832)
---
proxy/http2/Http2ConnectionState.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index 3f49fa1..f68db97 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -140,6 +140,11 @@ public:
void
destroy()
{
+ if (in_destroy) {
+ schedule_zombie_event();
+ return;
+ }
+ in_destroy = true;
if (shutdown_cont_event) {
shutdown_cont_event->cancel();
shutdown_cont_event = nullptr;
@@ -375,6 +380,7 @@ private:
Http2StreamId continued_stream_id = 0;
bool _scheduled = false;
bool fini_received = false;
+ bool in_destroy = false;
int recursion = 0;
Http2ShutdownState shutdown_state = HTTP2_SHUTDOWN_NONE;
Http2ErrorCode shutdown_reason = Http2ErrorCode::HTTP2_ERROR_MAX;