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 2014/12/31 02:57:35 UTC

[1/2] trafficserver git commit: [TS-3083]: Fix core dump due to FetchSM double delete

Repository: trafficserver
Updated Branches:
  refs/heads/master 48f1eae33 -> 42f737177


[TS-3083]: Fix core dump due to FetchSM double delete


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/63776dc0
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/63776dc0
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/63776dc0

Branch: refs/heads/master
Commit: 63776dc0049596907a1a7e394a74284bb5ebfc0b
Parents: 48f1eae
Author: sunwei <su...@yahoo-inc.com>
Authored: Wed Dec 31 01:56:11 2014 +0000
Committer: Sudheer Vinukonda <su...@yahoo-inc.com>
Committed: Wed Dec 31 01:56:11 2014 +0000

----------------------------------------------------------------------
 proxy/FetchSM.cc | 5 +++++
 proxy/FetchSM.h  | 2 ++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/63776dc0/proxy/FetchSM.cc
----------------------------------------------------------------------
diff --git a/proxy/FetchSM.cc b/proxy/FetchSM.cc
index c5fc04b..3bb950f 100644
--- a/proxy/FetchSM.cc
+++ b/proxy/FetchSM.cc
@@ -36,6 +36,11 @@ FetchSM::cleanUp()
 {
   Debug(DEBUG_TAG, "[%s] calling cleanup", __FUNCTION__);
 
+  if (!ink_atomic_cas(&destroyed, false, true)) {
+    Debug(DEBUG_TAG, "Error: Double delete on FetchSM, this:%p", this);
+    return;
+  }
+
   if (resp_is_chunked > 0 && (fetch_flags & TS_FETCH_FLAGS_DECHUNK)) {
     chunked_handler.clear();
    }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/63776dc0/proxy/FetchSM.h
----------------------------------------------------------------------
diff --git a/proxy/FetchSM.h b/proxy/FetchSM.h
index c48bb4f..076e092 100644
--- a/proxy/FetchSM.h
+++ b/proxy/FetchSM.h
@@ -52,6 +52,7 @@ public:
     header_done = 0;
     user_data = NULL;
     has_sent_header = false;
+    destroyed = false;
     req_content_length = 0;
     resp_is_chunked = -1;
     resp_content_length = -1;
@@ -167,6 +168,7 @@ private:
   bool header_done;
   bool is_method_head;
   bool is_internal_request;
+  bool destroyed;
   IpEndpoint _addr;
   int resp_is_chunked;
   int resp_received_close;


[2/2] trafficserver git commit: update CHANGES

Posted by su...@apache.org.
update CHANGES


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/42f73717
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/42f73717
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/42f73717

Branch: refs/heads/master
Commit: 42f7371772577b00e983eb4f9514bc9d884da41c
Parents: 63776dc
Author: Sudheer Vinukonda <su...@yahoo-inc.com>
Authored: Wed Dec 31 01:57:23 2014 +0000
Committer: Sudheer Vinukonda <su...@yahoo-inc.com>
Committed: Wed Dec 31 01:57:23 2014 +0000

----------------------------------------------------------------------
 CHANGES | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/42f73717/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 37ba49c..aa01519 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.0
 
+  *) [TS-3083] Fix core dump due to FetchSM double delete
+
   *) [TS-3225] Add more API support to ts_lua plugin.
 
   *) [TS-3255] Support flush option in gzip plugin.