[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-11-07 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=31739=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31739
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 07/Nov/16 17:41
Start Date: 07/Nov/16 17:41
Worklog Time Spent: 10m 
  Work Description: Github user PSUdaemon closed the pull request at:

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


Issue Time Tracking
---

Worklog Id: (was: 31739)
Time Spent: 5h 10m  (was: 5h)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
> Fix For: 6.2.1, 7.0.0
>
>  Time Spent: 5h 10m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-11-06 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=31711=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31711
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 07/Nov/16 04:47
Start Date: 07/Nov/16 04:47
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1205
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1188/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31711)
Time Spent: 5h  (was: 4h 50m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 5h
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-11-06 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=31710=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31710
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 07/Nov/16 04:41
Start Date: 07/Nov/16 04:41
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1205
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/1081/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31710)
Time Spent: 4h 50m  (was: 4h 40m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 4h 50m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-11-06 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=31708=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31708
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 07/Nov/16 04:32
Start Date: 07/Nov/16 04:32
Worklog Time Spent: 10m 
  Work Description: GitHub user oknet opened a pull request:

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

TS-4879: NetVC leaks while hyper emergency occur on 
check_emergency_throttle()



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/oknet/trafficserver TS-4879-6.2.x

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/1205.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1205


commit cc3c67a9eda6d9bed3e4fe327811fd6e4df2aa52
Author: Oknet Xu 
Date:   2016-09-19T06:11:56Z

TS-4879: Checking con.fd == NO_FD in UnixNetVConnection::connectUp() while 
we get return from check_emergency_throttle()

(cherry picked from commit 3216b0c1ff87a96a68f6a8a2a9fff804eb5819f1)

commit 9d4c1e24d7e341ed055b351a7bfe3bbff0edc1ad
Author: Oknet Xu 
Date:   2016-09-20T13:06:14Z

TS-4879: Checking con.fd == NO_FD in NetAccept::do_blocking_accept()

(cherry picked from commit cd3f83af040f9505a3224a41ce7de294899c760e)




Issue Time Tracking
---

Worklog Id: (was: 31708)
Time Spent: 4h 40m  (was: 4.5h)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
> Fix For: 7.0.0
>
>  Time Spent: 4h 40m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-23 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29596=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29596
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 23/Sep/16 08:38
Start Date: 23/Sep/16 08:38
Worklog Time Spent: 10m 
  Work Description: Github user oknet closed the pull request at:

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


Issue Time Tracking
---

Worklog Id: (was: 29596)
Time Spent: 4.5h  (was: 4h 20m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-22 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29588=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29588
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 23/Sep/16 05:19
Start Date: 23/Sep/16 05:19
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/748/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29588)
Time Spent: 4h 20m  (was: 4h 10m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-22 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29587=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29587
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 23/Sep/16 05:18
Start Date: 23/Sep/16 05:18
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/852/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29587)
Time Spent: 4h 10m  (was: 4h)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-22 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29586=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29586
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 23/Sep/16 05:12
Start Date: 23/Sep/16 05:12
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
@oknet nice!


Issue Time Tracking
---

Worklog Id: (was: 29586)
Time Spent: 4h  (was: 3h 50m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-22 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29585=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29585
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 23/Sep/16 05:05
Start Date: 23/Sep/16 05:05
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
@jpeach updated upon your comments. thanks.


Issue Time Tracking
---

Worklog Id: (was: 29585)
Time Spent: 3h 50m  (was: 3h 40m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-22 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29584=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29584
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 23/Sep/16 04:49
Start Date: 23/Sep/16 04:49
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/747/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29584)
Time Spent: 3h 40m  (was: 3.5h)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-22 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29583=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29583
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 23/Sep/16 04:45
Start Date: 23/Sep/16 04:45
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/851/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29583)
Time Spent: 3.5h  (was: 3h 20m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-22 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29582=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29582
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 23/Sep/16 04:34
Start Date: 23/Sep/16 04:34
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/746/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29582)
Time Spent: 3h 20m  (was: 3h 10m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-22 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29549=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29549
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 22/Sep/16 23:39
Start Date: 22/Sep/16 23:39
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1033#discussion_r80158464
  
--- Diff: iocore/net/UnixNetVConnection.cc ---
@@ -1273,14 +1273,21 @@ UnixNetVConnection::connectUp(EThread *t, int fd)
 con.is_bound = true;
   }
 
+  if (check_emergency_throttle(con)) {
+// `con' could be closed if there is hyper emergency
+if (con.fd == NO_FD) {
+  NET_SUM_GLOBAL_DYN_STAT(net_connections_currently_open_stat, -1);
+  // set errno force to EMFILE (reached limit for open file 
descriptors)
+  res = errno = EMFILE;
+  goto fail;
+}
+  }
+
   // Must connect after EventIO::Start() to avoid a race condition
   // when edge triggering is used.
   if (ep.start(get_PollDescriptor(t), this, EVENTIO_READ | EVENTIO_WRITE) 
< 0) {
-lerrno = errno;
 Debug("iocore_net", "connectUp : Failed to add to epoll list");
-action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *)0); 
// 0 == res
-free(t);
-return CONNECT_FAILURE;
+goto fail;
--- End diff --

