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

index out of range during full node sync #21367

Closed
DimaStebaev opened this issue Jul 24, 2020 · 1 comment
Closed

index out of range during full node sync #21367

DimaStebaev opened this issue Jul 24, 2020 · 1 comment

Comments

@DimaStebaev
Copy link

Hello.
I am syncing full historical node with rinkeby testnet. During processing 4M-5M blocks I've got an error:

panic: runtime error: index out of range [-1]

goroutine 646 [running]:
github.com/holiman/uint256.udivrem(0xc00ae8fca0, 0x8, 0x8, 0xc00ae8fce0, 0x8, 0x8, 0xc00b57a180, 0x0, 0x0, 0x0, ...)
	/tmp/gopath/pkg/mod/github.com/holiman/uint256@v1.1.0/uint256.go:451 +0x45b
github.com/holiman/uint256.(*Int).MulMod(0xc00b57a180, 0xc00ae8fd78, 0xc00ae8fd58, 0xc00b57a180, 0xc00b57a120)
	/tmp/gopath/pkg/mod/github.com/holiman/uint256@v1.1.0/uint256.go:586 +0x1ab
github.com/ethereum/go-ethereum/core/vm.opMulmod(0xc00b0cb428, 0xc00b500000, 0xc00b546520, 0x0, 0x0, 0x0, 0x0, 0x0)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/vm/instructions.go:183 +0x1ad
github.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run(0xc00b500000, 0xc009c7f980, 0xc008d1cbd0, 0x84, 0x84, 0xc00ae90100, 0x0, 0x0, 0x0, 0x0, ...)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/vm/interpreter.go:280 +0x5e4
github.com/ethereum/go-ethereum/core/vm.run(0xc00b4fc000, 0xc009c7f980, 0xc008d1cbd0, 0x84, 0x84, 0x1f00, 0x0, 0x0, 0x0, 0x0, ...)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/vm/evm.go:71 +0x2a6
github.com/ethereum/go-ethereum/core/vm.(*EVM).Call(0xc00b4fc000, 0x14b16e0, 0xc00b46fe60, 0x6c154b7a6a0b782, 0xc44c807452539671, 0xbc8167ce, 0xc008d1cbd0, 0x84, 0x84, 0x17086, ...)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/vm/evm.go:244 +0x545
github.com/ethereum/go-ethereum/core.(*StateTransition).TransitionDb(0xc00b49cd90, 0x14dc740, 0xc00b21d620, 0xc0021132f8)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/state_transition.go:260 +0x401
github.com/ethereum/go-ethereum/core.ApplyMessage(0xc00b4fc000, 0x14dc740, 0xc00b21d620, 0xc0021132f8, 0x9815648423baa184, 0x3a2d2592, 0xc00b4a1380)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/state_transition.go:164 +0x57
github.com/ethereum/go-ethereum/core.ApplyTransaction(0x1cff000, 0x14bd2a0, 0xc00902e000, 0x0, 0xc0021132f8, 0xc0021406e0, 0xc0097df200, 0xc008d47d40, 0xc00ae97ab0, 0x0, ...)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/state_processor.go:99 +0x2ac
github.com/ethereum/go-ethereum/core.(*StateProcessor).Process(0xc008f7e020, 0xc00ac20cf0, 0xc0021406e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/state_processor.go:71 +0x425
github.com/ethereum/go-ethereum/core.(*BlockChain).insertChain(0xc00902e000, 0xc00ac360e0, 0x2, 0x2, 0x32c2bbad308c5301, 0x0, 0x0, 0x0)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/blockchain.go:1793 +0xca8
github.com/ethereum/go-ethereum/core.(*BlockChain).InsertChain(0xc00902e000, 0xc00ac360e0, 0x2, 0x2, 0x0, 0x0, 0x0)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/blockchain.go:1596 +0xcf0
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).importBlockResults(0xc0092dc000, 0xc00ac360d0, 0x2, 0x2, 0x2, 0x0)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/eth/downloader/downloader.go:1570 +0x534
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).processFullSyncContent(0xc0092dc000, 0x0, 0x0)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/eth/downloader/downloader.go:1544 +0x79
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync.func1(0xc0092dc000, 0xc00a661ec0, 0xc00a632c20)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/eth/downloader/downloader.go:542 +0x5b
created by github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/eth/downloader/downloader.go:542 +0xaf

Geth version: 1.9.16-stable
OS & Version: Ubuntu 20.04
Commit hash : ea3b00a

Expected behaviour

Blockchain is synced

Actual behaviour

crash with index out of range error

Steps to reproduce the behaviour

