使用brpc的进程退出时,HealthCheckTask可能导致的core dump
- Dominant language
- C++
- Stars
- 17.6k
- Forks
- 4.1k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 69
Description
**Describe the bug (描述bug)**
1. 服务里使用brpc client 连接到了其他的brpc服务;
2. brpc针对这条连接会作周期性的HealthCheck, 使用HealthCheckTask实现;
3. 服务进程退出时,有一定的概率出现下面的core dump:

4. 看起来像是HealCehckTask还有运行,但是glog相关的静态变量由于进程退出已经不存在了。
**To Reproduce (复现方法)**
**Expected behavior (期望行为)**
**Versions (各种版本)**
OS: CentOs 7
Compiler:
brpc: 最新版
protobuf:
**Additional context/screenshots (更多上下文/截图)**
Contributor guide
Research direction
Start by tracing the HealthCheckTask lifecycle for brpc client connections during process shutdown, then inspect how its remaining work interacts with glog's static state. Reproduce the intermittent core dump described on CentOS 7 and confirm that shutdown no longer accesses destroyed logging state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100