{"action":"created","issue":{"url":"https://api.github.com/repos/apache/trafficserver/issues/669","repository_url":"https://api.github.com/repos/apache/trafficserver","labels_url":"https://api.github.com/repos/apache/trafficserver/issues/669/labels{/name}","comments_url":"https://api.github.com/repos/apache/trafficserver/issues/669/comments","events_url":"https://api.github.com/repos/apache/trafficserver/issues/669/events","html_url":"https://github.com/apache/trafficserver/pull/669","id":156890083,"number":669,"title":"TS-4461: SSL Client Connections not closed.","user":{"login":"shinrich","id":334488,"avatar_url":"https://avatars.githubusercontent.com/u/334488?v=3","gravatar_id":"","url":"https://api.github.com/users/shinrich","html_url":"https://github.com/shinrich","followers_url":"https://api.github.com/users/shinrich/followers","following_url":"https://api.github.com/users/shinrich/following{/other_user}","gists_url":"https://api.github.com/users/shinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/shinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinrich/subscriptions","organizations_url":"https://api.github.com/users/shinrich/orgs","repos_url":"https://api.github.com/users/shinrich/repos","events_url":"https://api.github.com/users/shinrich/events{/privacy}","received_events_url":"https://api.github.com/users/shinrich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-26T02:23:33Z","updated_at":"2016-05-26T16:43:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/trafficserver/pulls/669","html_url":"https://github.com/apache/trafficserver/pull/669","diff_url":"https://github.com/apache/trafficserver/pull/669.diff","patch_url":"https://github.com/apache/trafficserver/pull/669.patch"},"body":"Ultimately the issue was that SSL connections that stall in the ProtocolTrampoline never have the inactivity timeout cleanup.  The problem was introduced in 6.0.0 via TS-3727 due to an unfortunately interaction between the addition of the ssl_handshake_timeout_in and inactivity_timeout mechanism.  \r\n\r\nThe problem occurs when ssl_handshake_timeout_in is set to 0, which is the scenario that @bcall and I were testing.  This causes vc->set_inactivity_timeout(0) to be called.  This sets vc->inactivity_timeout_in to 0 and vc->next_inactivity_timeout_at to current time.\r\n\r\nLooking at UnixNetVConnection::mainEvent, the inactivity timeout event is not propagate if inactivity_timeout_in is 0 even if next_inactivity_timeout_at is non-zero and less than the current time.\r\n\r\nLooking at check_inactivity, if next_inactivity_timeout_at is 0, it will call vc->set_inactivity_timeout with the default_inactivity_timeout.\r\n\r\nBut since next_inactivity_timeout_at is not 0, the default is never set and inactivity_timeout_in is never set to non-zero, so the inactivity_timeout signal is never propagated and thus the connection is never closed.\r\nI adjusted set_inactivity_timeout to not set the next_inactivity_timeout_at if the argument is 0.  This fix has been tested in production against the 6.2 code, and the client connections all close after the box is removed from traffic.\r\n\r\nThis patch also includes a fix to add the Http1ClientSessions to the appropriate _queues.  That fix will be needed eventually, but wasn't essential for this particular scenario.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/trafficserver/issues/comments/221927293","html_url":"https://github.com/apache/trafficserver/pull/669#issuecomment-221927293","issue_url":"https://api.github.com/repos/apache/trafficserver/issues/669","id":221927293,"user":{"login":"zwoop","id":202131,"avatar_url":"https://avatars.githubusercontent.com/u/202131?v=3","gravatar_id":"","url":"https://api.github.com/users/zwoop","html_url":"https://github.com/zwoop","followers_url":"https://api.github.com/users/zwoop/followers","following_url":"https://api.github.com/users/zwoop/following{/other_user}","gists_url":"https://api.github.com/users/zwoop/gists{/gist_id}","starred_url":"https://api.github.com/users/zwoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zwoop/subscriptions","organizations_url":"https://api.github.com/users/zwoop/orgs","repos_url":"https://api.github.com/users/zwoop/repos","events_url":"https://api.github.com/users/zwoop/events{/privacy}","received_events_url":"https://api.github.com/users/zwoop/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T16:43:57Z","updated_at":"2016-05-26T16:43:57Z","body":"@shinrich The Jira vs this PR has slightly different implications :). Is this a 6.0 issue (i.e. would 6.1.x be affected by this) or is it only in 6.2.x ? I'm contemplating making a 6.1.2 stop gap release until 6.2.0 comes out, so curious if we should back port this to 6.1.2 as well."}}
{"actor":{"display_login":"zwoop"}}