I ran command
geth --rinkeby --datadir /mnt/hdd/blockchain/rinkeby-archive/ --http --http.port 5545 --http.addr "0.0.0.0" --syncmode "full" --gcmode=archive --cache 16384 --port 60606
and waited for several days (I use hdd).

Backtrace

goroutine 646 [running]:
github.com/holiman/uint256.udivrem(0xc00ae8fca0, 0x8, 0x8, 0xc00ae8fce0, 0x8, 0x8, 0xc00b57a180, 0x0, 0x0, 0x0, ...)
	/tmp/gopath/pkg/mod/github.com/holiman/uint256@v1.1.0/uint256.go:451 +0x45b
github.com/holiman/uint256.(*Int).MulMod(0xc00b57a180, 0xc00ae8fd78, 0xc00ae8fd58, 0xc00b57a180, 0xc00b57a120)
	/tmp/gopath/pkg/mod/github.com/holiman/uint256@v1.1.0/uint256.go:586 +0x1ab
github.com/ethereum/go-ethereum/core/vm.opMulmod(0xc00b0cb428, 0xc00b500000, 0xc00b546520, 0x0, 0x0, 0x0, 0x0, 0x0)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/vm/instructions.go:183 +0x1ad
github.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run(0xc00b500000, 0xc009c7f980, 0xc008d1cbd0, 0x84, 0x84, 0xc00ae90100, 0x0, 0x0, 0x0, 0x0, ...)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/vm/interpreter.go:280 +0x5e4
github.com/ethereum/go-ethereum/core/vm.run(0xc00b4fc000, 0xc009c7f980, 0xc008d1cbd0, 0x84, 0x84, 0x1f00, 0x0, 0x0, 0x0, 0x0, ...)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/vm/evm.go:71 +0x2a6
github.com/ethereum/go-ethereum/core/vm.(*EVM).Call(0xc00b4fc000, 0x14b16e0, 0xc00b46fe60, 0x6c154b7a6a0b782, 0xc44c807452539671, 0xbc8167ce, 0xc008d1cbd0, 0x84, 0x84, 0x17086, ...)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/vm/evm.go:244 +0x545
github.com/ethereum/go-ethereum/core.(*StateTransition).TransitionDb(0xc00b49cd90, 0x14dc740, 0xc00b21d620, 0xc0021132f8)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/state_transition.go:260 +0x401
github.com/ethereum/go-ethereum/core.ApplyMessage(0xc00b4fc000, 0x14dc740, 0xc00b21d620, 0xc0021132f8, 0x9815648423baa184, 0x3a2d2592, 0xc00b4a1380)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/state_transition.go:164 +0x57
github.com/ethereum/go-ethereum/core.ApplyTransaction(0x1cff000, 0x14bd2a0, 0xc00902e000, 0x0, 0xc0021132f8, 0xc0021406e0, 0xc0097df200, 0xc008d47d40, 0xc00ae97ab0, 0x0, ...)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/state_processor.go:99 +0x2ac
github.com/ethereum/go-ethereum/core.(*StateProcessor).Process(0xc008f7e020, 0xc00ac20cf0, 0xc0021406e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/state_processor.go:71 +0x425
github.com/ethereum/go-ethereum/core.(*BlockChain).insertChain(0xc00902e000, 0xc00ac360e0, 0x2, 0x2, 0x32c2bbad308c5301, 0x0, 0x0, 0x0)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/blockchain.go:1793 +0xca8
github.com/ethereum/go-ethereum/core.(*BlockChain).InsertChain(0xc00902e000, 0xc00ac360e0, 0x2, 0x2, 0x0, 0x0, 0x0)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/core/blockchain.go:1596 +0xcf0
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).importBlockResults(0xc0092dc000, 0xc00ac360d0, 0x2, 0x2, 0x2, 0x0)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/eth/downloader/downloader.go:1570 +0x534
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).processFullSyncContent(0xc0092dc000, 0x0, 0x0)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/eth/downloader/downloader.go:1544 +0x79
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync.func1(0xc0092dc000, 0xc00a661ec0, 0xc00a632c20)
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/eth/downloader/downloader.go:542 +0x5b
created by github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync
	/build/ethereum-pDI7YV/ethereum-1.9.16+build22802+focal/eth/downloader/downloader.go:542 +0xaf
@karalabe
Copy link
Member

Thanks for reporting this. This has been fixed on master now. If you don't mind using an "unstable" build, please rebuild Geth from master or wait a bit (1h?) for the builders to crunch through and publish in the usual locations. Alternatively we'll push the fix out in the next stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants