You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2016/11/07 17:36:19 UTC

[trafficserver] branch 6.2.x updated: TS-4838: CONNECT requests get forgotten across threads.

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

sorber pushed a commit to branch 6.2.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/6.2.x by this push:
       new  9e248f6   TS-4838: CONNECT requests get forgotten across threads.
9e248f6 is described below

commit 9e248f652f45ce1e117e6b4c2ff1dc441df6c4e1
Author: James Peach <jp...@apache.org>
AuthorDate: Fri Sep 9 15:29:05 2016 -0700

    TS-4838: CONNECT requests get forgotten across threads.
    
    What happens here is that ProxyClientTransaction::adjust_thread
    reschedules the transaction onto a new thread at the start of
    HttpSM::do_http_server_open.
    
    Unfortunately, at this point the default handler is
    HttpSM::state_raw_http_server_open. When the transaction is
    rescheduled, the default handler runs, and receives the EVENT_INTERVAL
    that it so fortuitously logs an error for. We have never actually
    completed do_http_server_open, so we never make any more progress
    on this transaction.
    
    (cherry picked from commit 8fddd77c085d1a64f11de61bb42a50562cd23229)
---
 proxy/http/HttpSM.cc | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index cbc09d7..b7a1be2 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -1113,6 +1113,14 @@ HttpSM::state_raw_http_server_open(int event, void *data)
 
   pending_action = NULL;
   switch (event) {
+  case EVENT_INTERVAL:
+    // If we get EVENT_INTERNAL it means that we moved the transaction
+    // to a different thread in do_http_server_open.  Since we didn't
+    // do any of the actual work in do_http_server_open, we have to
+    // go back and do it now.
+    do_http_server_open(true);
+    return 0;
+
   case NET_EVENT_OPEN:
 
     if (t_state.pCongestionEntry != NULL) {
@@ -1148,11 +1156,6 @@ HttpSM::state_raw_http_server_open(int event, void *data)
     t_state.current.state = HttpTransact::CONGEST_CONTROL_CONGESTED_ON_M;
     break;
 
-  case EVENT_INTERVAL:
-    Error("[HttpSM::state_raw_http_server_open] event: EVENT_INTERVAL state: %d server_entry: %p", t_state.current.state,
-          server_entry);
-    return 0;
-
   default:
     ink_release_assert(0);
     break;

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