mev-geth crashed panic: runtime error: invalid memory address or nil pointer dereference
yahsinhuangtw opened this issue · 2 comments
System information
Geth
Version: 1.9.26-unstable
Git Commit: f1436fb
Git Commit Date: 20210220
Architecture: amd64
Protocol Versions: [65 64 63]
Go Version: go1.16
Operating System: darwin
GOPATH=
GOROOT=go
Expected behaviour
geth syncs
Actual behaviour
geth syncs, then crashed
Steps to reproduce the behaviour
make geth
./build/bin/geth
Backtrace
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x40745c7]
goroutine 197275 [running]:
github.com/ethereum/go-ethereum/rlp.(*encbuf).encodeString(0xc0076d22a0, 0x0, 0x20, 0x20)
github.com/ethereum/go-ethereum/rlp/encode.go:179 +0x13c
github.com/ethereum/go-ethereum/rlp.writeBytes(0x4d9a020, 0xc0b0013a20, 0x97, 0xc0076d22a0, 0x4d9a020, 0xc0b0013a20)
github.com/ethereum/go-ethereum/rlp/encode.go:428 +0x6b
github.com/ethereum/go-ethereum/rlp.makeStructWriter.func1(0x4e92420, 0xc0b00139f0, 0x99, 0xc0076d22a0, 0x4e90000, 0xc0771669c0)
github.com/ethereum/go-ethereum/rlp/encode.go:552 +0x182
github.com/ethereum/go-ethereum/rlp.(*encbuf).encode(0xc0076d22a0, 0x4e92420, 0xc0b00139f0, 0x0, 0xc00063b0f0)
github.com/ethereum/go-ethereum/rlp/encode.go:160 +0x142
github.com/ethereum/go-ethereum/rlp.Encode(0x51903a0, 0xc0076d22a0, 0x4e92420, 0xc0b00139f0, 0x0, 0x0)
github.com/ethereum/go-ethereum/rlp/encode.go:57 +0x74
github.com/ethereum/go-ethereum/core/types.(*Log).EncodeRLP(0xc0b38b2210, 0x51903a0, 0xc0076d22a0, 0x48c6b978, 0xc0b38b2210)
github.com/ethereum/go-ethereum/core/types/log.go:88 +0xc8
github.com/ethereum/go-ethereum/rlp.makeEncoderWriter.func2(0x4f25ea0, 0xc0b38b2210, 0x199, 0xc0076d22a0, 0xc0b38b2210, 0x199)
github.com/ethereum/go-ethereum/rlp/encode.go:602 +0x15b
github.com/ethereum/go-ethereum/rlp.makePtrWriter.func1(0x4e54460, 0xc0b2889740, 0x196, 0xc0076d22a0, 0x4e54460, 0xc0b2889740)
github.com/ethereum/go-ethereum/rlp/encode.go:584 +0x29d
github.com/ethereum/go-ethereum/rlp.makeSliceWriter.func1(0x4d8d720, 0xc090d1ac60, 0x197, 0xc0076d22a0, 0x0, 0x0)
github.com/ethereum/go-ethereum/rlp/encode.go:530 +0x11d
github.com/ethereum/go-ethereum/rlp.makeStructWriter.func1(0x4ec38e0, 0xc090d1ab40, 0x199, 0xc0076d22a0, 0xc090d1ab40, 0x199)
github.com/ethereum/go-ethereum/rlp/encode.go:552 +0x182
github.com/ethereum/go-ethereum/rlp.makePtrWriter.func1(0x4d71840, 0xc090d1ab40, 0x16, 0xc0076d22a0, 0x4d70000, 0xc0818cc1b0)
github.com/ethereum/go-ethereum/rlp/encode.go:584 +0x29d
github.com/ethereum/go-ethereum/rlp.(*encbuf).encode(0xc0076d22a0, 0x4d71840, 0xc090d1ab40, 0xc000101680, 0x0)
github.com/ethereum/go-ethereum/rlp/encode.go:160 +0x142
github.com/ethereum/go-ethereum/rlp.Encode(0x51903a0, 0xc0076d22a0, 0x4d71840, 0xc090d1ab40, 0x0, 0x0)
github.com/ethereum/go-ethereum/rlp/encode.go:57 +0x74
github.com/ethereum/go-ethereum/core/types.(*Receipt).EncodeRLP(0xc0b38aea80, 0x51903a0, 0xc0076d22a0, 0x497e5c58, 0xc0b38aea80)
github.com/ethereum/go-ethereum/core/types/receipt.go:130 +0x132
github.com/ethereum/go-ethereum/rlp.makeEncoderWriter.func2(0x4f34a40, 0xc0b38aea80, 0x199, 0xc0076d22a0, 0xc0b38aea80, 0x199)
github.com/ethereum/go-ethereum/rlp/encode.go:602 +0x15b
github.com/ethereum/go-ethereum/rlp.makePtrWriter.func1(0x4ebaee0, 0xc0b38aea80, 0x16, 0xc0076d22a0, 0x4eb0000, 0xc0818181b0)
github.com/ethereum/go-ethereum/rlp/encode.go:584 +0x29d
github.com/ethereum/go-ethereum/rlp.(*encbuf).encode(0xc0076d22a0, 0x4ebaee0, 0xc0b38aea80, 0x3, 0xc089de4000)
github.com/ethereum/go-ethereum/rlp/encode.go:160 +0x142
github.com/ethereum/go-ethereum/rlp.EncodeToBytes(0x4ebaee0, 0xc0b38aea80, 0x0, 0x0, 0x0, 0x0, 0x0)
github.com/ethereum/go-ethereum/rlp/encode.go:74 +0xdb
github.com/ethereum/go-ethereum/core/types.Receipts.GetRlp(...)
github.com/ethereum/go-ethereum/core/types/receipt.go:288
github.com/ethereum/go-ethereum/core/types.DeriveSha(0x519f8e8, 0xc08a88b7a0, 0x51a56c8, 0xc0ae56c750, 0x0, 0x0, 0x0, 0x0)
github.com/ethereum/go-ethereum/core/types/derive_sha.go:47 +0xd8
github.com/ethereum/go-ethereum/eth/downloader.(*queue).DeliverReceipts.func1(0xd, 0xc078045d40, 0x48c98187051db274, 0x662617a138328dc0)
github.com/ethereum/go-ethereum/eth/downloader/queue.go:805 +0xb5
github.com/ethereum/go-ethereum/eth/downloader.(*queue).deliver(0xc01a0e61e0, 0xc0a5000820, 0x10, 0xc0ced46000, 0xc00053a000, 0xc0ced46030, 0x51bd6e0, 0x5ab3ae8, 0x45, 0xc00063bac0, ...)
github.com/ethereum/go-ethereum/eth/downloader/queue.go:855 +0x2a6
github.com/ethereum/go-ethereum/eth/downloader.(*queue).DeliverReceipts(0xc01a0e61e0, 0xc0a5000820, 0x10, 0xc0b2d16900, 0x45, 0x5e, 0x0, 0x0, 0x0)
github.com/ethereum/go-ethereum/eth/downloader/queue.go:814 +0x197
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).fetchReceipts.func1(0x51a5398, 0xc078f96cc0, 0x10, 0xc00921a780, 0x5)
github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1265 +0x74
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).fetchParts(0xc000536380, 0xc00020eae0, 0xc00063bea0, 0xc00007c0e0, 0xc00063be90, 0xc00063bef0, 0xc00063bee0, 0xc00063bed0, 0x0, 0x5063248, ...)
github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1331 +0x2d2
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).fetchReceipts(0xc000536380, 0x416af4, 0xc087ab57b8, 0x471489a)
github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1274 +0x2c5
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).syncWithPeer.func5(0x0, 0x4d75dc0)
github.com/ethereum/go-ethereum/eth/downloader/downloader.go:546 +0x36
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync.func1(0xc000536380, 0xc0087297a0, 0xc00e7a92d8)
github.com/ethereum/go-ethereum/eth/downloader/downloader.go:568 +0x5b
created by github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync
github.com/ethereum/go-ethereum/eth/downloader/downloader.go:568 +0xaf
The master
branch is currently based on an arbitrary unstable commit from upstream master in Decemeber. Can you please try to reproduce using one of the stable releases https://github.com/flashbots/mev-geth/releases, or you can use the mev release branch https://github.com/flashbots/mev-geth/tree/release/v1.9.25
I've force pushed master back to be based on top of the stable v1.9.25 release. Thanks for reporting this, and feel free to re-open if you're still seeing issues.