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/08/31 00:30:40 UTC
[trafficserver] branch 7.1.x updated (9e53eac -> a2131ea)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a change to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.
from 9e53eac S3_auth:uri(En|De)code() pass by ref,not val(master)
new 059dc2f Correctly Handle EVENT_NONE in UnixNetVConnection::acceptEvent
new a2131ea FD leaks when ep.start() failed or cancelled in acceptEvent or con.connect() failed
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
iocore/net/SSLNetVConnection.cc | 1 -
iocore/net/UnixNetVConnection.cc | 16 ++++++++++------
2 files changed, 10 insertions(+), 7 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].
[trafficserver] 02/02: FD leaks when ep.start() failed or cancelled
in acceptEvent or con.connect() failed
Posted by zw...@apache.org.
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
commit a2131ea016bc6e3559f71615dabf4dff32e9571f
Author: Oknet Xu <xu...@skyguard.com.cn>
AuthorDate: Wed Aug 30 18:32:24 2017 +0800
FD leaks when ep.start() failed or cancelled in acceptEvent or con.connect() failed
(cherry picked from commit 9ded874c82de732d2c2d42c2b633d7e94adcb2e7)
Conflicts:
iocore/net/UnixNetVConnection.cc
---
iocore/net/SSLNetVConnection.cc | 1 -
iocore/net/UnixNetVConnection.cc | 8 +++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 53d7012..9b389a2 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -892,7 +892,6 @@ SSLNetVConnection::free(EThread *t)
closed = 0;
options.reset();
- con.close();
ink_assert(con.fd == NO_FD);
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index fc6967a..051fcec 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -94,7 +94,6 @@ close_UnixNetVConnection(UnixNetVConnection *vc, EThread *t)
NetHandler *nh = vc->nh;
vc->cancel_OOB();
vc->ep.stop();
- vc->con.close();
ink_release_assert(vc->thread == t);
@@ -1154,14 +1153,14 @@ UnixNetVConnection::acceptEvent(int event, Event *e)
SET_HANDLER((NetVConnHandler)&UnixNetVConnection::mainEvent);
- nh = get_NetHandler(thread);
PollDescriptor *pd = get_PollDescriptor(thread);
if (ep.start(pd, this, EVENTIO_READ | EVENTIO_WRITE) < 0) {
Debug("iocore_net", "acceptEvent : failed EventIO::start");
- close_UnixNetVConnection(this, e->ethread);
+ free(t);
return EVENT_DONE;
}
+ nh = get_NetHandler(thread);
set_inactivity_timeout(0);
nh->open_list.enqueue(this);
@@ -1396,6 +1395,9 @@ void
UnixNetVConnection::free(EThread *t)
{
ink_release_assert(t == this_ethread());
+
+ // close socket fd
+ con.close();
// clear variables for reuse
this->mutex.clear();
action_.mutex.clear();
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 01/02: Correctly Handle EVENT_NONE in
UnixNetVConnection::acceptEvent
Posted by zw...@apache.org.
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
commit 059dc2fa2edc00e0f5b8f773b89b48616409bf31
Author: Oknet Xu <xu...@skyguard.com.cn>
AuthorDate: Tue Aug 22 15:03:39 2017 +0800
Correctly Handle EVENT_NONE in UnixNetVConnection::acceptEvent
(cherry picked from commit a32f7ed3e49f595633f59cc44481f42af01f7a58)
---
iocore/net/UnixNetVConnection.cc | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index c914f6c..fc6967a 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -1132,12 +1132,12 @@ UnixNetVConnection::startEvent(int /* event ATS_UNUSED */, Event *e)
int
UnixNetVConnection::acceptEvent(int event, Event *e)
{
- thread = e->ethread;
+ EThread *t = (e == nullptr) ? this_ethread() : e->ethread;
- MUTEX_TRY_LOCK(lock, get_NetHandler(thread)->mutex, e->ethread);
+ MUTEX_TRY_LOCK(lock, get_NetHandler(t)->mutex, t);
if (!lock.is_locked()) {
if (event == EVENT_NONE) {
- thread->schedule_in(this, HRTIME_MSECONDS(net_retry_delay));
+ t->schedule_in(this, HRTIME_MSECONDS(net_retry_delay));
return EVENT_DONE;
} else {
e->schedule_in(HRTIME_MSECONDS(net_retry_delay));
@@ -1145,6 +1145,8 @@ UnixNetVConnection::acceptEvent(int event, Event *e)
}
}
+ thread = t;
+
if (action_.cancelled) {
free(thread);
return EVENT_DONE;
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.