brpc icon indicating copy to clipboard operation
brpc copied to clipboard

process hang, since EPOLLOUT loop wait fd

Open yqynju opened this issue 3 years ago • 8 comments

Describe the bug (描述bug)

/brpc/src/brpc/socket.cpp:1196] Fail to wait EPOLLOUT of fd=187: Connection timed out /brpc/src/brpc/socket.cpp:1196] Fail to wait EPOLLOUT of fd=187: Connection timed out /brpc/src/brpc/socket.cpp:1196] Fail to wait EPOLLOUT of fd=187: Connection timed out /brpc/src/brpc/socket.cpp:1196] Fail to wait EPOLLOUT of fd=187: Connection timed out

timeout loop, not exit any more.

the process is hang, do not handle any request.

To Reproduce (复现方法)

Expected behavior (期望行为)

Versions (各种版本) OS: Compiler: brpc: protobuf:

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

yqynju avatar May 22 '21 02:05 yqynju

对端启动了吗?

hotaery avatar May 24 '21 04:05 hotaery

对端启动了吗?

能提供下最小复现的代码吗,可能不是对端没有启动的原因

hotaery avatar May 24 '21 11:05 hotaery

场景就是, client --- server --- backupend 如果client侧的timeout_ms比server到backupend的timeout_ms小的时候。

client超时,断开连接,server感知不到,导致链接处于CLOSE_WAIT,当超过了系统连接限制就进入假死状态。

image

yqynju avatar Jun 01 '21 07:06 yqynju

对端启动了吗?

能提供下最小复现的代码吗,可能不是对端没有启动的原因

场景就是, client --- server --- backupend 如果client侧的timeout_ms比server到backupend的timeout_ms小的时候。

client超时,断开连接,server感知不到,导致链接处于CLOSE_WAIT,当超过了系统连接限制就进入假死状态。

yqynju avatar Jun 01 '21 07:06 yqynju

--usercode_in_pthread=true

yqynju avatar Jun 01 '21 08:06 yqynju

--usercode_in_pthread=true

去掉这个,CLOSE_WAIT很快就释放了,如果存在这个配置,CLOSE_WAIT会一直存在。

yqynju avatar Jun 01 '21 09:06 yqynju

如果client遇到超时关闭连接,但是server端还卡在和backupend通信中,并未结束请求,这时候CLOSE_WAIT是符合预期的

lorinlee avatar Jun 20 '21 10:06 lorinlee

现在解决了嘛?

believeyourself avatar Dec 30 '21 01:12 believeyourself

We close this issue because it is irreproducible and inactive for a long time. If you can reproduce this issue with the latest version of bRPC, please reopen this issue and tell us how to reproduce.

wwbmmm avatar May 04 '23 06:05 wwbmmm