You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2016/10/12 22:38:22 UTC
[trafficserver] branch 7.0.x updated (ab243cb -> 31b7a72)
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a change to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.
from ab243cb TS-4938: Avoid crashes due to NULL vc dereferences.
new d2e7ccd TS-4911: ts_lua plugin is modified to clear 'client_response_hdrp' pointer when it enters SEND_RESPONSE_HDR hook.
new 506f7db TS-4558: ASAN buffer overflow in traffic_manager -h
new 31df140 Fix race condition in traffic_server startup
new ba657f1 TS-4884: Remove a few unused variables/define in EThread
new 31b7a72 TS-4905: Set parent NULL after destroy() is called
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
cmd/traffic_manager/traffic_manager.cc | 4 ++--
iocore/eventsystem/I_EThread.h | 6 ------
iocore/eventsystem/UnixEThread.cc | 3 ---
mgmt/ProcessManager.cc | 7 ++++---
mgmt/ProcessManager.h | 1 +
plugins/experimental/ts_lua/ts_lua.c | 7 +++++++
plugins/experimental/ts_lua/ts_lua_util.c | 8 ++++++++
proxy/http/Http1ClientTransaction.cc | 1 +
8 files changed, 23 insertions(+), 14 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].
[trafficserver] 02/05: TS-4558: ASAN buffer overflow in
traffic_manager -h
Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 506f7db36a2c451909643d7d3579ed76d3887280
Author: Steven Feltner <sf...@godaddy.com>
AuthorDate: Tue Sep 27 13:10:31 2016 -0700
TS-4558: ASAN buffer overflow in traffic_manager -h
(cherry picked from commit 160e7bf37854bc9478dadcbf8449430e3cf9df5d)
---
cmd/traffic_manager/traffic_manager.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmd/traffic_manager/traffic_manager.cc b/cmd/traffic_manager/traffic_manager.cc
index 34cd11a..93b27e1 100644
--- a/cmd/traffic_manager/traffic_manager.cc
+++ b/cmd/traffic_manager/traffic_manager.cc
@@ -81,7 +81,7 @@ static AppVersionInfo appVersionInfo; // Build info for this application
static inkcoreapi DiagsConfig *diagsConfig;
static char debug_tags[1024] = "";
static char action_tags[1024] = "";
-static bool proxy_off = false;
+static int proxy_off = false;
static char bind_stdout[512] = "";
static char bind_stderr[512] = "";
@@ -436,7 +436,7 @@ main(int argc, const char **argv)
char *proxy_port = 0;
int proxy_backdoor = -1;
char *group_addr = NULL, *tsArgs = NULL;
- bool disable_syslog = false;
+ int disable_syslog = false;
char userToRunAs[MAX_LOGIN + 1];
RecInt fds_throttle = -1;
time_t ticker;
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 03/05: Fix race condition in traffic_server startup
Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 31df140738b5c52d227a3b88e2323bff654b5707
Author: Shrihari Kalkar <ks...@hotmail.com>
AuthorDate: Wed Aug 17 19:32:49 2016 -0700
Fix race condition in traffic_server startup
Set max_msgs_in_row to 1 during traffic_server startup to avoid hitting
race condition as seen in issue TS-4735
(cherry picked from commit 0fd360bd3154a02a8c532de87f6b001adf14ed7f)
---
mgmt/ProcessManager.cc | 7 ++++---
mgmt/ProcessManager.h | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/mgmt/ProcessManager.cc b/mgmt/ProcessManager.cc
index 0ddfcbc..a5c61cd 100644
--- a/mgmt/ProcessManager.cc
+++ b/mgmt/ProcessManager.cc
@@ -68,7 +68,7 @@ startProcessManager(void *arg)
return ret;
} /* End startProcessManager */
-ProcessManager::ProcessManager(bool rlm) : BaseManager(), require_lm(rlm), local_manager_sockfd(0), cbtable(NULL)
+ProcessManager::ProcessManager(bool rlm) : BaseManager(), require_lm(rlm), local_manager_sockfd(0), cbtable(NULL), max_msgs_in_a_row(1)
{
mgmt_signal_queue = create_queue();
@@ -83,6 +83,7 @@ void
ProcessManager::reconfigure()
{
bool found;
+ max_msgs_in_a_row = MAX_MSGS_IN_A_ROW;
timeout = REC_readInteger("proxy.config.process_manager.timeout", &found);
ink_assert(found);
@@ -226,7 +227,7 @@ ProcessManager::pollLMConnection()
// Avoid getting stuck enqueuing too many requests in a row, limit to MAX_MSGS_IN_A_ROW.
int count;
- for (count = 0; count < MAX_MSGS_IN_A_ROW; ++count) {
+ for (count = 0; count < max_msgs_in_a_row; ++count) {
int num;
num = mgmt_read_timeout(local_manager_sockfd, 1 /* sec */, 0 /* usec */);
@@ -262,7 +263,7 @@ ProcessManager::pollLMConnection()
}
}
- Debug("pmgmt", "[ProcessManager::pollLMConnection] enqueued %d of max %d messages in a row", count, MAX_MSGS_IN_A_ROW);
+ Debug("pmgmt", "[ProcessManager::pollLMConnection] enqueued %d of max %d messages in a row", count, max_msgs_in_a_row);
} /* End ProcessManager::pollLMConnection */
void
diff --git a/mgmt/ProcessManager.h b/mgmt/ProcessManager.h
index 7ea5072..97a67a4 100644
--- a/mgmt/ProcessManager.h
+++ b/mgmt/ProcessManager.h
@@ -103,6 +103,7 @@ private:
static const int MAX_MSGS_IN_A_ROW = 10000;
ConfigUpdateCbTable *cbtable;
+ int max_msgs_in_a_row;
}; /* End class ProcessManager */
inkcoreapi extern ProcessManager *pmgmt;
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 01/05: TS-4911: ts_lua plugin is modified to clear
'client_response_hdrp' pointer when it enters SEND_RESPONSE_HDR hook.
Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit d2e7ccd5c4e374d0a00cd746f492bd3ff2fbef27
Author: rb304g <rb...@att.com>
AuthorDate: Thu Sep 29 18:42:56 2016 +0000
TS-4911: ts_lua plugin is modified to clear 'client_response_hdrp' pointer when it enters SEND_RESPONSE_HDR hook.
(cherry picked from commit 7662c30e48a444d0d8d37b2e2d34f71b21e3bfcd)
---
plugins/experimental/ts_lua/ts_lua.c | 7 +++++++
plugins/experimental/ts_lua/ts_lua_util.c | 8 ++++++++
2 files changed, 15 insertions(+)
diff --git a/plugins/experimental/ts_lua/ts_lua.c b/plugins/experimental/ts_lua/ts_lua.c
index 476c04a..11041dc 100644
--- a/plugins/experimental/ts_lua/ts_lua.c
+++ b/plugins/experimental/ts_lua/ts_lua.c
@@ -278,6 +278,13 @@ globalHookHandler(TSCont contp, TSEvent event ATS_UNUSED, void *edata)
break;
case TS_EVENT_HTTP_SEND_RESPONSE_HDR:
+ // client response can be changed within a transaction
+ // (e.g. due to the follow redirect feature). So, clearing the pointers
+ // to allow API(s) to fetch the pointers again when it re-enters the hook
+ if (http_ctx->client_response_hdrp != NULL) {
+ TSHandleMLocRelease(http_ctx->client_response_bufp, TS_NULL_MLOC, http_ctx->client_response_hdrp);
+ http_ctx->client_response_hdrp = NULL;
+ }
lua_getglobal(l, TS_LUA_FUNCTION_G_SEND_RESPONSE);
break;
diff --git a/plugins/experimental/ts_lua/ts_lua_util.c b/plugins/experimental/ts_lua/ts_lua_util.c
index 4cfc9b8..b089d37 100644
--- a/plugins/experimental/ts_lua/ts_lua_util.c
+++ b/plugins/experimental/ts_lua/ts_lua_util.c
@@ -709,6 +709,14 @@ ts_lua_http_cont_handler(TSCont contp, TSEvent ev, void *edata)
case TS_EVENT_HTTP_SEND_RESPONSE_HDR:
+ // client response can be changed within a transaction
+ // (e.g. due to the follow redirect feature). So, clearing the pointers
+ // to allow API(s) to fetch the pointers again when it re-enters the hook
+ if (http_ctx->client_response_hdrp != NULL) {
+ TSHandleMLocRelease(http_ctx->client_response_bufp, TS_NULL_MLOC, http_ctx->client_response_hdrp);
+ http_ctx->client_response_hdrp = NULL;
+ }
+
lua_getglobal(L, TS_LUA_FUNCTION_SEND_RESPONSE);
if (lua_type(L, -1) == LUA_TFUNCTION) {
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 05/05: TS-4905: Set parent NULL after destroy() is
called
Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 31b7a7282951613917c4bdc73d838a8ff859161f
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Oct 4 17:56:45 2016 +0900
TS-4905: Set parent NULL after destroy() is called
(cherry picked from commit 60d3d1fc542f9d33317e35ced399bef1f9c89516)
---
proxy/http/Http1ClientTransaction.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/proxy/http/Http1ClientTransaction.cc b/proxy/http/Http1ClientTransaction.cc
index 2220e60..5097c8c 100644
--- a/proxy/http/Http1ClientTransaction.cc
+++ b/proxy/http/Http1ClientTransaction.cc
@@ -67,6 +67,7 @@ Http1ClientTransaction::transaction_done()
// If the parent session is not in the closed state, the destroy will not occur.
if (parent) {
parent->destroy();
+ parent = NULL;
}
}
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 04/05: TS-4884: Remove a few unused
variables/define in EThread
Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch 7.0.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit ba657f1d4a6faead99e4b32e11dc8221849d0f76
Author: Masato Gosui <mg...@yahoo-corp.jp>
AuthorDate: Wed Sep 21 18:24:41 2016 +0900
TS-4884: Remove a few unused variables/define in EThread
(cherry picked from commit ba5c4a78699ce83a2327361b72532014ef274e0e)
---
iocore/eventsystem/I_EThread.h | 6 ------
iocore/eventsystem/UnixEThread.cc | 3 ---
2 files changed, 9 deletions(-)
diff --git a/iocore/eventsystem/I_EThread.h b/iocore/eventsystem/I_EThread.h
index cf0999d..9e673cd 100644
--- a/iocore/eventsystem/I_EThread.h
+++ b/iocore/eventsystem/I_EThread.h
@@ -40,9 +40,6 @@
// instead.
#define MUTEX_RETRY_DELAY HRTIME_MSECONDS(20)
-/** Maximum number of accept events per thread. */
-#define MAX_ACCEPT_EVENTS 20
-
struct DiskHandler;
struct EventIO;
@@ -295,9 +292,6 @@ public:
EThread **ethreads_to_be_signalled;
int n_ethreads_to_be_signalled;
- Event *accept_event[MAX_ACCEPT_EVENTS];
- int main_accept_index;
-
int id;
unsigned int event_types;
bool is_event_type(EventType et);
diff --git a/iocore/eventsystem/UnixEThread.cc b/iocore/eventsystem/UnixEThread.cc
index cfb12a1..131bd69 100644
--- a/iocore/eventsystem/UnixEThread.cc
+++ b/iocore/eventsystem/UnixEThread.cc
@@ -45,7 +45,6 @@ EThread::EThread()
: generator((uint64_t)Thread::get_hrtime_updated() ^ (uint64_t)(uintptr_t)this),
ethreads_to_be_signalled(NULL),
n_ethreads_to_be_signalled(0),
- main_accept_index(-1),
id(NO_ETHREAD_ID),
event_types(0),
signal_hook(0),
@@ -58,7 +57,6 @@ EThread::EThread(ThreadType att, int anid)
: generator((uint64_t)Thread::get_hrtime_updated() ^ (uint64_t)(uintptr_t)this),
ethreads_to_be_signalled(NULL),
n_ethreads_to_be_signalled(0),
- main_accept_index(-1),
id(anid),
event_types(0),
signal_hook(0),
@@ -95,7 +93,6 @@ EThread::EThread(ThreadType att, Event *e)
: generator((uint32_t)((uintptr_t)time(NULL) ^ (uintptr_t)this)),
ethreads_to_be_signalled(NULL),
n_ethreads_to_be_signalled(0),
- main_accept_index(-1),
id(NO_ETHREAD_ID),
event_types(0),
signal_hook(0),
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.