apache / apache/brpc

grpc H2UnsentResponse LeakSanitizer: detected memory leaks

Open
#2,738 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

**Describe the bug (描述bug)**
asan 压测,报h2协议brpc::policy::H2UnsentResponse::New内存泄漏

**To Reproduce (复现方法)**
brpc1.8.0,h2:grpc协议。编译选项加上-fsanitize=address -fno-common,编译静态链接asan。

**Expected behavior (期望行为)**
期望不报任何异常错误。

**Versions (各种版本)**
OS: Linux bae12e6ce16f 5.4.139-1.el7.elrepo.x86_64 #1 SMP Sat Aug 7 08:29:46 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
Compiler: clang version 10.0.0-4ubuntu1
brpc: 1.8.0
protobuf: v3.20.0

**Additional context/screenshots (更多上下文/截图)**

截屏2024-08-19 上午11 38 13

截屏2024-08-19 上午11 38 24

Contributor guide

Open the contributing guide

Research direction

Reproduce the report with brpc 1.8.0 using the h2:grpc protocol and AddressSanitizer with static linking. Investigate allocations from brpc::policy::H2UnsentResponse::New during the load test, using the sanitizer output and the provided screenshots as references. Done means the reported leak no longer appears under the same test conditions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, grpc
Domain
backend-api-design, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.