brpc http_c++示例代码修改 server端接收后创建clinet发送数据发现可能存在内存泄露
- Dominant language
- C++
- Stars
- 17.6k
- Forks
- 4.1k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 69
Description
**Describe the bug (描述bug)**
http brpc server端接收后创建client发送数据,内存泄露
**To Reproduce (复现方法)**
基于Release1.7.0 brpc代码修改brpc http_c++示例代码;
1、在收到客户端访问v1/queue/stats 后开辟线程做一次brpc send(v1/start)

2、客户端每执行一次,server进程都有20KB左右物理内存增加
./http_client http://kkuser-virtual-machine:8010/v1/queue/stats

**Expected behavior (期望行为)**
内存不会持续增加
**Versions (各种版本)**
OS:
Compiler:
brpc: V1.7.0
protobuf:3.14.0
**Additional context/screenshots (更多上下文/截图)**

Contributor guide
Research direction
Start with the modified brpc http_c++ example on Release 1.7.0 and reproduce repeated requests to v1/queue/stats, which starts a brpc send to v1/start. Compare server memory after each request and inspect the request, thread, and client lifecycle; done means the server process no longer grows continuously under the reported sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100