erigon icon indicating copy to clipboard operation
erigon copied to clipboard

callTracer crashing on Ethereum Mainnet block 4_890_213

Open quickchase opened this issue 2 years ago • 4 comments

System information

Erigon version: 7a2e7e8c062ca1efa7db97b8aec71a674d9959ce

Description

When calling debug_traceBlockByNumber on block 0x4A9E65 with callTracer - there is a method handler crash

With JSON-RPC streaming, malformed JSON is returned because of this. But the root cause is the method handler crash with callTracer

Expected behaviour

Don't crash?

Actual behaviour

bad response.txt

Steps to reproduce the behaviour

{
  "jsonrpc": "2.0",
  "method": "debug_traceBlockByNumber",
  "params": ["0x4A9E65", { "tracer": "callTracer", "timeout": "240s" }],
  "id": 1
}

quickchase avatar Aug 08 '22 14:08 quickchase

is there anything in the logs? stack trace or something like that?

mandrigin avatar Aug 08 '22 16:08 mandrigin

Actually, yes.

[EROR] [08-08|16:58:39.350] RPC method debug_traceBlockByNumber crashed: interface conversion: interface {} is float64, not int64

[service.go:217 panic.go:838 runtime.go:2161 panic.go:838 vm.go:512 panic.go:838 iface.go:262 jsvm.go:80 tracer.go:135 jsvm.go:62 value.go:556 value.go:339 runtime.go:1756 vm.go:2658 vm.go:2630 vm.go:402 func.go:172 func.go:180 func.go:140 runtime.go:2166 vm.go:518 runtime.go:2165 jsvm.go:199 tracer.go:552 tracer.go:636 interpreter.go:313 evm.go:75 evm.go:274 state_transition.go:416 state_transition.go:230 tracing.go:144 tracing.go:103 tracing.go:31 value.go:556 value.go:339 service.go:222 handler.go:480 handler.go:413 handler.go:361 handler.go:192 handler.go:285 asm_amd64.s:1571]

quickchase avatar Aug 08 '22 16:08 quickchase

Bump

quickchase avatar Aug 31 '22 13:08 quickchase

So there are like 34,000 blocks that cannot be traced and have this method handler crashed after a null / invalid JSON

https://gist.github.com/maurodelazeri/692d04d143fc15ff06549d4c4512ed31

Rel: #4935

quickchase avatar Sep 30 '22 14:09 quickchase

@quickchase any resolution to this? I'm noticing the same thing in that exact same block. In fact, looks like the culprit is the transaction 0x1abefc71081a2c0115b1cc9d2a3c21bcd0cbc0355007d649898ad4d08d361c7e if you do debug_traceTransaction.

Edit: Upon further inspection, the issue is coming from the log.getCost() call

alangshur avatar Nov 05 '22 20:11 alangshur

May be related to #5308

quickchase avatar Dec 10 '22 22:12 quickchase

I checked that is it not crashing anymore on devel after the implementation of native tracers

AlexeyAkhunov avatar Jan 05 '23 07:01 AlexeyAkhunov

This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.

github-actions[bot] avatar Feb 16 '23 02:02 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Feb 24 '23 02:02 github-actions[bot]