-
Notifications
You must be signed in to change notification settings - Fork 14
Data race in subnet manager's exchange protocol #235
Comments
The bug is reproduced when Mir runs in the rootnet and in a subnet on the same machine with 4 eudico full nodes. First, is that there is the case when a user can run the HC in the following setting: The second is that I changed the key mutex to the traditional mutex and the bug disappeared. If I change Keymutex to github.com/im7mortal/kmutex then the bug is still reproduced. So despite the fact that I would suggest using sync.Map or sync.RWMutex. P.S. In the Mir reconfiguration draft I have implemented sync.Map. @adlrocha what do you think? |
I am suggesting this fix - bdd2590#diff-100f0122618ed5b5f4e40838698391b594f842011d057c947a39e5cdf1ec92b2 @adlrocha what do you think? |
Yes, I think this definitely fixes it. I completely missed that race. Good catch, thanks! Feel free to close this issue once the PR is merged. |
Fixed in #234 |
Describe the Bug
Data race: read at
eudico/chain/consensus/hierarchical/subnet/submgr/exchange.go:62
ref and write ateudico/chain/consensus/hierarchical/subnet/submgr/exchange.go:69
refLogging Information
Repo Steps
No response
The text was updated successfully, but these errors were encountered: