streamingfast / go-ethereum

Official Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
9 stars 5 forks source link

latest firehose release crashing in engine_newPayloadV2 #8

Closed sduchesneau closed 1 year ago

sduchesneau commented 1 year ago

System information

Geth version: release v1.12.1-fh2.3 OS & Version: Linux

Logs

ERROR[09-05|10:50:45.166] RPC method engine_newPayloadV2 crashed: should have been call in a transaction, something is deeply wrong
goroutine 7642 [running]:
github.com/ethereum/go-ethereum/rpc.(*callback).call.func1()
    github.com/ethereum/go-ethereum/rpc/service.go:199 +0x89
panic({0x17ebf60, 0x209b720})
    runtime/panic.go:884 +0x213
github.com/ethereum/go-ethereum/firehose.(*Context).callIndex(0x7fb252cfcf18?)
    github.com/ethereum/go-ethereum/firehose/context.go:512 +0x4c
github.com/ethereum/go-ethereum/firehose.(*Context).RecordBalanceChange(0xc0bfb3c240, {0xb9, 0xd7, 0x93, 0x48, 0x78, 0xb5, 0xfb, 0x96, 0x10, ...}, ...)
    github.com/ethereum/go-ethereum/firehose/context.go:685 +0x91
github.com/ethereum/go-ethereum/core/state.(*stateObject).SetBalance(0xc03d550fc0, 0xc05bb854e0, 0x8f1e445e8afeb310?, {0x1ad8511?, 0xc0bf4dda40?})
    github.com/ethereum/go-ethereum/core/state/state_object.go:433 +0x88
github.com/ethereum/go-ethereum/core/state.(*stateObject).AddBalance(0xc03d550fc0, 0xc0bfcf5890, 0xc03f297ead?, {0x1ad8511, 0xa})
    github.com/ethereum/go-ethereum/core/state/state_object.go:419 +0x12c
github.com/ethereum/go-ethereum/core/state.(*StateDB).AddBalance(0xf0d2c4?, {0xb9, 0xd7, 0x93, 0x48, 0x78, 0xb5, 0xfb, 0x96, 0x10, ...}, ...)
    github.com/ethereum/go-ethereum/core/state/statedb.go:423 +0x6f
github.com/ethereum/go-ethereum/consensus/beacon.(*Beacon).Finalize(0xc0002b8130, {0x20b2740, 0xc01f571000}, 0xc0bee50b40, 0xc0bfcf5a60?, {0xc01df81680, 0x89, 0x89}, {0x2de5310, 0x0, ...}, ...)
    github.com/ethereum/go-ethereum/consensus/beacon/consensus.go:355 +0x2a7
github.com/ethereum/go-ethereum/core.(*StateProcessor).Process(0xc0002ab3a0, 0xc0bbb52e60, 0xc0bf4dda40, {{0x0, 0x0}, 0x0, 0x0, {0x0, 0x0, 0x0}}, ...)
    github.com/ethereum/go-ethereum/core/state_processor.go:141 +0x103a
github.com/ethereum/go-ethereum/core.(*BlockChain).insertChain(0xc01f571000, {0xc027ef9950?, 0x1, 0x1}, 0x0)
    github.com/ethereum/go-ethereum/core/blockchain.go:1813 +0x20f0
github.com/ethereum/go-ethereum/core.(*BlockChain).InsertBlockWithoutSetHead(0xc01f571000, 0xc0bbb52e60)
    github.com/ethereum/go-ethereum/core/blockchain.go:2338 +0xcd
github.com/ethereum/go-ethereum/eth/catalyst.(*ConsensusAPI).newPayload(_, {{0xbc, 0x94, 0x46, 0x9e, 0x52, 0x8b, 0x13, 0x95, 0x1f, ...}, ...}, ...)
    github.com/ethereum/go-ethereum/eth/catalyst/api.go:555 +0x9ee
github.com/ethereum/go-ethereum/eth/catalyst.(*ConsensusAPI).NewPayloadV2(_, {{0xbc, 0x94, 0x46, 0x9e, 0x52, 0x8b, 0x13, 0x95, 0x1f, ...}, ...})
    github.com/ethereum/go-ethereum/eth/catalyst/api.go:455 +0x347
reflect.Value.call({0xc01697cc00?, 0xc0169dc298?, 0x7fb1e07cceb8?}, {0x1acf1e1, 0x4}, {0xc0bd823b80, 0x2, 0x0?})
    reflect/value.go:586 +0xb0b
reflect.Value.Call({0xc01697cc00?, 0xc0169dc298?, 0x1?}, {0xc0bd823b80?, 0x1?, 0x16?})
    reflect/value.go:370 +0xbc
github.com/ethereum/go-ethereum/rpc.(*callback).call(0xc0169e2cc0, {0x20aebd8?, 0xc0bd823a90}, {0xc058271ed8, 0x13}, {0xc0bf4c5d40, 0x1, 0x4e8bb7?})
    github.com/ethereum/go-ethereum/rpc/service.go:205 +0x3c5
github.com/ethereum/go-ethereum/rpc.(*handler).runMethod(0xc0c0400000?, {0x20aebd8?, 0xc0bd823a90?}, 0xc0bf4d8540, 0x1?, {0xc0bf4c5d40?, 0x42b9d0?, 0x18b5ec0?})
    github.com/ethereum/go-ethereum/rpc/handler.go:565 +0x45
github.com/ethereum/go-ethereum/rpc.(*handler).handleCall(0xc0bbb52c80, 0xc0bf4fc0f0, 0xc0bf4d8540)
    github.com/ethereum/go-ethereum/rpc/handler.go:512 +0x239
github.com/ethereum/go-ethereum/rpc.(*handler).handleCallMsg(0xc0bbb52c80, 0xc0bf4fc150?, 0xc0bf4d8540)
    github.com/ethereum/go-ethereum/rpc/handler.go:470 +0x237
github.com/ethereum/go-ethereum/rpc.(*handler).handleNonBatchCall(0xc0bbb52c80, 0xc0bf4fc0f0, 0xc0bf4d8540)
    github.com/ethereum/go-ethereum/rpc/handler.go:296 +0x1ae
github.com/ethereum/go-ethereum/rpc.(*handler).handleMsg.func1.1(0x20aebd8?)
    github.com/ethereum/go-ethereum/rpc/handler.go:269 +0x27
github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc.func1()
    github.com/ethereum/go-ethereum/rpc/handler.go:387 +0xc5
created by github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc
    github.com/ethereum/go-ethereum/rpc/handler.go:383 +0x8d

WARN [09-05|10:50:45.166] Served engine_newPayloadV2               conn=10.1.144.7:44968 reqid=1 duration=106.636873ms err="method handler crashed"
sduchesneau commented 1 year ago
INFO [09-05|11:02:49.089] Importing sidechain segment              start=18,071,013 end=18,071,014
goroutine 4609 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
    runtime/debug/stack.go:16 +0x19
github.com/ethereum/go-ethereum/firehose.(*Context).callIndex(0x7ff257428f18?)
    github.com/ethereum/go-ethereum/firehose/context.go:511 +0x39
github.com/ethereum/go-ethereum/firehose.(*Context).RecordBalanceChange(0xc0138f2a20, {0xb9, 0xd7, 0x93, 0x48, 0x78, 0xb5, 0xfb, 0x96, 0x10, ...}, ...)
    github.com/ethereum/go-ethereum/firehose/context.go:685 +0x91
github.com/ethereum/go-ethereum/core/state.(*stateObject).SetBalance(0xc01de45180, 0xc01e9b10e0, 0x8f1e445e8afeb310?, {0x1ad8511?, 0xc012b72a80?})
    github.com/ethereum/go-ethereum/core/state/state_object.go:433 +0x88
github.com/ethereum/go-ethereum/core/state.(*stateObject).AddBalance(0xc01de45180, 0xc01709f118, 0xc03f297ead?, {0x1ad8511, 0xa})
    github.com/ethereum/go-ethereum/core/state/state_object.go:419 +0x12c
github.com/ethereum/go-ethereum/core/state.(*StateDB).AddBalance(0xf20fd5?, {0xb9, 0xd7, 0x93, 0x48, 0x78, 0xb5, 0xfb, 0x96, 0x10, ...}, ...)
    github.com/ethereum/go-ethereum/core/state/statedb.go:423 +0x6f
github.com/ethereum/go-ethereum/consensus/beacon.(*Beacon).Finalize(0xc018252260, {0x20b2740, 0xc019020800}, 0xc0138fa480, 0xc01709f2e8?, {0xc012702f00, 0x99, 0x99}, {0x2de5310, 0x0, ...}, ...)
    github.com/ethereum/go-ethereum/consensus/beacon/consensus.go:355 +0x2a7
github.com/ethereum/go-ethereum/core.(*StateProcessor).Process(0xc0009af4e0, 0xc012717040, 0xc012b72a80, {{0x0, 0x0}, 0x0, 0x0, {0x0, 0x0, 0x0}}, ...)
    github.com/ethereum/go-ethereum/core/state_processor.go:141 +0x103a
github.com/ethereum/go-ethereum/core.(*BlockChain).insertChain(0xc019020800, {0xc01364c410?, 0x2, 0x2}, 0x1)
    github.com/ethereum/go-ethereum/core/blockchain.go:1813 +0x20f0
github.com/ethereum/go-ethereum/core.(*BlockChain).insertSideChain(0xc019020800, 0x1b111e3?, 0xc01249d3a0)
    github.com/ethereum/go-ethereum/core/blockchain.go:2086 +0x19f3
github.com/ethereum/go-ethereum/core.(*BlockChain).insertChain(0xc019020800, {0xc0135fa4e0?, 0x1, 0x1}, 0x1)
    github.com/ethereum/go-ethereum/core/blockchain.go:1666 +0x98e
