[GitHub] trafficserver pull request #1520: Report protocol in request via header

2017-03-03 Thread shukitchan
Github user shukitchan commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1520#discussion_r104270172
  
--- Diff: proxy/http/HttpTransactHeaders.cc ---
@@ -741,26 +741,14 @@ 
HttpTransactHeaders::insert_via_header_in_request(HttpTransact::State *s, HTTPHd
   }
 
   char *incoming_via = s->via_string;
-  int scheme = s->orig_scheme;
-  ink_assert(scheme >= 0);
-
-  int scheme_len   = hdrtoken_index_to_length(scheme);
-  int32_t hversion = header->version_get().m_version;
-
-  memcpy(via_string, hdrtoken_index_to_wks(scheme), scheme_len);
-  via_string += scheme_len;
-
-  // Common case (I hope?)
-  if ((HTTP_MAJOR(hversion) == 1) && HTTP_MINOR(hversion) == 1) {
-memcpy(via_string, "/1.1 ", 5);
-via_string += 5;
-  } else {
-*via_string++ = '/';
-*via_string++ = '0' + HTTP_MAJOR(hversion);
-*via_string++ = '.';
-*via_string++ = '0' + HTTP_MINOR(hversion);
+  char const *proto_buf[10]; // 10 seems like a reasonable number of 
protos to print
+  int retval = s->state_machine->populate_client_protocol(proto_buf, 
countof(proto_buf));
+  for (int i = 0; i < retval; i++) {
+memcpy(via_string, proto_buf[i], strlen(proto_buf[i]));
--- End diff --

Run into some trouble and Alan is helping me out now. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1495: TS-4976: Fix casts and standardize add-hea...

2017-03-03 Thread SolidWallOfCode
Github user SolidWallOfCode closed the pull request at:

https://github.com/apache/trafficserver/pull/1495


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1515: Logging cache code map size fix

2017-03-03 Thread gtenev
Github user gtenev commented on the issue:

https://github.com/apache/trafficserver/pull/1515
  
@jpeach: sounds like right thing to do, needed a quick fix, will find some 
time to make the API less error-prone. 
@zwoop: sir, yes, sir! 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1532: ATS 7.1 release running out of memory

2017-03-03 Thread shinrich
Github user shinrich commented on the issue:

https://github.com/apache/trafficserver/issues/1532
  
Any indication of object buildup in a particular type of object pool?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1532: ATS 7.1 release running out of memory

2017-03-03 Thread bryancall
GitHub user bryancall opened an issue:

https://github.com/apache/trafficserver/issues/1532

ATS 7.1 release running out of memory

Here is a backtrace from a bunch of cores I am getting from 7.1.  They are 
mostly issues with memory allocation:
[bcall@e24 ~]$ egrep '\#2 |\#3 |\#4 |\#5 ' ~/gdb.out

> #2  0x007857e8 in UnixNetProcessor::allocate_vc (this=0x105cc20, 
t=0x0) at ../../../../trafficserver/iocore/net/UnixNetProcessor.cc:460
> #3  0x00782bdf in NetAccept::do_blocking_accept 
(this=0x2b9b280253d0, t=0x2b9b281d6050) at 
../../../../trafficserver/iocore/net/UnixNetAccept.cc:259
> #4  0x00783a1b in NetAccept::acceptLoopEvent 
(this=0x2b9b280253d0, event=1, e=0x2b9b281cf3c0) at 
../../../../trafficserver/iocore/net/UnixNetAccept.cc:469
> #5  0x00515468 in Continuation::handleEvent (this=0x2b9b280253d0, 
event=1, data=0x2b9b281cf3c0) at 
/home/bcall/dev/yahoo/build/_build/ats_build/../../trafficserver/iocore/eventsystem/I_Continuation.h:153
> #2  0x2af5d64098d0 in ink_abort (message_format=0x2af5d64200f0 
"couldn't allocate %zu bytes at alignment %zu - insufficient memory") at 
../../../../trafficserver/lib/ts/ink_error.cc:99
> #3  0x2af5d640deff in ats_memalign (alignment=4096, size=4194304) at 
../../../../trafficserver/lib/ts/ink_memory.cc:108
> #4  0x00515638 in IOBufferData::alloc (this=0x2af631221260, 
size_index=-4194304, type=MEMALIGNED) at 
/home/bcall/dev/yahoo/build/_build/ats_build/../../trafficserver/iocore/eventsystem/P_IOBuffer.h:288
> #5  0x00515579 in new_IOBufferData_internal (loc=0x814bf0 
"memory/IOBuffer/../../../../trafficserver/iocore/cache/Cache.cc:2498", 
size_index=-4194304, type=MEMALIGNED) at 
/home/bcall/dev/yahoo/build/_build/ats_build/../../trafficserver/iocore/eventsystem/P_IOBuffer.h:264
> #2  0x2b46476178d0 in ink_abort (message_format=0x2b464762e0f0 
"couldn't allocate %zu bytes at alignment %zu - insufficient memory") at 
../../../../trafficserver/lib/ts/ink_error.cc:99
> #3  0x2b464761beff in ats_memalign (alignment=4096, size=33554432) at 
../../../../trafficserver/lib/ts/ink_memory.cc:108
> #4  0x2b464761c938 in freelist_new (f=0x14ec000) at 
../../../../trafficserver/lib/ts/ink_queue.cc:212
> #5  0x2b464761c832 in ink_freelist_new (f=0x14ec000) at 
../../../../trafficserver/lib/ts/ink_queue.cc:183
> #2  0x2aed89fc08d0 in ink_abort (message_format=0x2aed89fd70f0 
"couldn't allocate %zu bytes at alignment %zu - insufficient memory") at 
../../../../trafficserver/lib/ts/ink_error.cc:99
> #3  0x2aed89fc4eff in ats_memalign (alignment=4096, size=987136) at 
../../../../trafficserver/lib/ts/ink_memory.cc:108
> #4  0x2aed89fc5938 in freelist_new (f=0x25bb5d0) at 
../../../../trafficserver/lib/ts/ink_queue.cc:212
> #5  0x2aed89fc5832 in ink_freelist_new (f=0x25bb5d0) at 
../../../../trafficserver/lib/ts/ink_queue.cc:183
> #2  0x2b3d66d4a8d0 in ink_abort (message_format=0x2b3d66d610f0 
"couldn't allocate %zu bytes at alignment %zu - insufficient memory") at 
../../../../trafficserver/lib/ts/ink_error.cc:99
> #3  0x2b3d66d4eeff in ats_memalign (alignment=4096, size=33554432) at 
../../../../trafficserver/lib/ts/ink_memory.cc:108
> #4  0x2b3d66d4f938 in freelist_new (f=0x1f5) at 
../../../../trafficserver/lib/ts/ink_queue.cc:212
> #5  0x2b3d66d4f832 in ink_freelist_new (f=0x1f5) at 
../../../../trafficserver/lib/ts/ink_queue.cc:183
> #2  0x2af391be38d0 in ink_abort (message_format=0x2af391bfa0f0 
"couldn't allocate %zu bytes at alignment %zu - insufficient memory") at 
../../../../trafficserver/lib/ts/ink_error.cc:99
> #3  0x2af391be7eff in ats_memalign (alignment=4096, size=3407872) at 
../../../../trafficserver/lib/ts/ink_memory.cc:108
> #4  0x00515638 in IOBufferData::alloc (this=0x2ab464602e90, 
size_index=-3407872, type=MEMALIGNED) at 
/home/bcall/dev/yahoo/build/_build/ats_build/../../trafficserver/iocore/eventsystem/P_IOBuffer.h:288
> #5  0x00515579 in new_IOBufferData_internal (loc=0x814bf0 
"memory/IOBuffer/../../../../trafficserver/iocore/cache/Cache.cc:2498", 
size_index=-3407872, type=MEMALIGNED) at 
/home/bcall/dev/yahoo/build/_build/ats_build/../../trafficserver/iocore/eventsystem/P_IOBuffer.h:264
> #2  0x00534d3d in TSHttpSsnClientAddrGet (ssnp=0x2ab21f4d1bc0) at 
../../../trafficserver/proxy/InkAPI.cc:5445
> #3  0x00534d8b in TSHttpTxnClientAddrGet (txnp=0x2ab48b84cc00) at 
../../../trafficserver/proxy/InkAPI.cc:5453
> #4  0x2aaab248f8f6 in http_hook (contp=0x275cf40, event=60006, 
edata=0x2ab48b84cc00) at INKPluginInit.cc:174
> #5  0x0052a025 in INKContInternal::handle_event (this=0x275cf40, 
event=60006, edata=0x2ab48b84cc00) at 
../../../trafficserver/proxy/InkAPI.cc:1048
> #2  0x2ab0ec4f18d0 in ink_abort (message_format=0x2ab0ec5074f0 
"%s:%d: failed 

