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

ASF GitHub Bot commented on THRIFT-4225:
----------------------------------------

bforbis opened a new pull request #1565: THRIFT-4225: Delete callback if RPC 
send failed
URL: https://github.com/apache/thrift/pull/1565
 
 
   The same testing that was done in #1558 applies to this fix as well. This 
just makes sure to delete the callback from the `reqs` registry so that they 
don't build up and cause a memory leak.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Error handling malformed arguments leaks memory, corrupts transport buffers 
> causing next RPC to fail
> ----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-4225
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4225
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Compiler, Node.js - Library
>    Affects Versions: 0.10.0
>            Reporter: Paul Taylor
>            Priority: Major
>
> This issue is related to 
> [THRIFT-2997|https://issues.apache.org/jira/browse/THRIFT-2997]. I have a 
> workaround 
> [here|https://github.com/graphistry/rxjs-mapd/blob/bf88da285ebc32ee6528f596919c626efccaf7ee/src/client/bind.ts#L85],
>  but it's only possible because I'm wrapping all thrift client calls anyway.
> If the arguments to a thrift client method are malformed, the transport 
> throws an error while writing the arguments to its buffers. Unfortunately, 
> the buffers aren't reset (as would happen in flush), and the next RPC call 
> will fail if any values were already written. Additionally, the callback 
> isn't dereferenced from the client's _reqs table, leaking memory.
> From what I understand, this problem would need to be addressed in both the 
> node lib and compiler.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to