Skip to content

Instantly share code, notes, and snippets.

@achilleas-kal
Created September 8, 2022 22:23
Show Gist options
  • Save achilleas-kal/1751d83e22b313a7f759add9ff21998f to your computer and use it in GitHub Desktop.
Save achilleas-kal/1751d83e22b313a7f759add9ff21998f to your computer and use it in GitHub Desktop.
teBatchUpdateOrders module=exchange src="exchange/keeper/batch_update.go:239" ver=eb018590
fatal error: concurrent map iteration and map write
goroutine 4061762 [running]:
github.com/cosmos/iavl.NewUnsavedFastIterator({0xc271466e70, 0x22, 0x22}, {0xc271466ea0, 0x22, 0x22}, 0x0, 0xc024a5c090, 0xc04e19d7a0, 0xc04e19d7d0)
/go/pkg/mod/github.com/cosmos/[email protected]/unsaved_fast_iterator.go:65 +0x236
github.com/cosmos/iavl.(*MutableTree).Iterator(0xc03d17cf00, {0xc271466e70, 0x22, 0x22}, {0xc271466ea0, 0x22, 0x22}, 0x1e?)
/go/pkg/mod/github.com/cosmos/[email protected]/mutable_tree.go:204 +0xb7
github.com/cosmos/cosmos-sdk/store/iavl.(*Store).ReverseIterator(0x3e8?, {0xc271466e70?, 0x7d0?, 0x1e?}, {0xc271466ea0?, 0xc3b45a14a0?, 0xc04a0259b0?})
/go/pkg/mod/github.com/!injective!labs/[email protected]/store/iavl/store.go:247 +0x2e
github.com/cosmos/cosmos-sdk/store/cachekv.(*Store).iterator(0xc03c0ba840, {0xc271466e70, 0x22, 0x22}, {0xc271466ea0, 0x22, 0x22}, 0x0)
/go/pkg/mod/github.com/!injective!labs/[email protected]/store/cachekv/store.go:175 +0x134
github.com/cosmos/cosmos-sdk/store/cachekv.(*Store).ReverseIterator(0x20?, {0xc271466e70?, 0x20?, 0x20?}, {0xc271466ea0?, 0x20?, 0x20?})
/go/pkg/mod/github.com/!injective!labs/[email protected]/store/cachekv/store.go:163 +0x26
github.com/cosmos/cosmos-sdk/store/cachekv.(*Store).iterator(0xc03ffc79e0, {0xc271466e70, 0x22, 0x22}, {0xc271466ea0, 0x22, 0x22}, 0x0)
/go/pkg/mod/github.com/!injective!labs/[email protected]/store/cachekv/store.go:175 +0x134
github.com/cosmos/cosmos-sdk/store/cachekv.(*Store).ReverseIterator(0x3a15e28?, {0xc271466e70?, 0x3a15e28?, 0xc318e546f0?}, {0xc271466ea0?, 0x0?, 0x0?})
/go/pkg/mod/github.com/!injective!labs/[email protected]/store/cachekv/store.go:163 +0x26
github.com/cosmos/cosmos-sdk/store/cachekv.(*Store).iterator(0xc04a0259b0, {0xc271466e70, 0x22, 0x22}, {0xc271466ea0, 0x22, 0x22}, 0x0)
/go/pkg/mod/github.com/!injective!labs/[email protected]/store/cachekv/store.go:175 +0x134
github.com/cosmos/cosmos-sdk/store/cachekv.(*Store).ReverseIterator(0xc0304b8800?, {0xc271466e70?, 0x20?, 0xc0304b8900?}, {0xc271466ea0?, 0x20?, 0x586c1f?})
/go/pkg/mod/github.com/!injective!labs/[email protected]/store/cachekv/store.go:163 +0x26
github.com/cosmos/cosmos-sdk/store/gaskv.(*Store).iterator(0xc11fa3d800, {0xc271466e70?, 0x7fabc9ef8b38?, 0x30?}, {0xc271466ea0?, 0xc271466ea0?, 0x0?}, 0x70?)
/go/pkg/mod/github.com/!injective!labs/[email protected]/store/gaskv/store.go:109 +0x69
github.com/cosmos/cosmos-sdk/store/gaskv.(*Store).ReverseIterator(0x22?, {0xc271466e70?, 0xc001981000?, 0xc271466e40?}, {0xc271466ea0?, 0xc0013dd320?, 0xc071f203b0?})
/go/pkg/mod/github.com/!injective!labs/[email protected]/store/gaskv/store.go:86 +0x26
github.com/cosmos/cosmos-sdk/store/prefix.Store.ReverseIterator({{0x3a19a88, 0xc11fa3d800}, {0xc271466e40, 0x22, 0x30}}, {0x0, 0x0, 0x0}, {0x0, 0x0, ...})
/go/pkg/mod/github.com/!injective!labs/[email protected]/store/prefix/store.go:118 +0x239
github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/keeper.(*Keeper).IterateDerivativeLimitOrdersByMarketDirection(_, {{0x3a06680, 0xc0001b0000}, {0x3a1d7e0, 0xc4decc4b40}, {{0xb, 0x0}, {0xc28431c0e0, 0xb}, 0xe0d437, ...}, ...}, ...)
/src/injective-chain/modules/exchange/keeper/derivative_orders.go:613 +0x2e8
github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/keeper.(*Keeper).GetBestDerivativeLimitOrderPrice(_, {{0x3a06680, 0xc0001b0000}, {0x3a1d7e0, 0xc4decc4b40}, {{0xb, 0x0}, {0xc28431c0e0, 0xb}, 0xe0d437, ...}, ...}, ...)
/src/injective-chain/modules/exchange/keeper/derivative_orders.go:548 +0xc5
github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/keeper.(*Keeper).DerivativeOrderCrossesTopOfBook(_, {{0x3a06680, 0xc0001b0000}, {0x3a1d7e0, 0xc4decc4b40}, {{0xb, 0x0}, {0xc28431c0e0, 0xb}, 0xe0d437, ...}, ...}, ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment