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 2015/04/22 18:55:25 UTC
[06/12] trafficserver git commit: TS-3522: Segfault due to
inactivity_cop.
TS-3522: Segfault due to inactivity_cop.
(cherry picked from commit 787eb418e021d00584e297c4a895d87547a351ea)
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/61c65993
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/61c65993
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/61c65993
Branch: refs/heads/5.3.x
Commit: 61c6599327d35c6e9151055fda23bf143636b848
Parents: 81cbc8a
Author: shinrich <sh...@yahoo-inc.com>
Authored: Mon Apr 20 15:40:46 2015 -0500
Committer: Phil Sorber <so...@apache.org>
Committed: Tue Apr 21 14:50:06 2015 -0600
----------------------------------------------------------------------
CHANGES | 2 ++
iocore/net/UnixNetVConnection.cc | 5 +++--
proxy/PluginVC.cc | 2 +-
proxy/http/HttpClientSession.cc | 3 +++
4 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/61c65993/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 7bf631b..280d95f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 5.3.0
+ *) [TS-3522] Segfault due to inactivity_cop.
+
*) [TS-3530] HTTP/2 memory leak with headers and more...
*) [TS-3519] HTTP/2 seeing a lot of GOAWAY frames being sent
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/61c65993/iocore/net/UnixNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index c8156e1..ae4d028 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -166,7 +166,8 @@ static inline int
write_signal_and_update(int event, UnixNetVConnection *vc)
{
vc->recursion++;
- vc->write.vio._cont->handleEvent(event, &vc->write.vio);
+ if (NULL != vc->write.vio._cont)
+ vc->write.vio._cont->handleEvent(event, &vc->write.vio);
if (!--vc->recursion && vc->closed) {
/* BZ 31932 */
ink_assert(vc->thread == this_ethread());
@@ -592,7 +593,7 @@ UnixNetVConnection::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader
{
ink_assert(!closed);
write.vio.op = VIO::WRITE;
- write.vio.mutex = c->mutex;
+ write.vio.mutex = c ? c->mutex : this->mutex;
write.vio._cont = c;
write.vio.nbytes = nbytes;
write.vio.ndone = 0;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/61c65993/proxy/PluginVC.cc
----------------------------------------------------------------------
diff --git a/proxy/PluginVC.cc b/proxy/PluginVC.cc
index 7651efb..a457a40 100644
--- a/proxy/PluginVC.cc
+++ b/proxy/PluginVC.cc
@@ -271,7 +271,7 @@ PluginVC::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *abuffer,
// Note: we set vio.op last because process_write_side looks at it to
// tell if the VConnection is active.
- write_state.vio.mutex = c->mutex;
+ write_state.vio.mutex = c != NULL ? c->mutex : this->mutex;
write_state.vio._cont = c;
write_state.vio.nbytes = nbytes;
write_state.vio.ndone = 0;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/61c65993/proxy/http/HttpClientSession.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpClientSession.cc b/proxy/http/HttpClientSession.cc
index a07fcc0..742a883 100644
--- a/proxy/http/HttpClientSession.cc
+++ b/proxy/http/HttpClientSession.cc
@@ -493,6 +493,9 @@ HttpClientSession::release(IOBufferReader *r)
HTTP_DECREMENT_DYN_STAT(http_current_client_transactions_stat);
+ // Clean up the write VIO in case of inactivity timeout
+ this->do_io_write(NULL, 0, NULL);
+
// Check to see there is remaining data in the
// buffer. If there is, spin up a new state
// machine to process it. Otherwise, issue an