github.com/ethereum/go-ethereum/core.(*BlockChain).InsertChain(0xc019020800, {0xc0135fa4e0?, 0x1, 0x1})
    github.com/ethereum/go-ethereum/core/blockchain.go:1568 +0xb0e
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).importBlockResults(0xc004d7bba0, {0xc0135fa4d8, 0x1, 0x30?})
    github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1559 +0x54e
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).processFullSyncContent(0xc004d7bba0, 0x0, 0x1)
    github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1526 +0x17c
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).syncWithPeer.func9()
    github.com/ethereum/go-ethereum/eth/downloader/downloader.go:643 +0x25
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync.func1()
    github.com/ethereum/go-ethereum/eth/downloader/downloader.go:655 +0x70
created by github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync
    github.com/ethereum/go-ethereum/eth/downloader/downloader.go:655 +0x68
panic: should have been call in a transaction, something is deeply wrong

goroutine 4609 [running]:
github.com/ethereum/go-ethereum/firehose.(*Context).callIndex(0x7ff257428f18?)
    github.com/ethereum/go-ethereum/firehose/context.go:512 +0x4c
github.com/ethereum/go-ethereum/firehose.(*Context).RecordBalanceChange(0xc0138f2a20, {0xb9, 0xd7, 0x93, 0x48, 0x78, 0xb5, 0xfb, 0x96, 0x10, ...}, ...)
    github.com/ethereum/go-ethereum/firehose/context.go:685 +0x91
github.com/ethereum/go-ethereum/core/state.(*stateObject).SetBalance(0xc01de45180, 0xc01e9b10e0, 0x8f1e445e8afeb310?, {0x1ad8511?, 0xc012b72a80?})
    github.com/ethereum/go-ethereum/core/state/state_object.go:433 +0x88
github.com/ethereum/go-ethereum/core/state.(*stateObject).AddBalance(0xc01de45180, 0xc01709f118, 0xc03f297ead?, {0x1ad8511, 0xa})
    github.com/ethereum/go-ethereum/core/state/state_object.go:419 +0x12c
github.com/ethereum/go-ethereum/core/state.(*StateDB).AddBalance(0xf20fd5?, {0xb9, 0xd7, 0x93, 0x48, 0x78, 0xb5, 0xfb, 0x96, 0x10, ...}, ...)
    github.com/ethereum/go-ethereum/core/state/statedb.go:423 +0x6f
github.com/ethereum/go-ethereum/consensus/beacon.(*Beacon).Finalize(0xc018252260, {0x20b2740, 0xc019020800}, 0xc0138fa480, 0xc01709f2e8?, {0xc012702f00, 0x99, 0x99}, {0x2de5310, 0x0, ...}, ...)
    github.com/ethereum/go-ethereum/consensus/beacon/consensus.go:355 +0x2a7
github.com/ethereum/go-ethereum/core.(*StateProcessor).Process(0xc0009af4e0, 0xc012717040, 0xc012b72a80, {{0x0, 0x0}, 0x0, 0x0, {0x0, 0x0, 0x0}}, ...)
    github.com/ethereum/go-ethereum/core/state_processor.go:141 +0x103a
github.com/ethereum/go-ethereum/core.(*BlockChain).insertChain(0xc019020800, {0xc01364c410?, 0x2, 0x2}, 0x1)
    github.com/ethereum/go-ethereum/core/blockchain.go:1813 +0x20f0
github.com/ethereum/go-ethereum/core.(*BlockChain).insertSideChain(0xc019020800, 0x1b111e3?, 0xc01249d3a0)
    github.com/ethereum/go-ethereum/core/blockchain.go:2086 +0x19f3
github.com/ethereum/go-ethereum/core.(*BlockChain).insertChain(0xc019020800, {0xc0135fa4e0?, 0x1, 0x1}, 0x1)
    github.com/ethereum/go-ethereum/core/blockchain.go:1666 +0x98e
github.com/ethereum/go-ethereum/core.(*BlockChain).InsertChain(0xc019020800, {0xc0135fa4e0?, 0x1, 0x1})
    github.com/ethereum/go-ethereum/core/blockchain.go:1568 +0xb0e
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).importBlockResults(0xc004d7bba0, {0xc0135fa4d8, 0x1, 0x30?})
    github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1559 +0x54e
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).processFullSyncContent(0xc004d7bba0, 0x0, 0x1)
    github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1526 +0x17c
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).syncWithPeer.func9()
    github.com/ethereum/go-ethereum/eth/downloader/downloader.go:643 +0x25
github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync.func1()
    github.com/ethereum/go-ethereum/eth/downloader/downloader.go:655 +0x70
created by github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).spawnSync
    github.com/ethereum/go-ethereum/eth/downloader/downloader.go:655 +0x68
sduchesneau commented 1 year ago

fixed by https://github.com/streamingfast/go-ethereum/pull/9