You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by shinrich <gi...@git.apache.org> on 2015/07/13 22:22:22 UTC

[GitHub] trafficserver pull request: TS-1007: SSLN Close called before TXN ...

GitHub user shinrich opened a pull request:

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

    TS-1007: SSLN Close called before TXN Close

    I'd appreciate a review on this.  I feel pretty comfortable with the change in HttpSM.cc to delay the session close until after the transaction has a chance to close.
    
    I also rearranged things in SpdyClientSession to better follow the ProxyClientSession framework so the session start hook gets called and not just the session close hook.  I feel less sure about those changes, so I would appreciate comments from the SPDY experts out there.

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

    $ git pull https://github.com/shinrich/trafficserver ts-1007

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

    https://github.com/apache/trafficserver/pull/249.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 #249
    
----
commit b4aea1685d39b03b03bcd95731c65bb7fe71bbc4
Author: shinrich <sh...@yahoo-inc.com>
Date:   2015-07-13T16:09:37Z

    TS-1007: SSLN Close called before TXN Close

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-1007: SSLN Close called before TXN ...

Posted by shinrich <gi...@git.apache.org>.
Github user shinrich commented on the pull request:

    https://github.com/apache/trafficserver/pull/249#issuecomment-121225068
  
    Pushed new changes based on @sudheerv 's comments.  Makes sense to keep the keep-alive case with the session close case, so I also moved that from tunnel_handler_ua to kill_this.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-1007: SSLN Close called before TXN ...

Posted by shinrich <gi...@git.apache.org>.
Github user shinrich commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/249#discussion_r34510999
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -6560,6 +6559,12 @@ HttpSM::kill_this()
       reentrancy_count--;
       ink_release_assert(reentrancy_count == 0);
     
    +  // Delay the close of the user agent session, so the close session
    +  // occurs after the close transaction
    +  if (ua_session != NULL)
    --- End diff --
    
    Ah, in the KA case, ua_session->release() will be called in tunnel_handler_ua() and ua_session will be set to null before kill_this is called.
    I'll go ahead and explicitly test that case too.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-1007: SSLN Close called before TXN ...

Posted by sudheerv <gi...@git.apache.org>.
Github user sudheerv commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/249#discussion_r34510052
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -6560,6 +6559,12 @@ HttpSM::kill_this()
       reentrancy_count--;
       ink_release_assert(reentrancy_count == 0);
     
    +  // Delay the close of the user agent session, so the close session
    +  // occurs after the close transaction
    +  if (ua_session != NULL)
    --- End diff --
    
    Unless I'm missing something, this seems like it might break (close) keep alive sessions?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-1007: SSLN Close called before TXN ...

Posted by sudheerv <gi...@git.apache.org>.
Github user sudheerv commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/249#discussion_r34520227
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -6560,6 +6559,12 @@ HttpSM::kill_this()
       reentrancy_count--;
       ink_release_assert(reentrancy_count == 0);
     
    +  // Delay the close of the user agent session, so the close session
    +  // occurs after the close transaction
    +  if (ua_session != NULL)
    --- End diff --
    
    Not what I see for non-VC errors (in fact, there really is no reason to close the connection on non-VC errors).
    
    For example, https://github.com/apache/trafficserver/blob/master/proxy/http/HttpSM.cc#L1424


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-1007: SSLN Close called before TXN ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-1007: SSLN Close called before TXN ...

Posted by sudheerv <gi...@git.apache.org>.
Github user sudheerv commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/249#discussion_r34511471
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -6560,6 +6559,12 @@ HttpSM::kill_this()
       reentrancy_count--;
       ink_release_assert(reentrancy_count == 0);
     
    +  // Delay the close of the user agent session, so the close session
    +  // occurs after the close transaction
    +  if (ua_session != NULL)
    --- End diff --
    
    What if the SM is killed before a tunnel is started (e.g. error responses before remap, origin connection failure etc)?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-1007: SSLN Close called before TXN ...

Posted by shinrich <gi...@git.apache.org>.
Github user shinrich commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/249#discussion_r34518050
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -6560,6 +6559,12 @@ HttpSM::kill_this()
       reentrancy_count--;
       ink_release_assert(reentrancy_count == 0);
     
    +  // Delay the close of the user agent session, so the close session
    +  // occurs after the close transaction
    +  if (ua_session != NULL)
    --- End diff --
    
    The existing code is pretty eager to do_io_close() on the VC in error cases anyway. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request: TS-1007: SSLN Close called before TXN ...

Posted by shinrich <gi...@git.apache.org>.
Github user shinrich commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/249#discussion_r34510499
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -6560,6 +6559,12 @@ HttpSM::kill_this()
       reentrancy_count--;
       ink_release_assert(reentrancy_count == 0);
     
    +  // Delay the close of the user agent session, so the close session
    +  // occurs after the close transaction
    +  if (ua_session != NULL)
    --- End diff --
    
    Good point.  Thought I tested that case, but evidently not.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---