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

Roger Meier commented on THRIFT-2682:
-------------------------------------

are you able to provide a patch for this?

> TThreadedServer leaks per-thread memory
> ---------------------------------------
>
>                 Key: THRIFT-2682
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2682
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.9.1
>         Environment: RHEL 6.5
>            Reporter: Artem Koval
>            Priority: Critical
>         Attachments: thrift_vg.txt
>
>
> We are using Thrift 0.9.1 in Linux, both client and server are written in 
> C++. TThreadedServer is used to process requests involving large (up to 1MB) 
> binary parameters.
> Usage pattern is like this: the client establishes a UNIX socket connection, 
> makes some interface calls and then disconnects.
> We noticed that the memory footprint of the server process increases over 
> time. Valgrind inspection showed that despite the server threads have long 
> been shutdown, their data allocated in TThreadedServer::serve() hasn't been 
> freed and shows up as "definitely lost".
> This leak, although significant, is not critical by itself. But per-thread 
> data includes a TBinaryProtocol object, which in turn holds a "string buffer" 
> used to serialize binary parameters. These string buffers are quite large in 
> our case, leading to overall memory leakage being unacceptably high.
> As a workaround, we will for now turn to TNonblockingServer, which uses 
> persistent threads. However, a memory leak is still a very serious problem, 
> and it should be fixed.



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

Reply via email to