You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2019/06/04 04:23:06 UTC
[GitHub] [incubator-brpc] scottzzq commented on issue #787: brpc single模式下无法摘掉故障机器
scottzzq commented on issue #787: brpc single模式下无法摘掉故障机器
URL: https://github.com/apache/incubator-brpc/issues/787#issuecomment-498515674
@jamesge 这几天仔细看代码,线下做了多次尝试,今天终于复现出来了。原因如下:EventDispatch线程在某一次epoll_wait返回之后得到可读fd列表,之后依次调用fd的StartInputEvent函数,在执行比较慢的情况下(cpu非常繁忙),假设某一个Socket还没有进入到StartInputEvent函数,此时别的线程调用了这个Socket的SetFailed函数,之后启动健康检查,之后新建连接成功,健康检查结果正常,调用了Socket的Revive函数,但是还没有调用ResetFileDescriptor,这个时候通过SocketId调用Address已经可以成功了,这个时候刚好又进入Socket的StartInputEvent,此时就会遇到fd=-1
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org