You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/02/06 02:18:02 UTC

[GitHub] [dubbo-go] gaoxinge edited a comment on pull request #1045: Fix: DubboInvoker.reqnum should be atomic

gaoxinge edited a comment on pull request #1045:
URL: https://github.com/apache/dubbo-go/pull/1045#issuecomment-774380816


   I think some specific interleaving execution of `Invoke` and `Destroy` may lead to panic:
   
   |Invoke|Destroy|Description|
   |-------|---------|------------|
   |di.closed.Load() / di.reqNum().Load()<0||return false because destroy has not been called|
   ||di.closed.Store(true)||
   ||di.reqNum.Load() == 0|return true because no reqNum has been added in invoke|
   ||di.reqNum.Add(-1)||
   ||di.client = nil|set di.client to nil|
   |di.reqNum.Add(1)|||
   |di.client.Request||may panic because di.client is nil||
   |di.reqNum.Add(-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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org