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

Tracing block 1440753 on goerli throws 'RPC method debug_traceBlockByHash crashed: runtime error: index out of range [-1]' #27119

Closed
zimbabao opened this issue Apr 19, 2023 · 1 comment
Labels

Comments

@zimbabao
Copy link
Contributor

zimbabao commented Apr 19, 2023

System information

Geth version: 1.11.5
CL client & version: [email protected]
OS & Version: Linux

Expected behaviour

Return trace for block 1440753

Actual behaviour

Throws exception

WARN [04-19|14:42:01.562] Served debug_traceBlockByHash            reqid=2659883 duration="231.352µs"  err="method handler crashed"
ERROR[04-19|14:42:02.563] RPC method debug_traceBlockByHash crashed: runtime error: index out of range [-1]
goroutine 812285807 [running]:
github.com/ethereum/go-ethereum/rpc.(*callback).call.func1()
	github.com/ethereum/go-ethereum/rpc/service.go:199 +0x89
panic({0x1856e80, 0xc0dea39ab8})
	runtime/panic.go:884 +0x213
github.com/ethereum/go-ethereum/eth/tracers/native.(*callTracer).CaptureState(0xc0157e46b0?, 0x40ee48?, 0xa8?, 0x18?, 0x18?, 0x17d64a0?, {0x10000004184f3?, 0x7f3f338ff128?, 0x7f3fa7a4d948?}, 0x1, ...)
	github.com/ethereum/go-ethereum/eth/tracers/native/call.go:171 +0x5ce
github.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run.func4()
	github.com/ethereum/go-ethereum/core/vm/interpreter.go:159 +0x10f
github.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run(0xc04d7c4660, 0xc031a9fa40, {0x0, 0x0, 0x0}, 0x0)
	github.com/ethereum/go-ethereum/core/vm/interpreter.go:182 +0xd75
github.com/ethereum/go-ethereum/core/vm.(*EVM).create(0xc04ecdac60, {0x1c8e960, 0xc0dea39998}, 0xc0157e4b78, 0x9dd88, 0xc0aa1ccae0?, {0xe7, 0xbc, 0xcb, 0x1e, ...}, ...)
	github.com/ethereum/go-ethereum/core/vm/evm.go:462 +0x734
github.com/ethereum/go-ethereum/core/vm.(*EVM).Create(0xc04ecdac60, {0x1c8e960, 0xc0dea39998}, {0xc06f266b10, 0x24, 0x24}, 0xc0adff1c80?, 0xc0003021e0?)
	github.com/ethereum/go-ethereum/core/vm/evm.go:510 +0x1cf
github.com/ethereum/go-ethereum/core.(*StateTransition).TransitionDb(0xc0157e4e58)
	github.com/ethereum/go-ethereum/core/state_transition.go:371 +0x8a5
github.com/ethereum/go-ethereum/core.ApplyMessage(0x1c97f98?, 0xc0203c1e50?, 0xc0adff1c20?)
	github.com/ethereum/go-ethereum/core/state_transition.go:176 +0x5d
github.com/ethereum/go-ethereum/eth/tracers.(*API).traceTx(0xc000599db0, {0x1c97f98, 0xc0203c1e50}, 0xc06f5e0a20, 0xc021dbc7d0, {0x1acfe40, 0x1acfe48, 0xc0adff1c20, {0x9d, 0x52, ...}, ...}, ...)
	github.com/ethereum/go-ethereum/eth/tracers/api.go:989 +0x6a9
github.com/ethereum/go-ethereum/eth/tracers.(*API).traceBlock(0xc000599db0, {0x1c97f98?, 0xc0203c1e50?}, 0xc0aeb08500, 0xc045138880)
	github.com/ethereum/go-ethereum/eth/tracers/api.go:638 +0xe0e
github.com/ethereum/go-ethereum/eth/tracers.(*API).TraceBlockByHash(0x1000000000008?, {0x1c97f98, 0xc0203c1e50}, {0x8f, 0x57, 0xb9, 0xdb, 0xeb, 0xf8, 0x6d, ...}, ...)
	github.com/ethereum/go-ethereum/eth/tracers/api.go:472 +0x88
reflect.Value.call({0xc00149d110?, 0xc0009ac248?, 0x7f3f55ee5068?}, {0x1936b91, 0x4}, {0xc04d7c45a0, 0x4, 0x0?})
	reflect/value.go:586 +0xb07
reflect.Value.Call({0xc00149d110?, 0xc0009ac248?, 0x1?}, {0xc04d7c45a0?, 0x2?, 0x16?})
	reflect/value.go:370 +0xbc
github.com/ethereum/go-ethereum/rpc.(*callback).call(0xc01bafe6c0, {0x1c97f98?, 0xc0203c1e50}, {0xc0dea39950, 0x16}, {0xc0adff14d0, 0x2, 0x4d3837?})
	github.com/ethereum/go-ethereum/rpc/service.go:205 +0x3c5
github.com/ethereum/go-ethereum/rpc.(*handler).runMethod(0xc04ef85a40?, {0x1c97f98?, 0xc0203c1e50?}, 0xc093e06690, 0x2?, {0xc0adff14d0?, 0x410cfd?, 0x17243e0?})
	github.com/ethereum/go-ethereum/rpc/handler.go:513 +0x45
github.com/ethereum/go-ethereum/rpc.(*handler).handleCall(0xc0bfd181b0, 0xc0adff1200, 0xc093e06690)
	github.com/ethereum/go-ethereum/rpc/handler.go:459 +0x239
github.com/ethereum/go-ethereum/rpc.(*handler).handleCallMsg(0xc0bfd181b0, 0xc0203c1e50?, 0xc093e06690)
	github.com/ethereum/go-ethereum/rpc/handler.go:420 +0x237
github.com/ethereum/go-ethereum/rpc.(*handler).handleMsg.func1(0xc0adff1200)
	github.com/ethereum/go-ethereum/rpc/handler.go:256 +0x1a5
github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc.func1()
	github.com/ethereum/go-ethereum/rpc/handler.go:348 +0xc5
created by github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc
	github.com/ethereum/go-ethereum/rpc/handler.go:344 +0x8d

Steps to reproduce the behaviour

  1. Trace block 1440753
  2. Check response and node logs.
  3. You will see panic like in section Actual behaviour

Backtrace

[backtrace]
@zimbabao
Copy link
Contributor Author

Fixed with #26848

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

No branches or pull requests

1 participant