You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "zhongting (JIRA)" <ji...@apache.org> on 2017/01/06 10:03:58 UTC
[jira] [Created] (THRIFT-4021) THttpTransport may cause consistent
memory increase
zhongting created THRIFT-4021:
---------------------------------
Summary: THttpTransport may cause consistent memory increase
Key: THRIFT-4021
URL: https://issues.apache.org/jira/browse/THRIFT-4021
Project: Thrift
Issue Type: Bug
Components: C++ - Library
Affects Versions: 0.9.3
Environment: CentOS release 5.4
Reporter: zhongting
In THttpTransport.cpp,there are two chances for shifting httpPos_ to the head of http buffer: 1)No CRLF found in function THttpTransport::readLine() 2)avail == 0 in function THttpTransport::readContent().
However,if every message arrives in whole at once,the above two chances won't exist forever and make the http buffer increase infinitely in function refill(),so cause memory increase consistently.
I have encountered this issue in one of my project using THttpServer and detected memory increasing in function refill() with valgrind.
And my solution is adding shift() before returning of function THttpTransport::readContent() to make sure httpPos_ shifting always happen.
Looking forward for your comments.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)