brpc客户端多并发下卡在callmethod函数
- Dominant language
- C++
- Stars
- 17.6k
- Forks
- 4.1k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 69
Description
**Describe the bug**
brpc客户端多并发下卡在callmethod函数,不会报错也不返回结果(一直卡死)我这里设置的是同步接口,服务端也收不到这十个请求,下面是gdb 堆栈信息:
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007f1baf0261fe in bthread::futex_wait_private (timeout=0x0, expected=0, addr1=0x7f1b50ff2140) at ./src/bthread/sys_futex.h:40
#2 bthread::wait_pthread (pw=..., ptimeout=ptimeout@entry=0x0) at src/bthread/butex.cpp:142
#3 0x00007f1baf026950 in bthread::butex_wait_from_pthread (abstime=0x0, expected_value=1, b=0x7f1b24054210, g=) at src/bthread/butex.cpp:615
#4 bthread::butex_wait (arg=arg@entry=0x7f1b24054210, expected_value=expected_value@entry=1, abstime=abstime@entry=0x0) at src/bthread/butex.cpp:648
#5 0x00007f1baf02fb19 in bthread_id_join (id=...) at src/bthread/id.cpp:529
#6 0x00007f1baf0d82e9 in brpc::Channel::CallMethod (this=0x7f1b680d9b20, method=0x0, controller_base=0x7f1b50ff22f0, request=0x0, response=0x0, done=0x0) at src/brpc/channel.cpp:581
**To Reproduce**
**Expected behavior**
希望不要一直卡住,要么返回错误日志,要么返回结果。
**Versions**
OS:linux Ubuntu 22.04.4 LTS
Compiler: c++17
brpc: 项目经过多人,不清楚是哪个版本的brpc
protobuf:基于http协议,没有用到
**Additional context/screenshots**
Contributor guide
Research direction
Start with src/brpc/channel.cpp at Channel::CallMethod and follow the bthread_id_join path into src/bthread/id.cpp, using the supplied GDB stack as the entry point. Establish a reproducible multi-concurrent synchronous-client case with a known brpc version and complete request details. Done means the case returns a result or an actionable error instead of remaining blocked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- backend-api-design, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100