You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Alan M. Carroll (JIRA)" <ji...@apache.org> on 2016/04/13 16:13:25 UTC

[jira] [Commented] (TS-4046) HdrHeap and HdrStrHeap leak in HttpTransact::EndRemapRequest

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

Alan M. Carroll commented on TS-4046:
-------------------------------------

That might be better. The problem with the original patch (besides having no indication of what file should be changed) is that {{HTTPHdr}} nor {{MIMEHdr}} has a {{destroy}} method. That change skips over both of those classes and goes to {{HdrHeapSDKHandle::destroy}}. This means the actions in {{HTTPHdr::clear}} are not done which is sub-optimal.  I need to look at this a bit more.

> HdrHeap and HdrStrHeap leak in HttpTransact::EndRemapRequest
> ------------------------------------------------------------
>
>                 Key: TS-4046
>                 URL: https://issues.apache.org/jira/browse/TS-4046
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP, MIME, Plugins
>            Reporter: rienzi2012
>            Assignee: Alan M. Carroll
>              Labels: review
>             Fix For: 7.0.0
>
>
> HTTPHdr::clear is called instead of HdrHeapSDKHandle::destroy in HttpTransact::EndRemapRequest. This will definitely cause memory leak when a plugin calls TSHttpTxnServerIntercept or TSHttpTxnIntercept. This bug influences a lot of users. Here is a patch below.
> {code:java}
> @@ -892,7 +892,7 @@
>      HTTP_INCREMENT_TRANS_STAT(http_invalid_client_requests_stat);
>      TRANSACT_RETURN(SM_ACTION_SEND_ERROR_CACHE_NOOP, NULL);
>    } else {
> -    s->hdr_info.client_response.clear(); // anything previously set is invalid from this point forward
> +    s->hdr_info.client_response.destroy();
>      DebugTxn("http_trans", "END HttpTransact::EndRemapRequest");
>  
>      if (s->is_upgrade_request && s->post_remap_upgrade_return_point) {
> {code}



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