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/05/05 17:26:58 UTC
[trafficserver] branch 7.1.x updated: Fix double do_io_close in
HttpTunnel::chain_abort_all()
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 96cfbed Fix double do_io_close in HttpTunnel::chain_abort_all()
96cfbed is described below
commit 96cfbede76068714cdc1f765f19ef188b1bdd136
Author: Oknet Xu <xu...@skyguard.com.cn>
AuthorDate: Fri May 5 16:42:42 2017 +0800
Fix double do_io_close in HttpTunnel::chain_abort_all()
A state machine can not access the VConnectuion or any returned
VIOs after calling do_io_close().
The TVC maybe already destroyed while the 2nd close on TransformVC,
this bug may cause TransformVC crash.
(cherry picked from commit 14df7b647873fa0d95aa24f4b94da5014afc7002)
---
proxy/http/HttpTunnel.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
index 0f38783..cc1fa8c 100644
--- a/proxy/http/HttpTunnel.cc
+++ b/proxy/http/HttpTunnel.cc
@@ -1480,12 +1480,12 @@ HttpTunnel::chain_abort_all(HttpTunnelProducer *p)
if (p->read_vio) {
p->bytes_read = p->read_vio->ndone;
}
- if (p->self_consumer) {
+ p->read_vio = nullptr;
+ if (p->self_consumer && p->self_consumer->alive) {
p->self_consumer->alive = false;
+ p->vc->do_io_close(EHTTP_ERROR);
+ update_stats_after_abort(p->vc_type);
}
- p->read_vio = nullptr;
- p->vc->do_io_close(EHTTP_ERROR);
- update_stats_after_abort(p->vc_type);
}
}
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].