You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by su...@apache.org on 2020/01/06 21:43:13 UTC

[trafficserver] branch master updated (62e4cb1 -> b0685db)

This is an automated email from the ASF dual-hosted git repository.

sudheerv pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from 62e4cb1  Fixes a corner case where the NextHop consistent hash ring may not be searched in it's entirety for an available host due to a premature wrapped ring indication.
     new e894d18  Add in_destroy to Http2ConnectionState to prevent double delete (similar to Http2ClientSession)
     new b0685db  Make sure shutdown_cont_event isn't holding any garbage references.

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] 02/02: Make sure shutdown_cont_event isn't holding any garbage references.

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sudheerv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit b0685dbd4d00f303ded4727a74f06d0a7cddcd93
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
---
 proxy/http2/Http2ConnectionState.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index 85245c4..f68db97 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -147,6 +147,7 @@ public:
     in_destroy = true;
     if (shutdown_cont_event) {
       shutdown_cont_event->cancel();
+      shutdown_cont_event = nullptr;
     }
     cleanup_streams();
 


[trafficserver] 01/02: Add in_destroy to Http2ConnectionState to prevent double delete (similar to Http2ClientSession)

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sudheerv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit e894d18608ec371d2b8976ad131b9f2cd0b2e832
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.
---
 proxy/http2/Http2ConnectionState.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index afd4385..85245c4 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();
     }
@@ -374,6 +379,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;