trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shinr...@apache.org
Subject trafficserver git commit: TS-3603: Debug assert due to missing lock when accept_threads are disabled.
Date Fri, 15 May 2015 15:53:43 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master ec6430244 -> ef467a2be


TS-3603: Debug assert due to missing lock when accept_threads are disabled.


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

Branch: refs/heads/master
Commit: ef467a2be79fc962ae0ec042ef9f6e871d3a775f
Parents: ec64302
Author: shinrich <shinrich@yahoo-inc.com>
Authored: Fri May 15 10:53:15 2015 -0500
Committer: shinrich <shinrich@yahoo-inc.com>
Committed: Fri May 15 10:53:15 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ef467a2b/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 9be627f..885b911 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 6.0.0
 
+  *) [TS-3603] Debug Assert due to missing lock when accept_threads are disabled.
+
   *) [TS-3605] Fix interim cache build error.
    Author: Oknet Xu <computer_xu@sina.com>
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ef467a2b/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/ef467a2b/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/ef467a2b/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