归还连接池的连接的parsing_context != nullptr。check失败
- Dominant language
- C++
- Stars
- 17.6k
- Forks
- 4.1k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 69
Description
**Describe the bug (描述bug)**
client用http + pooled connection访问。归还给连接池的连接又parsing_context != nullptr的情况。导致check fatal。
https://github.com/apache/incubator-brpc/blob/71af31e4038f4dd5138d954237652e96d9613e90/src/brpc/socket.cpp#L2453
**To Reproduce (复现方法)**
fatal前,一般回复的http response有解析失败的情况。但这个parse 失败不必然导致这个bug。
逻辑来看,parse失败会执行Socket SetFailed()。该连接应该不会归还给连接池。
https://github.com/apache/incubator-brpc/blob/71af31e4038f4dd5138d954237652e96d9613e90/src/brpc/input_messenger.cpp#L88
**Expected behavior (期望行为)**
**Versions (各种版本)**
OS:
Compiler:
brpc:
protobuf:
**Additional context/screenshots (更多上下文/截图)**
Contributor guide
Research direction
Start by reading the check in src/brpc/socket.cpp around line 2453 and the parse-failure handling in src/brpc/input_messenger.cpp around line 88. Trace how an HTTP pooled connection with a failed response parse can be returned while parsing_context is still set. Done means the reported fatal check is no longer triggered for this scenario, with the behavior verified against a reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100