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 2021/11/04 13:04:01 UTC

[GitHub] [incubator-brpc] gripleaf opened a new issue #1597: http2 rpc protocal _deferred_window_update处理逻辑有死锁风险

gripleaf opened a new issue #1597:
URL: https://github.com/apache/incubator-brpc/issues/1597


   条件1:
   server侧的H2Context的_deferred_window_update 只有在stream 被回收或者某个stream未ack 数据超过128KB时才会重置并给client发送FRAME_WINDOW_UPDATE(stream_id=0).
   
   条件2:
   与此同时,brpc server侧限制了client最多发送1MB未ack的数据;
   
   为满足这两个条件,client端在发送了1MB数据后,可能会一直收不到server侧的FRAME_WINDOW_UPDATE,而无法继续发送数据,而server侧因为没能收到完整的stream的数据包,而无法处理请求。
   
   相应case: 当有10个stream同时被处理,每个stream都需要向server发送100KB的请求数据,但当每个stream都向brpc 发送了100KB数据后,client端已经发送了1MB的未ACK的数据,需要等待server侧的FRAME_WINDOW_UPDATE来确认数据被ack,但是由于条件1的限制,没有一个stream可以被回收,也没有一个stream的未ACK数据超过128KB,导致server一直不会发送FRAME_WINDOW_UPDATE。
   
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] zyearn commented on issue #1597: http2 rpc protocal _deferred_window_update处理逻辑有死锁风险

Posted by GitBox <gi...@apache.org>.
zyearn commented on issue #1597:
URL: https://github.com/apache/incubator-brpc/issues/1597#issuecomment-970710172


   一个workaround:把grpc端的window_size调大就可以不用等brpc的WINDOW_UPDATE回复了


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] zyearn commented on issue #1597: http2 rpc protocal _deferred_window_update处理逻辑有死锁风险

Posted by GitBox <gi...@apache.org>.
zyearn commented on issue #1597:
URL: https://github.com/apache/incubator-brpc/issues/1597#issuecomment-971475579


   这是目前唯一的workaround,有兴趣欢迎提PR改善这一块


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] zyearn closed issue #1597: http2 rpc protocal _deferred_window_update处理逻辑有死锁风险

Posted by GitBox <gi...@apache.org>.
zyearn closed issue #1597:
URL: https://github.com/apache/incubator-brpc/issues/1597


   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] gripleaf commented on issue #1597: http2 rpc protocal _deferred_window_update处理逻辑有死锁风险

Posted by GitBox <gi...@apache.org>.
gripleaf commented on issue #1597:
URL: https://github.com/apache/incubator-brpc/issues/1597#issuecomment-971405047


   > 一个workaround:把grpc端的window_size调大就可以不用等brpc的WINDOW_UPDATE回复了
   
   调大grpc的window_size是没有用的。按照h2协议,grpc端的window_size是由brpc端决定的。
   
   嗷,你是不是想说调大brpc端的window_size?嗯,调成1GB好了,要啥流控呢
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org