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 2016/06/01 20:44:15 UTC

[GitHub] trafficserver pull request #688: TS-4478: AsyncHttpFetch hangs since ProxyCl...

GitHub user shinrich opened a pull request:

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

    TS-4478: AsyncHttpFetch hangs since ProxyClientSession changes.

    If the original thread is not a ET_NET thread, we should be rescheduling on it.  Otherwise, take over the current ET_NET thread as the operating thread for this transaction.

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

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

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

    https://github.com/apache/trafficserver/pull/688.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 #688
    
----
commit 517ae4a380976343dbbab64ba17dccfd4d8f5114
Author: Susan Hinrichs <sh...@ieee.org>
Date:   2016-06-01T20:42:07Z

    TS-4478: AsyncHttpFetch hangs since ProxyClientSession changes.

----


---
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 #688: TS-4478: AsyncHttpFetch hangs since ProxyCl...

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

    https://github.com/apache/trafficserver/pull/688#discussion_r65460304
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -2439,8 +2439,12 @@ HttpSM::state_cache_open_write(int event, void *data)
       if (ua_session) {
         NetVConnection *vc = ua_session->get_netvc();
         if (vc && vc->thread != this_ethread()) {
    -      pending_action = vc->thread->schedule_imm(this, event, data); // Stay on the same thread!
    -      return 0;
    +      if (vc->thread->is_event_type(ET_NET) || vc->thread->is_event_type(SSLNetProcessor::ET_SSL)) {
    +        pending_action = vc->thread->schedule_imm(this, EVENT_INTERVAL);
    --- End diff --
    
    Should this like use the `event` when calling `vc->thread->schedule_imm`?


---
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 issue #688: TS-4478: AsyncHttpFetch hangs since ProxyClientSes...

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:

    https://github.com/apache/trafficserver/pull/688
  
    Can we squash this into one commit?


---
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 issue #688: TS-4478: AsyncHttpFetch hangs since ProxyClientSes...

Posted by SolidWallOfCode <gi...@git.apache.org>.
Github user SolidWallOfCode commented on the issue:

    https://github.com/apache/trafficserver/pull/688
  
    The code is very cut and paste - could this not be made a method on ProxyClientSession to unify and avoid direct access to the VC?


---
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 issue #688: TS-4478: AsyncHttpFetch hangs since ProxyClientSes...

Posted by biilmann <gi...@git.apache.org>.
Github user biilmann commented on the issue:

    https://github.com/apache/trafficserver/pull/688
  
    @shinrich just tested it here and it solved the issue - thanks!


---
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 #688: TS-4478: AsyncHttpFetch hangs since ProxyCl...

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

    https://github.com/apache/trafficserver/pull/688#discussion_r65564121
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -2439,8 +2439,12 @@ HttpSM::state_cache_open_write(int event, void *data)
       if (ua_session) {
         NetVConnection *vc = ua_session->get_netvc();
         if (vc && vc->thread != this_ethread()) {
    -      pending_action = vc->thread->schedule_imm(this, event, data); // Stay on the same thread!
    -      return 0;
    +      if (vc->thread->is_event_type(ET_NET) || vc->thread->is_event_type(SSLNetProcessor::ET_SSL)) {
    +        pending_action = vc->thread->schedule_imm(this, EVENT_INTERVAL);
    --- End diff --
    
    Yes, looks like a cut-n-paste error on my part.  I'll tidy up into a common method as per @SolidWallOfCode 's suggestion and fix the event specification there.


---
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 #688: TS-4478: AsyncHttpFetch hangs since ProxyCl...

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

    https://github.com/apache/trafficserver/pull/688#discussion_r65464671
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -2439,8 +2439,12 @@ HttpSM::state_cache_open_write(int event, void *data)
       if (ua_session) {
         NetVConnection *vc = ua_session->get_netvc();
         if (vc && vc->thread != this_ethread()) {
    -      pending_action = vc->thread->schedule_imm(this, event, data); // Stay on the same thread!
    -      return 0;
    +      if (vc->thread->is_event_type(ET_NET) || vc->thread->is_event_type(SSLNetProcessor::ET_SSL)) {
    +        pending_action = vc->thread->schedule_imm(this, EVENT_INTERVAL);
    --- End diff --
    
    I can confirm I get a segfault in some cases from this. Changing line 2443 to `pending_action = vc->thread->schedule_imm(this, event);` fixes that.


---
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 issue #688: TS-4478: AsyncHttpFetch hangs since ProxyClientSes...

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

    https://github.com/apache/trafficserver/pull/688
  
    Pushed a new version.  I tested it against the example-plugin.  @biilmann can you verify against the cache write case?  I'll squash the commits when doing the final merge.


---
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 #688: TS-4478: AsyncHttpFetch hangs since ProxyCl...

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

    https://github.com/apache/trafficserver/pull/688#discussion_r65460866
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -2439,8 +2439,12 @@ HttpSM::state_cache_open_write(int event, void *data)
       if (ua_session) {
         NetVConnection *vc = ua_session->get_netvc();
         if (vc && vc->thread != this_ethread()) {
    -      pending_action = vc->thread->schedule_imm(this, event, data); // Stay on the same thread!
    -      return 0;
    +      if (vc->thread->is_event_type(ET_NET) || vc->thread->is_event_type(SSLNetProcessor::ET_SSL)) {
    +        pending_action = vc->thread->schedule_imm(this, EVENT_INTERVAL);
    --- End diff --
    
    it looks like it will crash if you change the event there because the switch below won't ever get a valid even, won't 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #688: TS-4478: AsyncHttpFetch hangs since ProxyClientSes...

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

    https://github.com/apache/trafficserver/pull/688
  
    Yes, could be unified.  Once I get confirmation from @calavera or @biilmann that this addresses their issue, I'll tidy up a bit.  


---
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 #688: TS-4478: AsyncHttpFetch hangs since ProxyCl...

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

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


---
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.
---