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 2017/12/22 23:24:58 UTC

[trafficserver] branch 7.1.x updated: Fix race condition during testing rc2.

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

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/7.1.x by this push:
     new f42201c  Fix race condition during testing rc2.
f42201c is described below

commit f42201cb39598c8ffc5eb9454a269328214d34e0
Author: Zeyuan Yu <ze...@gmail.com>
AuthorDate: Thu Dec 21 22:08:53 2017 +0000

    Fix race condition during testing rc2.
    
    (cherry picked from commit a3e7eb6f133c78479bc7c19661112a963369471c)
---
 proxy/http/HttpSM.cc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 2f3a8b5..53812bd 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -5576,6 +5576,12 @@ HttpSM::handle_server_setup_error(int event, void *data)
     // if (vio->op == VIO::WRITE && vio->ndone == 0) {
     if (server_entry->write_vio && server_entry->write_vio->nbytes > 0 && server_entry->write_vio->ndone == 0) {
       t_state.current.state = HttpTransact::CONNECTION_ERROR;
+      if (server_entry) {
+        ink_assert(server_entry->vc_type == HTTP_SERVER_VC);
+        vc_table.cleanup_entry(server_entry);
+        server_entry   = nullptr;
+        server_session = nullptr;
+      }
     } else {
       t_state.current.state = HttpTransact::INACTIVE_TIMEOUT;
     }
@@ -5585,7 +5591,7 @@ HttpSM::handle_server_setup_error(int event, void *data)
   }
 
   // Closedown server connection and deallocate buffers
-  ink_assert(server_entry->in_tunnel == false);
+  ink_assert(!server_entry || server_entry->in_tunnel == false);
 
   // if we are waiting on a plugin callout for
   //   HTTP_API_SEND_REQUEST_HDR defer calling transact until

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].