You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2015/04/20 22:41:25 UTC
trafficserver git commit: TS-3522: Segfault due to inactivity_cop.
Repository: trafficserver
Updated Branches:
refs/heads/master 6fae12f70 -> 787eb418e
TS-3522: Segfault due to inactivity_cop.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/787eb418
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/787eb418
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/787eb418
Branch: refs/heads/master
Commit: 787eb418e021d00584e297c4a895d87547a351ea
Parents: 6fae12f
Author: shinrich <sh...@yahoo-inc.com>
Authored: Mon Apr 20 15:40:46 2015 -0500
Committer: shinrich <sh...@yahoo-inc.com>
Committed: Mon Apr 20 15:40:46 2015 -0500
----------------------------------------------------------------------
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/787eb418/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 3ec4999..eb0baba 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 6.0.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/787eb418/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/787eb418/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/787eb418/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