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

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

Github user nsuke commented on the pull request:

    https://github.com/apache/thrift/pull/970#issuecomment-202227018
  
    @cjmay thanks for catching this before the release.
    [C extension + UTF8 
fix](https://github.com/apache/thrift/pull/769/files#diff-cf2b2a6a8c345e5979b22a2ccc932abfR439)
 seems to be the true culprit here (so it's even much more worse in terms of 
the scope of this regression).


> memory leak in python compact protocol extension
> ------------------------------------------------
>
>                 Key: THRIFT-3765
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3765
>             Project: Thrift
>          Issue Type: Bug
>          Components: Python - Library
>    Affects Versions: 0.10.0
>            Reporter: Chandler May
>
> There is a memory leak in the compact protocol encoder extension module 
> introduced in THRIFT-3612.  This leak is significant enough to prevent us 
> from using the extension in practice.
> Example output from valgrind:
> {code}
> ==18238== 4,177,472 bytes in 96,403 blocks are definitely lost in loss record 
> 3,534 of 3,534
> ==18238==    at 0x4C29BFD: malloc (in 
> /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==18238==    by 0x4EBD49C: PyObject_Malloc (in /usr/lib64/libpython2.7.so.1.0)
> ==18238==    by 0x4EC6381: PyString_FromStringAndSize (in 
> /usr/lib64/libpython2.7.so.1.0)
> ==18238==    by 0x4EE9669: PyUnicodeUCS4_EncodeUTF8 (in 
> /usr/lib64/libpython2.7.so.1.0)
> ==18238==    by 0x143D0CC7: 
> apache::thrift::py::ProtocolBase<apache::thrift::py::CompactProtocol>::encodeValue(_object*,
>  apache::thrift::py::TType, _object*) (protocol.tcc:422)
> ==18238==    by 0x143D085B: writeField (compact.h:100)
> ==18238==    by 0x143D085B: 
> apache::thrift::py::ProtocolBase<apache::thrift::py::CompactProtocol>::encodeValue(_object*,
>  apache::thrift::py::TType, _object*) (protocol.tcc:531)
> ==18238==    by 0x143D0F71: 
> apache::thrift::py::ProtocolBase<apache::thrift::py::CompactProtocol>::encodeValue(_object*,
>  apache::thrift::py::TType, _object*) (protocol.tcc:459)
> ==18238==    by 0x143D085B: writeField (compact.h:100)
> ==18238==    by 0x143D085B: 
> apache::thrift::py::ProtocolBase<apache::thrift::py::CompactProtocol>::encodeValue(_object*,
>  apache::thrift::py::TType, _object*) (protocol.tcc:531)
> ==18238==    by 0x143D085B: writeField (compact.h:100)
> ==18238==    by 0x143D085B: 
> apache::thrift::py::ProtocolBase<apache::thrift::py::CompactProtocol>::encodeValue(_object*,
>  apache::thrift::py::TType, _object*) (protocol.tcc:531)
> ==18238==    by 0x143D085B: writeField (compact.h:100)
> ==18238==    by 0x143D085B: 
> apache::thrift::py::ProtocolBase<apache::thrift::py::CompactProtocol>::encodeValue(_object*,
>  apache::thrift::py::TType, _object*) (protocol.tcc:531)
> ==18238==    by 0x143D0F71: 
> apache::thrift::py::ProtocolBase<apache::thrift::py::CompactProtocol>::encodeValue(_object*,
>  apache::thrift::py::TType, _object*) (protocol.tcc:459)
> ==18238==    by 0x143D085B: writeField (compact.h:100)
> ==18238==    by 0x143D085B: 
> apache::thrift::py::ProtocolBase<apache::thrift::py::CompactProtocol>::encodeValue(_object*,
>  apache::thrift::py::TType, _object*) (protocol.tcc:531)
> {code}



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

Reply via email to