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 2013/08/06 22:23:36 UTC

[1/3] git commit: TS-2051: Fix SSL crash due to excess READ_COMPLETE events.

Updated Branches:
  refs/heads/3.3.x 5dec26764 -> cd64eddc4


TS-2051: Fix SSL crash due to excess READ_COMPLETE events.


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

Branch: refs/heads/3.3.x
Commit: 84486681b865f9d3e5e8c79ffadc8f88834a33b2
Parents: c1c963e
Author: Alan M. Carroll <am...@network-geographics.com>
Authored: Tue Aug 6 15:09:05 2013 -0500
Committer: Alan M. Carroll <am...@network-geographics.com>
Committed: Tue Aug 6 15:09:05 2013 -0500

----------------------------------------------------------------------
 CHANGES                         |  2 ++
 iocore/net/SSLNetVConnection.cc | 18 +++++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/84486681/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index c358bb5..aed5f49 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 3.3.5
 
+  *) [TS-2051] Fix SSL crash due to excess READ_COMPLETE events.
+
   *) [TS-2102] SPDY plugin tries to setup protocol handler too early.
 
   *) [TS-1953] remove version checks from plugins that don't use it and

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/84486681/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 3f429eb..86e788e 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -189,6 +189,7 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
   int64_t bytes = 0;
   NetState *s = &this->read;
   MIOBufferAccessor &buf = s->vio.buffer;
+  int64_t ntodo = s->vio.ntodo();
 
   MUTEX_TRY_LOCK_FOR(lock, s->vio.mutex, lthread, s->vio._cont);
   if (!lock) {
@@ -228,21 +229,24 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
       nh->write_ready_list.remove(this);
       writeReschedule(nh);
     } else if (ret == EVENT_DONE) {
-      read.triggered = 1;
-      if (read.enabled)
-        nh->read_ready_list.in_or_enqueue(this);
+      // If this was driven by a zero length read, signal complete when
+      // the handshake is complete. Otherwise set up for continuing read
+      // operations.
+      if (ntodo <= 0) {
+        readSignalDone(VC_EVENT_READ_COMPLETE, nh);
+      } else {
+        read.triggered = 1;
+        if (read.enabled)
+          nh->read_ready_list.in_or_enqueue(this);
+      }
     } else
       readReschedule(nh);
     return;
   }
 
   // If there is nothing to do, disable connection
-  int64_t ntodo = s->vio.ntodo();
   if (ntodo <= 0) {
     read_disable(nh, this);
-    // Don't return early even if there's nothing. We still need
-    // to propagate events for zero-length reads.
-    readSignalDone(VC_EVENT_READ_COMPLETE, nh);
     return;
   }
 


[2/3] git commit: Updated with TS-2099

Posted by zw...@apache.org.
Updated with TS-2099


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

Branch: refs/heads/3.3.x
Commit: c612971a939d6fbf387933a60e44f7b3267e1fe6
Parents: 8448668
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Aug 6 14:22:19 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Aug 6 14:23:00 2013 -0600

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c612971a/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index aed5f49..70ca933 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,11 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 3.3.5
 
+
   *) [TS-2051] Fix SSL crash due to excess READ_COMPLETE events.
 
+  *) [TS-2099] Using wrong member when setting active timeout.
+
   *) [TS-2102] SPDY plugin tries to setup protocol handler too early.
 
   *) [TS-1953] remove version checks from plugins that don't use it and


[3/3] git commit: Merge branch 'master' into 3.3.x

Posted by zw...@apache.org.
Merge branch 'master' into 3.3.x

* master:
  Updated with TS-2099
  TS-2051: Fix SSL crash due to excess READ_COMPLETE events.


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

Branch: refs/heads/3.3.x
Commit: cd64eddc446728defc75de1566c1b2a0b953528d
Parents: 5dec267 c612971
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Aug 6 14:23:28 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Aug 6 14:23:28 2013 -0600

----------------------------------------------------------------------
 CHANGES                         |  5 +++++
 iocore/net/SSLNetVConnection.cc | 18 +++++++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------