I think it would be more correct to set ``res`` to ``-errno``.  Ultimately, 
``EventIO::start`` returns -1 on failure and the other parts of this code are 
setting ``res`` to ``-errno`` on failure.

How about:
```C
if (ep.start(get_PollDescriptor(t), this, EVENTIO_READ | EVENTIO_WRITE) < 
0) {
  res = -errno;
  Debug("iocore_net", "failed to add to epoll list: %s", strerror(errno));
  goto fail;
}
```


Issue Time Tracking
---

Worklog Id: (was: 29549)
Time Spent: 3h 10m  (was: 3h)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-20 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29388=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29388
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 20/Sep/16 13:24
Start Date: 20/Sep/16 13:24
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/735/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29388)
Time Spent: 3h  (was: 2h 50m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-20 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29386=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29386
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 20/Sep/16 13:20
Start Date: 20/Sep/16 13:20
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/839/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29386)
Time Spent: 2h 50m  (was: 2h 40m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29368=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29368
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 20/Sep/16 03:47
Start Date: 20/Sep/16 03:47
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
@oknet I'd prefer 2 commits (better for bisecting).


Issue Time Tracking
---

Worklog Id: (was: 29368)
Time Spent: 2h 40m  (was: 2.5h)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29367=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29367
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 20/Sep/16 03:45
Start Date: 20/Sep/16 03:45
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
@jpeach , There is a similar bug in NetAccept::do_blocking_accept() which 
belongs to ACCEPT side instead of CONNECT side. Should I combine them together 
in one commit or 2 commits respectively ?


Issue Time Tracking
---

Worklog Id: (was: 29367)
Time Spent: 2.5h  (was: 2h 20m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29365=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29365
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 20/Sep/16 03:32
Start Date: 20/Sep/16 03:32
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/836/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29365)
Time Spent: 2h 20m  (was: 2h 10m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29364=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29364
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 20/Sep/16 03:30
Start Date: 20/Sep/16 03:30
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1033#discussion_r79531088
  
--- Diff: iocore/net/UnixNetVConnection.cc ---
@@ -1273,14 +1273,21 @@ UnixNetVConnection::connectUp(EThread *t, int fd)
 con.is_bound = true;
   }
 
+  if (check_emergency_throttle(con)) {
+// `con' could be closed if there is hyper emergency
+if (con.fd == NO_FD) {
+  NET_SUM_GLOBAL_DYN_STAT(net_connections_currently_open_stat, -1);
+  // set errno force to EMFILE (reached limit for open file 
descriptors)
+  res = errno = EMFILE;
--- End diff --

set res to -errno.


Issue Time Tracking
---

Worklog Id: (was: 29364)
Time Spent: 2h 10m  (was: 2h)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29362=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29362
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 20/Sep/16 03:29
Start Date: 20/Sep/16 03:29
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1033#discussion_r79530993
  
--- Diff: iocore/net/UnixNetVConnection.cc ---
@@ -1273,14 +1273,21 @@ UnixNetVConnection::connectUp(EThread *t, int fd)
 con.is_bound = true;
   }
 
+  if (check_emergency_throttle(con)) {
+// `con' could be closed if there is hyper emergency
+if (con.fd == NO_FD) {
+  NET_SUM_GLOBAL_DYN_STAT(net_connections_currently_open_stat, -1);
+  // set errno force to EMFILE (reached limit for open file 
descriptors)
+  res = errno = EMFILE;
+  goto fail;
+}
+  }
+
   // Must connect after EventIO::Start() to avoid a race condition
   // when edge triggering is used.
   if (ep.start(get_PollDescriptor(t), this, EVENTIO_READ | EVENTIO_WRITE) 
< 0) {
-lerrno = errno;
 Debug("iocore_net", "connectUp : Failed to add to epoll list");
-action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *)0); 
// 0 == res
-free(t);
-return CONNECT_FAILURE;
+goto fail;
--- End diff --

