trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sor...@apache.org
Subject [4/9] trafficserver git commit: TS-3597: TLS can fail accept / handshake when accept thread is turned off. TS-3603: Debug assert due to missing lock when accept_threads are disabled.
Date Tue, 02 Jun 2015 04:08:24 GMT
TS-3597: TLS can fail accept / handshake when accept thread is turned off.
TS-3603: Debug assert due to missing lock when accept_threads are disabled.

(cherry picked from commit 75612311c1266810290e58711654d0689a9465be)
(cherry picked from commit ef467a2be79fc962ae0ec042ef9f6e871d3a775f)

Conflicts:
	CHANGES

These commits were merged because the original issues were both fixed in one commit.


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

Branch: refs/heads/5.3.x
Commit: c7c4a84d518bb2fd19d8517fb36bf27042c79f10
Parents: 67fa334
Author: shinrich <shinrich@yahoo-inc.com>
Authored: Fri May 15 10:53:15 2015 -0500
Committer: Phil Sorber <sorber@apache.org>
Committed: Mon Jun 1 21:36:32 2015 -0600

----------------------------------------------------------------------
 CHANGES                        | 4 ++++
 iocore/net/SSLNetProcessor.cc  | 2 +-
 iocore/net/UnixNetAccept.cc    | 6 ++++--
 iocore/net/UnixNetProcessor.cc | 2 +-
 4 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c7c4a84d/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 3c9949d..6afe00e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.1
 
+  *) [TS-3603] Debug Assert due to missing lock when accept_threads are disabled.
+
+  *) [TS-3597] TLS can fail accecpt / handshake when accept thread is turned off.
+
   *) [TS-3600] Missing break; statement in background_fetch plugin.
 
   *) [TS-3590] Mark H2 fetch streams as non-internal requests.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c7c4a84d/iocore/net/SSLNetProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetProcessor.cc b/iocore/net/SSLNetProcessor.cc
index f52611a..3e579cf 100644
--- a/iocore/net/SSLNetProcessor.cc
+++ b/iocore/net/SSLNetProcessor.cc
@@ -129,7 +129,7 @@ SSLNetProcessor::allocate_vc(EThread *t)
   SSLNetVConnection *vc;
 
   if (t) {
-    vc = THREAD_ALLOC(sslNetVCAllocator, t);
+    vc = THREAD_ALLOC_INIT(sslNetVCAllocator, t);
   } else {
     if (likely(vc = sslNetVCAllocator.alloc())) {
       vc->from_accept_thread = true;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c7c4a84d/iocore/net/UnixNetAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetAccept.cc b/iocore/net/UnixNetAccept.cc
index e735ec8..f6d9596 100644
--- a/iocore/net/UnixNetAccept.cc
+++ b/iocore/net/UnixNetAccept.cc
@@ -461,9 +461,11 @@ NetAccept::acceptFastEvent(int event, void *ep)
     vc->nh->read_ready_list.enqueue(vc);
 #endif
 
-    if (!action_->cancelled)
+    if (!action_->cancelled) {
+      // We must be holding the lock already to do later do_io_read's
+      MUTEX_LOCK(lock, vc->mutex, e->ethread);
       action_->continuation->handleEvent(NET_EVENT_ACCEPT, vc);
-    else
+    } else
       close_UnixNetVConnection(vc, e->ethread);
   } while (loop);
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c7c4a84d/iocore/net/UnixNetProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc
index fdc58ab..557192b 100644
--- a/iocore/net/UnixNetProcessor.cc
+++ b/iocore/net/UnixNetProcessor.cc
@@ -452,7 +452,7 @@ UnixNetProcessor::allocate_vc(EThread *t)
   UnixNetVConnection *vc;
 
   if (t) {
-    vc = THREAD_ALLOC(netVCAllocator, t);
+    vc = THREAD_ALLOC_INIT(netVCAllocator, t);
   } else {
     if (likely(vc = netVCAllocator.alloc())) {
       vc->from_accept_thread = true;


Mime
View raw message