-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Racing conditions on UnsavedFastIterator
& MutableTree
#696
Comments
We found that our node also had this issue when simulating some things in parallel. (On Terra) Apr 25 09:14:24
|
Is there any update to this? I can point our script to any terra node if you need to reproduce the issue. Usually nodes die very quickly on it. |
We fixed a few things with this issue but we will look into it |
@GAtom22 please share the detailed context of how to reproduce the above issue. |
@cool-develope this issue was reported by Keplr team. They mentioned they got this error message on their Evmos node and seems to be related to simulation. In the stack trace provided on the issue description, you can see it invokes |
Was looking into this issue and the Simulate API call does not hold any lock on the iavl so calling simulate concurrently leads to referencing the store in multiple go routines. @giskook made a comment here that make sense https://github.com/cosmos/iavl/pull/468/files#r959060203 Can consider to wrap This seems to fix it but since iavl doesn't support concurrency, I'm not sure if the fix should be to make sure cosmos-sdk does not use it in parallel in the first place. |
Very similar to cometbft/cometbft#815 (comment) |
we have been testing on mainnets iavlv1 and have not run into this issue |
Detected an issue with concurrent map operations to the
unsavedFastNodeAdditions
&unsavedFastNodeRemovals
maps on the UnsavedFastIterator and MutableTree structs.I tried adding a mutex and use the lock when these operations happen and seems to solve the issue.
More info here cosmos/cosmos-sdk#10568 (comment)
Error with the stack trace:
The text was updated successfully, but these errors were encountered: