Skip to content
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

gnosis: make Aura object ready for parallel blocks execution #12054

Open
AskAlexSharov opened this issue Sep 21, 2024 · 0 comments
Open

gnosis: make Aura object ready for parallel blocks execution #12054

AskAlexSharov opened this issue Sep 21, 2024 · 0 comments
Assignees
Labels
erigon3 gnosis Gnosis Chain imp2 Medium importance

Comments

@AskAlexSharov
Copy link
Collaborator

Now i see there is internal state variables - it make parallel exec invalid and race

fatal error: concurrent map writes

goroutine 135 [running]:
github.com/erigontech/erigon/consensus/aura.(*RollingFinality).addSigners(...)
	/home/ubuntu/erigon/consensus/aura/rolling_finality.go:118
github.com/erigontech/erigon/consensus/aura.(*RollingFinality).buildAncestrySubChain(0xc0fb2229a0, 0xc0029b9258, {0x17, 0x9e, 0xc4, 0x37, 0xa2, 0x53, 0xd2, 0xe4, ...}, ...)
	/home/ubuntu/erigon/consensus/aura/rolling_finality.go:157 +0x5f8
github.com/erigontech/erigon/consensus/aura.buildFinality(0xc168966040, {0x7159a8120fd8, 0xc001606040}, 0x2f48460?, {0x207f068?, 0xc08ea5c140?}, 0xc0030f2588, 0x6397ff?)
	/home/ubuntu/erigon/consensus/aura/aura.go:758 +0x17d
github.com/erigontech/erigon/consensus/aura.(*AuRa).Finalize(0xc00059a900, 0x8?, 0xc0030f2588, 0x43b618?, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, ...)
	/home/ubuntu/erigon/consensus/aura/aura.go:734 +0x425
github.com/erigontech/erigon/consensus/merge.(*Merge).Finalize(0xc00059c670, 0xc0015db8c0, 0xc0030f2588, 0xc0019818c0, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, ...)
	/home/ubuntu/erigon/consensus/merge/merge.go:158 +0x242
github.com/erigontech/erigon/cmd/state/exec3.(*HistoricalTraceWorker).RunTxTask(0xc00197dd10, 0xc001efb888)
	/home/ubuntu/erigon/cmd/state/exec3/historical_trace_worker.go:176 +0x717
github.com/erigontech/erigon/cmd/state/exec3.(*HistoricalTraceWorker).Run(0xc00197dd10)
	/home/ubuntu/erigon/cmd/state/exec3/historical_trace_worker.go:118 +0x9c
github.com/erigontech/erigon/cmd/state/exec3.NewHistoricalTraceWorkers.func2()
	/home/ubuntu/erigon/cmd/state/exec3/historical_trace_worker.go:311 +0x77
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/ubuntu/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
	/home/ubuntu/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96

goroutine 1 [runnable, locked to thread]:
sync.runtime_SemacquireRWMutexR(0x0?, 0xd8?, 0xb71193?)
	/usr/local/go/src/runtime/sema.go:82 +0x25
sync.(*RWMutex).RLock(...)
	/usr/local/go/src/sync/rwmutex.go:70
github.com/erigontech/erigon/rlp.cachedTypeInfo({0x2091ff0, 0x1af7520}, {0x0, 0x0, 0x0, 0x0, 0x0})
	/home/ubuntu/erigon/rlp/typecache.go:82 +0x86
github.com/erigontech/erigon/rlp.cachedDecoder(...)
	/home/ubuntu/erigon/rlp/typecache.go:72
github.com/erigontech/erigon/rlp.(*Stream).Decode(0xc16770c880, {0x19a8140?, 0xc16a882b40?})
	/home/ubuntu/erigon/rlp/decode.go:901 +0x19f
github.com/erigontech/erigon/rlp.Decode({0x2064320, 0xc15bd446f0}, {0x19a8140, 0xc16a882b40})
	/home/ubuntu/erigon/rlp/decode.go:118 +0x10a
github.com/erigontech/erigon/turbo/snapshotsync/freezeblocks.(*BlockReader).bodyForStorageFromSnapshot(0x1141537a9f010?, 0xc0fab33e20?, 0xc0fbc85620, {0xc002799b80, 0x247, 0x247})
	/home/ubuntu/erigon/turbo/snapshotsync/freezeblocks/block_reader.go:972 +0x265
github.com/erigontech/erigon/turbo/snapshotsync/freezeblocks.(*BlockReader).bodyFromSnapshot(0x4181a7286513ac10?, 0x20818c0?, 0xc0009ae9c0?, {0xc002799b80?, 0xc0027a6008?, 0x0?})
	/home/ubuntu/erigon/turbo/snapshotsync/freezeblocks/block_reader.go:928 +0x1c
github.com/erigontech/erigon/turbo/snapshotsync/freezeblocks.(*BlockReader).blockWithSenders(0xc15bb022f0, {0x2075790, 0x2f48460}, {0x71599fe6f6f8, 0xc168966480}, {0x10, 0xac, 0x13, 0x65, 0x28, ...}, ...)
	/home/ubuntu/erigon/turbo/snapshotsync/freezeblocks/block_reader.go:811 +0xb1d
github.com/erigontech/erigon/turbo/snapshotsync/freezeblocks.(*BlockReader).BlockWithSenders(...)
	/home/ubuntu/erigon/turbo/snapshotsync/freezeblocks/block_reader.go:713
github.com/erigontech/erigon/turbo/snapshotsync/freezeblocks.(*BlockReader).BlockByNumber(0xc15bb022f0, {0x2075790, 0x2f48460}, {0x71599fe6f640?, 0xc168966480}, 0x200)
	/home/ubuntu/erigon/turbo/snapshotsync/freezeblocks/block_reader.go:1240 +0xf9
github.com/erigontech/erigon/cmd/state/exec3.blockWithSenders({0x20758f0, 0xc00086c500}, {0x0, 0x0}, {0x71599fe6f640, 0xc168966480}, {0x71599fe71980, 0xc15bb022f0}, 0x200)
	/home/ubuntu/erigon/cmd/state/exec3/historical_trace_worker.go:522 +0x15c
github.com/erigontech/erigon/cmd/state/exec3.CustomTraceMapReduce(0x0, 0xf4240, {0x1e655b0?, 0xc168966580?}, {0x20758f0, 0xc00086c500}, {0x208ed28, 0xc168966480}, 0xc000024300, {0x2080d28, ...})
	/home/ubuntu/erigon/cmd/state/exec3/historical_trace_worker.go:421 +0x7fe
github.com/erigontech/erigon/eth/stagedsync.customTraceBatch({0x20758f0, 0xc00086c500}, 0xc000024300, {0x71599fe715a0, 0xc168966480}, 0xc00114a0e0, 0x0, 0xf4240, {0x1bd0f83, 0xc}, ...)
	/home/ubuntu/erigon/eth/stagedsync/stage_custom_trace.go:174 +0x245
github.com/erigontech/erigon/eth/stagedsync.customTraceBatchProduce.func1({0x20941c8, 0xc168966480})
	/home/ubuntu/erigon/eth/stagedsync/stage_custom_trace.go:119 +0x285
github.com/erigontech/erigon-lib/kv/temporal.(*DB).Update(0x153fc11?, {0x20758f0?, 0xc00086c500?}, 0xc167b1df20)
	/home/ubuntu/erigon/erigon-lib/kv/temporal/kv_temporal.go:125 +0x96
github.com/erigontech/erigon/eth/stagedsync.customTraceBatchProduce({0x20758f0, 0xc00086c500}, 0xc000024300, {0x20817e0, 0xc103ca58f0}, 0x0, 0xf4240, {0x1bd0f83, 0xc}, {0x2080d28, ...})
	/home/ubuntu/erigon/eth/stagedsync/stage_custom_trace.go:111 +0x14c
github.com/erigontech/erigon/eth/stagedsync.SpawnCustomTrace({{0x0, 0x0}, {0x20817e0, 0xc103ca58f0}, {0x1, {0x2078040, 0xc16aeff698}, {0x2078040, 0xc16aeff6a0}, {}}, ...}, ...)
	/home/ubuntu/erigon/eth/stagedsync/stage_custom_trace.go:101 +0x28a
github.com/erigontech/erigon/cmd/integration/commands.stageCustomTrace({0x20817e0, 0xc103ca58f0}, {0x20758f0, 0xc00086c500}, {0x2080d28, 0xc0007d1020})
	/home/ubuntu/erigon/cmd/integration/commands/stages.go:1139 +0x958
github.com/erigontech/erigon/cmd/integration/commands.init.func24(0x2de1980, {0x1bc2cea?, 0x4?, 0x1bc2b8e?})
	/home/ubuntu/erigon/cmd/integration/commands/stages.go:247 +0x2d5
github.com/spf13/cobra.(*Command).execute(0x2de1980, {0xc000848a80, 0x8, 0x8})
	/home/ubuntu/go/pkg/mod/github.com/spf13/[email protected]/command.go:989 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0x2ddeb80)
	/home/ubuntu/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	/home/ubuntu/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
github.com/spf13/cobra.(*Command).ExecuteContext(0x0?, {0x20758f0?, 0xc00086c500?})
	/home/ubuntu/go/pkg/mod/github.com/spf13/[email protected]/command.go:1034 +0x47
main.main()
	/home/ubuntu/erigon/cmd/integration/main.go:34 +0xe6

@AskAlexSharov AskAlexSharov added this to the 3.0.0-beta1 milestone Sep 21, 2024
@AskAlexSharov AskAlexSharov added erigon3 imp2 Medium importance labels Sep 21, 2024
@yperbasis yperbasis added the gnosis Gnosis Chain label Oct 22, 2024
@yperbasis yperbasis self-assigned this Nov 1, 2024
@AskAlexSharov AskAlexSharov removed this from the 3.0.0-beta1 milestone Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
erigon3 gnosis Gnosis Chain imp2 Medium importance
Projects
None yet
Development

No branches or pull requests

2 participants