The res declare with init value 0. I will update the res to return value of 
ep.start().


Issue Time Tracking
---

Worklog Id: (was: 29362)
Time Spent: 1h 50m  (was: 1h 40m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29363=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29363
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 20/Sep/16 03:30
Start Date: 20/Sep/16 03:30
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
updated per @jpeach 's comments


Issue Time Tracking
---

Worklog Id: (was: 29363)
Time Spent: 2h  (was: 1h 50m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29361=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29361
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 20/Sep/16 03:26
Start Date: 20/Sep/16 03:26
Worklog Time Spent: 10m 
  Work Description: Github user oknet commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1033#discussion_r79530800
  
--- Diff: iocore/net/UnixNetVConnection.cc ---
@@ -1273,14 +1273,21 @@ UnixNetVConnection::connectUp(EThread *t, int fd)
 con.is_bound = true;
   }
 
+  if (check_emergency_throttle(con)) {
--- End diff --

changed the return type to bool for emergency_throttle, check_net_throttle 
and check_emergency_throttle


Issue Time Tracking
---

Worklog Id: (was: 29361)
Time Spent: 1h 40m  (was: 1.5h)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29360=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29360
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 20/Sep/16 03:24
Start Date: 20/Sep/16 03:24
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/732/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29360)
Time Spent: 1.5h  (was: 1h 20m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29315=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29315
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 15:49
Start Date: 19/Sep/16 15:49
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1033#discussion_r79422378
  
--- Diff: iocore/net/UnixNetVConnection.cc ---
@@ -1273,14 +1273,21 @@ UnixNetVConnection::connectUp(EThread *t, int fd)
 con.is_bound = true;
   }
 
+  if (check_emergency_throttle(con)) {
--- End diff --

Since you are touching this code, could you please change the return type 
of ``check_emergency_throttle`` to ``bool``?


Issue Time Tracking
---

Worklog Id: (was: 29315)
Time Spent: 1h 20m  (was: 1h 10m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29314=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29314
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 15:49
Start Date: 19/Sep/16 15:49
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1033#discussion_r79422585
  
--- Diff: iocore/net/UnixNetVConnection.cc ---
@@ -1273,14 +1273,21 @@ UnixNetVConnection::connectUp(EThread *t, int fd)
 con.is_bound = true;
   }
 
+  if (check_emergency_throttle(con)) {
+// `con' could be closed if there is hyper emergency
+if (con.fd == NO_FD) {
+  NET_SUM_GLOBAL_DYN_STAT(net_connections_currently_open_stat, -1);
+  // set errno force to EMFILE (reached limit for open file 
descriptors)
+  res = errno = EMFILE;
+  goto fail;
+}
+  }
+
   // Must connect after EventIO::Start() to avoid a race condition
   // when edge triggering is used.
   if (ep.start(get_PollDescriptor(t), this, EVENTIO_READ | EVENTIO_WRITE) 
< 0) {
-lerrno = errno;
 Debug("iocore_net", "connectUp : Failed to add to epoll list");
-action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *)0); 
// 0 == res
-free(t);
-return CONNECT_FAILURE;
+goto fail;
--- End diff --

Set ``res``?


Issue Time Tracking
---

Worklog Id: (was: 29314)
Time Spent: 1h 20m  (was: 1h 10m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29313=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29313
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 15:49
Start Date: 19/Sep/16 15:49
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1033#discussion_r79421321
  
--- Diff: iocore/net/UnixNetVConnection.cc ---
@@ -1273,14 +1273,21 @@ UnixNetVConnection::connectUp(EThread *t, int fd)
 con.is_bound = true;
   }
 
+  if (check_emergency_throttle(con)) {
+// `con' could be closed if there is hyper emergency
+if (con.fd == NO_FD) {
+  NET_SUM_GLOBAL_DYN_STAT(net_connections_currently_open_stat, -1);
+  // set errno force to EMFILE (reached limit for open file 
descriptors)
+  res = errno = EMFILE;
--- End diff --

``connectUP`` returns ``CONNECT_SUCCESS``,  ``CONNECT_FAILURE``, or 
``-errno``.


Issue Time Tracking
---

Worklog Id: (was: 29313)
Time Spent: 1h 20m  (was: 1h 10m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29316=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29316
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 15:49
Start Date: 19/Sep/16 15:49
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1033#discussion_r79422164
  
--- Diff: iocore/net/UnixNetVConnection.cc ---
@@ -1273,14 +1273,21 @@ UnixNetVConnection::connectUp(EThread *t, int fd)
 con.is_bound = true;
   }
 
+  if (check_emergency_throttle(con)) {
+// `con' could be closed if there is hyper emergency
+if (con.fd == NO_FD) {
+  NET_SUM_GLOBAL_DYN_STAT(net_connections_currently_open_stat, -1);
--- End diff --

Please comment here that we need to decrement the stat because 
``close_UnixNetVConnection`` only decrements with a valid connection descriptor.


Issue Time Tracking
---

Worklog Id: (was: 29316)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29297=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29297
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 08:44
Start Date: 19/Sep/16 08:44
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/730/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29297)
Time Spent: 1h 10m  (was: 1h)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29296=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29296
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 08:40
Start Date: 19/Sep/16 08:40
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/834/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29296)
Time Spent: 1h  (was: 50m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29293=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29293
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 06:55
Start Date: 19/Sep/16 06:55
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
FreeBSD build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/833/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29293)
Time Spent: 50m  (was: 40m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29292=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29292
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 06:43
Start Date: 19/Sep/16 06:43
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/729/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29292)
Time Spent: 40m  (was: 0.5h)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29288=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29288
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 06:25
Start Date: 19/Sep/16 06:25
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/831/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29288)
Time Spent: 0.5h  (was: 20m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29287=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29287
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 06:18
Start Date: 19/Sep/16 06:18
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1033
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/727/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 29287)
Time Spent: 20m  (was: 10m)

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-4879) NetVC leaks while hyper emergency occur on check_emergency_throttle()

2016-09-19 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4879?focusedWorklogId=29286=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-29286
 ]

ASF GitHub Bot logged work on TS-4879:
--

Author: ASF GitHub Bot
Created on: 19/Sep/16 06:14
Start Date: 19/Sep/16 06:14
Worklog Time Spent: 10m 
  Work Description: GitHub user oknet opened a pull request:

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

TS-4879: Checking con.fd == NO_FD while we get return from 
check_emergency_throttle()



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/oknet/trafficserver TS-4879

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/1033.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1033


commit dfed0e6404e2d0cec78dde18130dd351816ac33f
Author: Oknet Xu 
Date:   2016-09-19T06:11:56Z

TS-4879: Checking con.fd == NO_FD while we get return from 
check_emergency_throttle()




Issue Time Tracking
---

Worklog Id: (was: 29286)
Time Spent: 10m
Remaining Estimate: 0h

> NetVC leaks while hyper emergency occur on check_emergency_throttle()
> -
>
> Key: TS-4879
> URL: https://issues.apache.org/jira/browse/TS-4879
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Core
>Reporter: Oknet Xu
>Assignee: Oknet Xu
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The con could be closed if hyper emergency occur on 
> check_emergency_throttle().
> But we did not check the con.fd while we get return from 
> check_emergency_throttle().
> For hyper emergency:
> - The socket fd is removed from epoll while it is closed.
> - A NetVC with a closed socket fd is created and callback NET_EVENT_OPEN to 
> SM.
> Thus:
> - The NetVC will never triggered by NetHandler.
> - Only InactivityCop could handle the NetVC and the default timeout value is 
> 86400 secs.
> For the counter: net_connections_currently_open_stat
> - It is increased in “connect_re_internal()”
> - It isn't decreased while the con.fd set to NO_FD due to hyper emergency 
> - Because it is decreased in close_UnixNetVConnection() only con.fd != NO_FD. 
> (TS-4178)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)