[GitHub] trafficserver issue #1531: Assertion in state_read_server_response_header (v...

2017-03-03 Thread shinrich
Github user shinrich commented on the issue:

https://github.com/apache/trafficserver/issues/1531
  
Oh, nevermind.  I saw vio = NULL in the stack, but that is the local 
variable.

That makes sense that the event would be passing up the write via.  It is a 
write event we are processing.  But it looks like the handler is only expecting 
a read event.   I guess a broken pipe shows up as a write event.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1531: Assertion in state_read_server_response_header (v...

2017-03-03 Thread zwoop
Github user zwoop commented on the issue:

https://github.com/apache/trafficserver/issues/1531
  
Hmmm, I see

```
(gdb) frame 4
#4  0x0064dbac in HttpSM::state_read_server_response_header 
(this=0x2aaab2ecc300, event=3, data=0x2aaadfe10fe0) at HttpSM.cc:1811
1811  ink_assert(server_entry->read_vio == (VIO *)data);
(gdb) p *server_entry
$5 = {vc = 0x2aaae0604c60, read_buffer = 0x0, write_buffer = 0x0, read_vio 
= 0x2aaadfe10f70, write_vio = 0x2aaadfe10fe0, vc_handler = (int 
(HttpSM::*)(HttpSM * const, int, void *)) 0x64da58 
, vc_type = 
HTTP_SERVER_VC, eos = true, in_tunnel = false}
(gdb) p (VIO*)data
$6 = (VIO *) 0x2aaadfe10fe0
```

So, as far as I can tell, "data" is set to the write_vio, but the assert 
checks against the read_vio.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1531: Assertion in state_read_server_response_header (v...

2017-03-03 Thread shinrich
Github user shinrich commented on the issue:

https://github.com/apache/trafficserver/issues/1531
  
The server_entry->read_vio is NULL.  From what I can tell this value only 
gets set due to do_io_read() calls in attach_server_session() and 
setup_server_read_response_header().  Presumably one of these do_io_read 
operations failed. 

Looking at the stack, we had a failure which is getting trigger via the 
write path (errno 32 broken pipe).

I'm guessing that we should have started handling the failure where the 
do_io_read failed presumably in setup_server_read_response_header().


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1531: Assertion in state_read_server_response_header (v...

2017-03-03 Thread zwoop
GitHub user zwoop opened an issue:

https://github.com/apache/trafficserver/issues/1531

Assertion in state_read_server_response_header (v7.1.0)

Seeing this on docs (infrequently):

```
(gdb) bt full
#0  0x757b21d7 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 5856
selftid = 5862
#1  0x757b38c8 in __GI_abort () at abort.c:90
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 
0x0}, sa_mask = {__val = {0 }}, sa_flags = 0, sa_restorer = 
0x300a00440}
sigs = {__val = {32, 0 }}
#2  0x77bb28fe in ink_abort (message_format=0x77bc9160 "%s:%d: 
failed assertion `%s`") at ink_error.cc:99
ap = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 
0x2affe960, reg_save_area = 0x2affe8a0}}
#3  0x77baffbf in _ink_assert (expression=0x902628 
"server_entry->read_vio == (VIO *)data", file=0x9018ec "HttpSM.cc", line=1811) 
at ink_assert.cc:37
No locals.
#4  0x0064dbac in HttpSM::state_read_server_response_header 
(this=0x2aaab2ecc300, event=3, data=0x2aaadfe10fe0) at HttpSM.cc:1811
__FUNCTION__ = "state_read_server_response_header"
bytes_used = -1426065664
vio = 0x0
state = 10922
#5  0x00650eca in HttpSM::main_handler (this=0x2aaab2ecc300, 
event=3, data=0x2aaadfe10fe0) at HttpSM.cc:2663
jump_point = (int (HttpSM::*)(HttpSM * const, int, void *)) 
0x64da58 
__FUNCTION__ = "main_handler"
vc_entry = 0x2aaab2ecdb08
#6  0x0057472a in Continuation::handleEvent (this=0x2aaab2ecc300, 
event=3, data=0x2aaadfe10fe0) at 
/usr/local/src/trafficserver/iocore/eventsystem/I_Continuation.h:153
No locals.
#7  0x00806eed in write_signal_and_update (event=3, 
vc=0x2aaadfe10e40) at UnixNetVConnection.cc:176
__FUNCTION__ = "write_signal_and_update"
#8  0x00807124 in write_signal_done (event=3, nh=0x73009e50, 
vc=0x2aaadfe10e40) at UnixNetVConnection.cc:218
No locals.
#9  0x008071b4 in write_signal_error (nh=0x73009e50, 
vc=0x2aaadfe10e40, lerrno=32) at UnixNetVConnection.cc:237
No locals.
#10 0x008080d0 in write_to_net_io (nh=0x73009e50, 
vc=0x2aaadfe10e40, thread=0x73006000) at UnixNetVConnection.cc:463
err = 32
errlen = 4
s = 0x2aaadfe10fd8
mutex = 0x73512db0
lock = {m = {m_ptr = 0x2aaab0402ca0}, lock_acquired = true}
__FUNCTION__ = "write_to_net_io"
ntodo = 910
buf = 
towrite = 46913388875328
signalled = 0
needs = 32
total_written = 4
r = 140737294027776
#11 0x00807ead in write_to_net (nh=0x73009e50, 
vc=0x2aaadfe10e40, thread=0x73006000) at UnixNetVConnection.cc:435
mutex = 0x73512db0
#12 0x007ff2d8 in NetHandler::mainNetEvent (this=0x73009e50, 
event=5, e=0x2bc05ca0) at UnixNet.cc:526
epd = 0x2aaadfe10da8
poll_timeout = 0
pd = 0x72f1d000
vc = 0x2aaadfe10e40
__FUNCTION__ = "mainNetEvent"
#13 0x0057472a in Continuation::handleEvent (this=0x73009e50, 
event=5, data=0x2bc05ca0) at 
/usr/local/src/trafficserver/iocore/eventsystem/I_Continuation.h:153
No locals.
#14 0x0082b522 in EThread::process_event (this=0x73006000, 
e=0x2bc05ca0, calling_code=5) at UnixEThread.cc:143
c_temp = 0x73009e50
lock = {m = {m_ptr = 0x73512480}, lock_acquired = true}
__FUNCTION__ = "process_event"
#15 0x0082bb01 in EThread::execute (this=0x73006000) at 
UnixEThread.cc:270
done_one = false
e = 0x2bc05ca0
NegativeQueue = {> = {head = 
0x2bc04f80}, tail = 0x2bc041a0}
next_time = 1488388269045403248
__FUNCTION__ = "execute"
#16 0x0082ab3c in spawn_thread_internal (a=0x74539fa0) at 
Thread.cc:84
p = 0x74539fa0
#17 0x7604bdc5 in start_thread (arg=0x2afff700) at 
pthread_create.c:308
__res = 
pd = 0x2afff700
now = 
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {46912501708544, 
8358616470746199031, 0, 140737488348672, 46912501708544, 0, 
2786198315644908535, -8358635357929704457}, mask_was_saved = 0}}, priv = {pad = 
{0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 
pagesize_m1 = 
sp = 
freesize = 
#18 0x7587473d in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:113
No locals.
   

[GitHub] trafficserver pull request #1473: Avoid forcing "proxied URL" in case of tra...

2017-03-03 Thread ushachar
Github user ushachar commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1473#discussion_r104184151
  
--- Diff: proxy/http/HttpTransact.cc ---
@@ -7845,10 +7845,12 @@ HttpTransact::build_request(State *s, HTTPHdr 
*base_request, HTTPHdr *outgoing_r
   DebugTxn("http_trans", "[build_request] adding target to URL for 
parent proxy");
   outgoing_request->set_url_target_from_host_field();
 }
-  } else if (s->next_hop_scheme == URL_WKSIDX_HTTP || s->next_hop_scheme 
== URL_WKSIDX_HTTPS ||
- s->next_hop_scheme == URL_WKSIDX_WS || s->next_hop_scheme == 
URL_WKSIDX_WSS) {
+  } else if (!(s->client_info.is_transparent && 
base_request->is_target_in_url()) &&
--- End diff --

It's not equivalent -- the additional () forces both terms to be evaluated 
(even if the first one is false)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1510: Crash at HttpSM::state_request_wait_for_transform...

2017-03-03 Thread SolidWallOfCode
Github user SolidWallOfCode commented on the issue:

https://github.com/apache/trafficserver/pull/1510
  
Otherwise it looks reasonable to me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1510: Crash at HttpSM::state_request_wait_for_transform...

2017-03-03 Thread SolidWallOfCode
Github user SolidWallOfCode commented on the issue:

https://github.com/apache/trafficserver/pull/1510
  
I wonder why we haven't seen this before.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1495: TS-4976: Fix casts and standardize add-header.

2017-03-03 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1495
  
clang-analyzer build *successful*! See 
https://ci.trafficserver.apache.org/job/clang-analyzer-github/227/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1530: lib/bindings fail to build with system lua.h inst...

2017-03-03 Thread mingzym
GitHub user mingzym opened an issue:

https://github.com/apache/trafficserver/issues/1530

lib/bindings fail to build with system lua.h installed

```
make[4]: Nothing to be done for `all-am'.
Making all in bindings
  CXX  lua.lo
  CXX  bindings.lo
  CXX  repl.lo
  CXX  metrics.lo
lua.cc:56:14: error: use of undeclared identifier 'lua_equal'; did you mean 
'lua_rawequal'?
result = lua_equal(L, -1, -2) == 1;
 ^
 lua_rawequal
/opt/local/include/lua.h:217:16: note: 'lua_rawequal' declared here
LUA_API int   (lua_rawequal) (lua_State *L, int idx1, int idx2);
   ^
1 error generated.
make[3]: *** [lua.lo] Error 1
make[3]: *** Waiting for unfinished jobs
In file included from metrics.cc:24:
./bindings.h:65:67: error: unknown type name 'luaL_reg'; did you mean 
'luaL_Reg'?
  static void register_metatable(lua_State *, const char *, const luaL_reg 
*);
  ^~~~
  luaL_Reg
/opt/local/include/lauxlib.h:34:3: note: 'luaL_Reg' declared here
} luaL_Reg;
  ^
In file included from repl.cc:25:
./bindings.h:65:67: error: unknown type name 'luaL_reg'; did you mean 
'luaL_Reg'?
  static void register_metatable(lua_State *, const char *, const luaL_reg 
*);
  ^~~~
  luaL_Reg
/opt/local/include/lauxlib.h:34:3: note: 'luaL_Reg' declared here
} luaL_Reg;
  ^
1 error generated.
In file included from bindings.cc:24:
./bindings.h:65:67: error: unknown type name 'luaL_reg'; did you mean 
'luaL_Reg'?
  static void register_metatable(lua_State *, const char *, const luaL_reg 
*);
  ^~~~
  luaL_Reg
/opt/local/include/lauxlib.h:34:3: note: 'luaL_Reg' declared here
} luaL_Reg;
  ^
make[3]: *** [repl.lo] Error 1
bindings.cc:330:77: error: unknown type name 'luaL_reg'; did you mean 
'luaL_Reg'?
BindingInstance::register_metatable(lua_State *lua, const char *name, const 
luaL_reg *metatable)

^~~~

luaL_Reg
/opt/local/include/lauxlib.h:34:3: note: 'luaL_Reg' declared here
} luaL_Reg;
  ^
bindings.cc:339:3: error: use of undeclared identifier 'luaL_register'
  luaL_register(lua, nullptr, metatable);
  ^
metrics.cc:51:5: error: use of undeclared identifier 'luaL_typerror'; did 
you mean 'luaL_argerror'?
luaL_typerror(L, index, "userdata");
^
luaL_argerror
/opt/local/include/lauxlib.h:46:17: note: 'luaL_argerror' declared here
LUALIB_API int (luaL_argerror) (lua_State *L, int arg, const char 
*extramsg);
^
3 errors generated.
metrics.cc:141:5: error: use of undeclared identifier 'luaL_typerror'; did 
you mean 'luaL_argerror'?
luaL_typerror(L, 3, "userdata or table");
^
luaL_argerror
/opt/local/include/lauxlib.h:46:17: note: 'luaL_argerror' declared here
LUALIB_API int (luaL_argerror) (lua_State *L, int arg, const char 
*extramsg);
^
metrics.cc:199:16: error: unknown type name 'luaL_reg'; did you mean 
'luaL_Reg'?
  static const luaL_reg metatable[] = {
   ^~~~
   luaL_Reg
/opt/local/include/lauxlib.h:34:3: note: 'luaL_Reg' declared here
} luaL_Reg;
  ^
make[3]: *** [bindings.lo] Error 1
4 errors generated.
make[3]: *** [metrics.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
zymMBPr:trafficserver zym$
```






---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1495: TS-4976: Fix casts and standardize add-header.

2017-03-03 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1495
  
Intel CC build *successful*! See 
https://ci.trafficserver.apache.org/job/icc-github/95/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1495: TS-4976: Fix casts and standardize add-header.

2017-03-03 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1495
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/linux-github/1559/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1495: TS-4976: Fix casts and standardize add-header.

2017-03-03 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1495
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/freebsd-github/1663/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1476: Crash in get_client_addr()

2017-03-03 Thread shinrich
Github user shinrich commented on the issue:

https://github.com/apache/trafficserver/issues/1476
  
Still struggling with this issue.  Running into it every 2-4 hours in 
production.  At this point, I think it is a use-after-free, but as noted avoid 
ASAN fails in this case.  

Looking at a core more closely, it seems to be an incoming client VC that 
is being messed up.  In the core, the remote_addr of the VC did not match the 
src_addr in the HttpSM.  Both IP addresses show up in our squid.log at roughly 
the same time.

We are running with accept threads.  I'm going to turn that off on my test 
machine,  I assume that will eliminate this race condition.  If so, then will 
need to press on and see how we are freeing the VC early.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1498: Problems with ASAN builds in 7.1

2017-03-03 Thread shinrich
Github user shinrich commented on the issue:

https://github.com/apache/trafficserver/issues/1498
  
Actually it looks like the issue is just tracking down the particular issue 
in #1476 / #1480.

I enabled ASAN while merging in another issue, and it caught the double 
free in there just fine.  So I think we are good with the ASAN and I am just 
running into a flaw in ASAN.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1529: cppapi broken building on FreeBSD 11

2017-03-03 Thread SolidWallOfCode
Github user SolidWallOfCode commented on the issue:

https://github.com/apache/trafficserver/issues/1529
  
Are you sure you're using the right codebase? This builds on the CI FreeBSD 
and I can see the declaration of `Transaction::setEvent` 
[here:https://github.com/apache/trafficserver/blob/master/lib/cppapi/include/atscppapi/Transaction.h#L90].
 There was a library name change for 7.X, note the source is now in 
`lib/cppapi` not `lib/atscppapi/src`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1527: More and slower active connections in 7.1.x

2017-03-03 Thread shinrich
Github user shinrich commented on the issue:

https://github.com/apache/trafficserver/issues/1527
  
So do you think this is making a real performance difference?  Or are we 
just not timing out connections as quickly now?

I hadn't noticed a difference in number of active connections, but I'll 
keep an eye out for that in my testing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1526: When SSL connect fails, we return 502 succ...

2017-03-03 Thread shinrich
Github user shinrich closed the pull request at:

https://github.com/apache/trafficserver/pull/1526


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1526: When SSL connect fails, we return 502 success

2017-03-03 Thread shinrich
Github user shinrich commented on the issue:

https://github.com/apache/trafficserver/pull/1526
  
Yes, I suppose since it is a latent issue and not a regression it doesn't 
need to be in the 7.1 train.  We will separately pull it into our version.  Set 
version to 7.2


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1526: When SSL connect fails, we return 502 success

2017-03-03 Thread SolidWallOfCode
Github user SolidWallOfCode commented on the issue:

https://github.com/apache/trafficserver/pull/1526
  
Ship it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1511: heap-use-after-free: Access ua_session aft...

2017-03-03 Thread oknet
Github user oknet closed the pull request at:

https://github.com/apache/trafficserver/pull/1511


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1529: cppapi broken building on FreeBSD 11

2017-03-03 Thread mingzym
GitHub user mingzym opened an issue:

https://github.com/apache/trafficserver/issues/1529

cppapi broken building on FreeBSD 11

```
gmake[3]: Entering directory '/usr/home/zym/traffic/lib/cppapi'
  CXX  AsyncHttpFetch.lo
  CXX  GlobalPlugin.lo
  CXX  InterceptPlugin.lo
  CXX  Request.lo
  CXX  Stat.lo
  CXX  RemapPlugin.lo
  CXX  Response.lo
  CXX  Transaction.lo
In file included from GlobalPlugin.cc:27:
/home/zym/traffic/lib/cppapi/include/utils_internal.h:71:19: error: no 
member named 'setEvent' in 'atscppapi::Transaction'
  transaction.setEvent(event);
  ~~~ ^
/home/zym/traffic/lib/cppapi/include/utils_internal.h:77:19: error: no 
member named 'resetHandles' in 'atscppapi::Transaction'
  transaction.resetHandles();
  ~~~ ^
2 errors generated.
gmake[3]: *** [Makefile:807: GlobalPlugin.lo] Error 1
gmake[3]: *** Waiting for unfinished jobs
In file included from InterceptPlugin.cc:28:
/home/zym/traffic/lib/cppapi/include/utils_internal.h:71:19: error: no 
member named 'setEvent' in 'atscppapi::Transaction'
  transaction.setEvent(event);
  ~~~ ^
/home/zym/traffic/lib/cppapi/include/utils_internal.h:77:19: error: no 
member named 'resetHandles' in 'atscppapi::Transaction'
  transaction.resetHandles();
  ~~~ ^
In file included from AsyncHttpFetch.cc:29:
/home/zym/traffic/lib/cppapi/include/utils_internal.h:71:19: error: no 
member named 'setEvent' in 'atscppapi::Transaction'
  transaction.setEvent(event);
  ~~~ ^
/home/zym/traffic/lib/cppapi/include/utils_internal.h:77:19: error: no 
member named 'resetHandles' in 'atscppapi::Transaction'
  transaction.resetHandles();
  ~~~ ^
2 errors generated.
In file included from Request.cc:25:
/home/zym/traffic/lib/cppapi/include/utils_internal.h:71:19: error: no 
member named 'setEvent' in 'atscppapi::Transaction'
  transaction.setEvent(event);
  ~~~ ^
/home/zym/traffic/lib/cppapi/include/utils_internal.h:77:19: error: no 
member named 'resetHandles' in 'atscppapi::Transaction'
  transaction.resetHandles();
  ~~~ ^
InterceptPlugin.cc:257:7: error: use of undeclared identifier 'isWebsocket'
  if (isWebsocket()) {
  ^
gmake[3]: *** [Makefile:807: AsyncHttpFetch.lo] Error 1
Request.cc:181:10: error: out-of-line definition of 'setHost' does not 
match any declaration in 'atscppapi::Request'
Request::setHost(std::string const )
 ^~~
3 errors generated.
gmake[3]: *** [Makefile:807: Request.lo] Error 1
3 errors generated.
gmake[3]: *** [Makefile:807: InterceptPlugin.lo] Error 1
In file included from RemapPlugin.cc:24:
/home/zym/traffic/lib/cppapi/include/utils_internal.h:71:19: error: no 
member named 'setEvent' in 'atscppapi::Transaction'
  transaction.setEvent(event);
  ~~~ ^
/home/zym/traffic/lib/cppapi/include/utils_internal.h:77:19: error: no 
member named 'resetHandles' in 'atscppapi::Transaction'
  transaction.resetHandles();
  ~~~ ^
2 errors generated.
gmake[3]: *** [Makefile:807: RemapPlugin.lo] Error 1
In file included from Response.cc:23:
/home/zym/traffic/lib/cppapi/include/utils_internal.h:71:19: error: no 
member named 'setEvent' in 'atscppapi::Transaction'
  transaction.setEvent(event);
  ~~~ ^
/home/zym/traffic/lib/cppapi/include/utils_internal.h:77:19: error: no 
member named 'resetHandles' in 'atscppapi::Transaction'
  transaction.resetHandles();
  ~~~ ^
2 errors generated.
gmake[3]: *** [Makefile:807: Response.lo] Error 1
In file included from Transaction.cc:32:
/home/zym/traffic/lib/cppapi/include/utils_internal.h:71:19: error: no 
member named 'setEvent' in 'atscppapi::Transaction'
  transaction.setEvent(event);
  ~~~ ^
/home/zym/traffic/lib/cppapi/include/utils_internal.h:77:19: error: no 
member named 'resetHandles' in 'atscppapi::Transaction'
  transaction.resetHandles();
  ~~~ ^
Transaction.cc:106:14: error: out-of-line definition of 'setEvent' does not 
match any declaration in 'atscppapi::Transaction'
Transaction::setEvent(TSEvent event)
 ^~~~
Transaction.cc:511:14: error: out-of-line definition of 'resetHandles' does 
not match any declaration in 'atscppapi::Transaction'
Transaction::resetHandles()
 ^~~~
4 errors generated.
gmake[3]: *** [Makefile:807: Transaction.lo] Error 1
gmake[3]: Leaving directory '/usr/home/zym/traffic/lib/cppapi'
gmake[2]: *** [Makefile:597: all-recursive] Error 1
gmake[2]: Leaving directory '/usr/home/zym/traffic/lib'
gmake[1]: *** [Makefile:536: all] 

[GitHub] trafficserver issue #1522: Ingore read and write errors if vio has been clea...

2017-03-03 Thread oknet
Github user oknet commented on the issue:

https://github.com/apache/trafficserver/pull/1522
  
or we can use:

```
if (vc->write.enabled && vc->write.triggered || vc->write.error && 
vc->write.vio._cont != nullptr)
```

keep old condition then add new condition.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1522: Ingore read and write errors if vio has been clea...

2017-03-03 Thread oknet
Github user oknet commented on the issue:

https://github.com/apache/trafficserver/pull/1522
  
to review #947 again, my suggestion is 

```
diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index 85d7527..5ef65cb 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -505,7 +505,7 @@ NetHandler::mainNetEvent(int event, Event *e)
 set_cont_flags(vc->control_flags);
 if (vc->closed)
   close_UnixNetVConnection(vc, trigger_event->ethread);
-else if ((vc->read.enabled || vc->read.error) && vc->read.triggered)
+else if ((vc->read.enabled || vc->read.error) && vc->read.triggered && 
vc->read.vio._cont != nullptr)
   vc->net_read_io(this, trigger_event->ethread);
 else if (!vc->read.enabled) {
   read_ready_list.remove(vc);
@@ -522,7 +522,7 @@ NetHandler::mainNetEvent(int event, Event *e)
 set_cont_flags(vc->control_flags);
 if (vc->closed)
   close_UnixNetVConnection(vc, trigger_event->ethread);
-else if ((vc->write.enabled || vc->write.error) && vc->write.triggered)
+else if ((vc->write.enabled || vc->write.error) && vc->write.triggered 
&& vc->write.vio._cont != nullptr)
   write_to_net(this, vc, trigger_event->ethread);
 else if (!vc->write.enabled) {
   write_ready_list.remove(vc);
@@ -540,7 +540,7 @@ NetHandler::mainNetEvent(int event, Event *e)
 diags->set_override(vc->control.debug_override);
 if (vc->closed)
   close_UnixNetVConnection(vc, trigger_event->ethread);
-else if ((vc->read.enabled || vc->read.error) && vc->read.triggered)
+else if ((vc->read.enabled || vc->read.error) && vc->read.triggered && 
vc->read.vio._cont != nullptr)
   vc->net_read_io(this, trigger_event->ethread);
 else if (!vc->read.enabled)
   vc->ep.modify(-EVENTIO_READ);
@@ -549,7 +549,7 @@ NetHandler::mainNetEvent(int event, Event *e)
 diags->set_override(vc->control.debug_override);
 if (vc->closed)
   close_UnixNetVConnection(vc, trigger_event->ethread);
-else if ((vc->write.enabled || vc->write.error) && vc->write.triggered)
+else if ((vc->write.enabled || vc->write.error) && vc->write.triggered 
&& vc->write.vio._cont != nullptr)
   write_to_net(this, vc, trigger_event->ethread);
 else if (!vc->write.enabled)
   vc->ep.modify(-EVENTIO_WRITE);
```

Before PR#947:

- IOCore Net Sub-System only callback to SM if vc->read.enabled is set to 1 
and vc->read.triggered is set to 1.
- vc->read.enabled must not 0 if vc->read.vio._cont is not nullptr.
- there are 2 ways to set the read.enabled to 0: 
  - do_io_read(NULL, 0, NULL), both set vio._cont to nullptr
  - do_io_read(this, 0, NULL), keep vio._cont not nullptr
- that means read.enabled==1 is indicate vio._cont is not nullptr.
- but read.enabled==0 is not means vio._cont is nullptr.

The target of PR#947 is making iocore to notify EPOLLERR to SM even 
read.enabled is set to 0.
But the PR#947 forgot to finger out vio._cont is nullptr state.

the vc->net_read_io is designed to callback SM and Net sub-system must 
assure the vio can be callback.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---