[ 
https://issues.apache.org/jira/browse/TS-4478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15311416#comment-15311416
 ] 

ASF GitHub Bot commented on TS-4478:
------------------------------------

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.


> AsyncHttpFetch hangs forever after ProxyClientSession changes
> -------------------------------------------------------------
>
>                 Key: TS-4478
>                 URL: https://issues.apache.org/jira/browse/TS-4478
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core, CPP API
>            Reporter: David Calavera
>            Assignee: Susan Hinrichs
>              Labels: regression
>             Fix For: 7.0.0
>
>         Attachments: ats-ts-4478.zip
>
>
> I'm porting what [~biilmann] reported in 
> https://github.com/apache/trafficserver/pull/570 here:
> This pull request also seems to break one of our plugins that does HTTP 
> requests in a background worker thread via TSFetchUrl (used indirectly 
> through the AsyncHttpFetch C++ API).
> The HTTP request will hang at this check for the right thread and never 
> progress:
> https://github.com/apache/trafficserver/pull/570/files#diff-40fc32ab3504372e0eb74a54108d1b6fR2404
> Removing these checks for the right thread leads to a segfault.



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

Reply via email to