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-3957 - Core dump for SpdyClientSession::state_session_start
Date Tue, 06 Oct 2015 18:37:05 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master e71350b4b -> b975cb24b


TS-3957 - Core dump for SpdyClientSession::state_session_start


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

Branch: refs/heads/master
Commit: b975cb24b818102429c1849da04d31f8cb1cc9dc
Parents: e71350b
Author: shinrich <shinrich@yahoo-inc.com>
Authored: Tue Oct 6 13:36:06 2015 -0500
Committer: shinrich <shinrich@yahoo-inc.com>
Committed: Tue Oct 6 13:36:06 2015 -0500

----------------------------------------------------------------------
 proxy/spdy/SpdyClientSession.cc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b975cb24/proxy/spdy/SpdyClientSession.cc
----------------------------------------------------------------------
diff --git a/proxy/spdy/SpdyClientSession.cc b/proxy/spdy/SpdyClientSession.cc
index 91070ae..a54da43 100644
--- a/proxy/spdy/SpdyClientSession.cc
+++ b/proxy/spdy/SpdyClientSession.cc
@@ -198,7 +198,14 @@ SpdyClientSession::new_connection(NetVConnection *new_vc, MIOBuffer *iobuf,
IOBu
   sm->resp_buffer = reinterpret_cast<TSIOBuffer>(new_empty_MIOBuffer());
   sm->resp_reader = TSIOBufferReaderAlloc(sm->resp_buffer);
 
-  eventProcessor.schedule_imm(sm, ET_NET);
+  // Block on the mutex.  We just allocated the object, so the lock should be available.
+  EThread *thread(this_ethread());
+  MUTEX_TAKE_LOCK(sm->mutex, thread);
+  // Call state_session_start directly rather than scheduling the event
+  // and leaving a half-setup session around.  It seems like there are some
+  // degenerate cases when event re-ordering causes problems (TS-3957)
+  sm->state_session_start(ET_NET, NULL);
+  MUTEX_UNTAKE_LOCK(sm->mutex, thread);
 }
 
 int


Mime
View raw message