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

RPC method trace_filter crashed: runtime error: invalid memory address or nil pointer dereference #7400

Closed
vkuzenkov opened this issue Apr 27, 2023 · 13 comments

Comments

@vkuzenkov
Copy link

vkuzenkov commented Apr 27, 2023

System information

Erigon version: 2.43.0

OS & Version: Ubuntu 20.04

Commit hash:

Erigon Command (with flags/config):

erigon  --chain=goerli
              --maxpeers=400
              --log.console.verbosity=debug
              --private.api.ratelimit=318720
              --datadir=/home/erigon/.local/share/erigon
              --http=false
              --private.api.addr="0.0.0.0:9090"
              --authrpc.addr="0.0.0.0"
              --authrpc.jwtsecret=/home/erigon/.local/share/erigon/jwt.hex
              --authrpc.vhosts="*"
              --metrics
              --metrics.addr=0.0.0.0
rpcdaemon --datadir=/home/erigon/.local/share/erigon
              --private.api.addr="erigon-goerli:9090"
              --txpool.api.addr="erigon-goerli:9090"
              --ws
              --http.addr="0.0.0.0"
              --http.vhosts="*"
              --http.corsdomain="*"
              --http.trace
              --rpc.batch.concurrency=300
              --rpc.returndata.limit=500000
              --rpc.streaming.disable (without this parameter error also reproduces)
              --http.api=eth,erigon,debug,net,web3,trace,txpool       
              --metrics
              --metrics.addr=0.0.0.0

Concensus Layer:

lighthouse

Concensus Layer Command (with flags/config):

lighthouse
             bn
             --network=goerli
             --datadir=/home/erigon/.local/share/erigon/consensys
             --checkpoint-sync-url={{ checkpoint_sync_url }}
             --reconstruct-historic-states
             --http
             --http-address=0.0.0.0
             --execution-jwt=/home/erigon/.local/share/erigon/jwt.hex
             --execution-endpoint=http://erigon-goerli:8551
             --disable-deposit-contract-sync

Chain/Network: goerli

Expected behaviour

{
"jsonrpc": "2.0",
"id": 445,
"method": "trace_filter",
"params": [{"fromBlock":"0x87cddc","toAddress":["0x1643e812ae58766192cf7d2cf9567df2c37e9b7f"],"toBlock":"0x87cddc"}]
}

{
"jsonrpc": "2.0",
"id": 445,
"result": [
{
"action": {
"from": "0xafb4bce970b77222a74d240294bd67216114b8eb",
"callType": "call",
"gas": "0xd291",
"input": "0x095ea7b3000000000000000000000000779d1b5315df083e3f9e94cb495983500ba8e90700000000000000000000000000000000000000000000000006f05b59d3b1ffff",
"to": "0x1643e812ae58766192cf7d2cf9567df2c37e9b7f",
"value": "0x0"
},
"blockHash": "0xfe12089ecb9c2660fe6cb30d6073648e9044fa4358e7e4479ad1c414dfc1693f",
"blockNumber": 8900060,
"result": {
"gasUsed": "0xaafe",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001"
},
"subtraces": 2,
"traceAddress": [],
"transactionHash": "0x2a577f35e8b6e61914485ce793ca19c50af5ca7d0e918d3d68d95b6abd49b613",
"transactionPosition": 72,
"type": "call"
},
{
"action": {
"from": "0x312ae3c2364231efa3f99b29d73e141b1110a92b",
"callType": "call",
"gas": "0xd29d",
"input": "0x095ea7b3000000000000000000000000779d1b5315df083e3f9e94cb495983500ba8e9070000000000000000000000000000000000000000000000000011c37937e07fff",
"to": "0x1643e812ae58766192cf7d2cf9567df2c37e9b7f",
"value": "0x0"
},
"blockHash": "0xfe12089ecb9c2660fe6cb30d6073648e9044fa4358e7e4479ad1c414dfc1693f",
"blockNumber": 8900060,
"result": {
"gasUsed": "0xaafe",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001"
},
"subtraces": 2,
"traceAddress": [],
"transactionHash": "0xa5f5c189a0543af91253efb02489ed3086f343f239b28e51ade4cf58108185ed",
"transactionPosition": 147,
"type": "call"
}
]
}

Actual behaviour

Call RPC method trace_filter

{
"jsonrpc": "2.0",
"id": 445,
"method": "trace_filter",
"params": [{"fromBlock":"0x87cddc","toAddress":["0x1643e812ae58766192cf7d2cf9567df2c37e9b7f"],"toBlock":"0x87cddc"}]
}

Get error:

{ code: ServerError(-32000), message: "method handler crashed", data: None }

Logs:
RPC method trace_filter crashed: runtime error: invalid memory address or nil pointer dereference
[service.go:217 panic.go:884 panic.go:260 signal_unix.go:837 stream.go:184 trace_filtering.go:384 value.go:586 value.go:370 service.go:222 handler.go:494 handler.go:444 handler.go:392 handler.go:223 handler.go:316 asm_amd64.s:1598]

Steps to reproduce the behaviour

Call RPC method trace_filter

{
"jsonrpc": "2.0",
"id": 445,
"method": "trace_filter",
"params": [{"fromBlock":"0x87cddc","toAddress":["0x1643e812ae58766192cf7d2cf9567df2c37e9b7f"],"toBlock":"0x87cddc"}]
}

Backtrace

RPC method trace_filter crashed: runtime error: invalid memory address or nil pointer dereference
[service.go:217 panic.go:884 panic.go:260 signal_unix.go:837 stream.go:184 trace_filtering.go:384 value.go:586 value.go:370 service.go:222 handler.go:494 handler.go:444 handler.go:392 handler.go:223 handler.go:316 asm_amd64.s:1598]

P.S. On 2.42.0 everything is fine.

@laibe
Copy link

laibe commented Apr 28, 2023

see also #7380.

@ineron
Copy link

ineron commented May 1, 2023

erigon version 2.44.0-dev-419cab55
I have the same error: mainnet

erigon
--datadir=/var/data/chains/erigon_eth/
--http.addr=0.0.0.0
--http.port=8545
--ws
--http.vhosts=*
--torrent.maxpeers=300
--torrent.conns.perfile=50
--torrent.download.rate=50mb
--authrpc.jwtsecret=/var/data/chains/lighthouse/jwt.hex
--authrpc.addr=0.0.0.0
--authrpc.port 8553
--http
--http.api eth,erigon,web3,net,debug,trace,txpool
--txpool.globalslots=20496
--bodies.cache=21474836480
--rpc.returndata.limit=900000

curl --data '{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBlock":"0x105ea90","toBlock":"0x105ea9A"}],"id":0}' -H "Content-Type: application/json" -X POST http://localhost:8545
return:
{"jsonrpc":"2.0","id":0,"error":{"code":-32000,"message":"method handler crashed"}}

log:
RPC method trace_filter crashed: runtime error: invalid memory address or nil pointer dereference
May 1 11:29:25 uni-node-01 erigon_eth[2050432]: [service.go:217 panic.go:884 panic.go:260 signal_unix.go:837 stream.go:184 trace_filtering.go:384 value.go:586 value.go:370 service.go:222 handler.go:494 handler.go:444 handler.go:392 handler.go:223 handler.go:316 asm_amd64.s:1598]

@darinvhs
Copy link

darinvhs commented May 2, 2023

seeing this error on the BSC chain as well, so it's not a protocol-specific issue

@ybstaked
Copy link

Also seeing this error while using erigon for graph

@ineron
Copy link

ineron commented May 11, 2023

Also seeing this error while using erigon for graph

Yes, it was because of the graph that the question arose.
I used 2.32 before and had no problems.

@quickchase
Copy link
Contributor

#7539

@github-actions
Copy link

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 github-actions bot added the Stale label Jun 29, 2023
@qk-santi
Copy link

Keeping this open

@github-actions github-actions bot removed the Stale label Jun 30, 2023
@github-actions
Copy link

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 github-actions bot added the Stale label Aug 12, 2023
@qk-santi
Copy link

Keeping this open

@github-actions github-actions bot removed the Stale label Aug 19, 2023
@gladcow
Copy link
Contributor

gladcow commented Sep 7, 2023

For issue status: I'm investigating the issue

@gladcow
Copy link
Contributor

gladcow commented Sep 13, 2023

Looks like issue is fixed with #7539

I have used last devel branch to test it, have started goerli lighthouse and erigon nodes with the same params, last version returns correct answer:

$ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc": "2.0","id": 445,"method": "trace_filter","params": [{"fromBlock":"0x87cddc","toAddress":["0x1643e812ae58766192cf7d2cf9567df2c37e9b7f"],"toBlock":"0x87cddc"}]}' localhost:8545
{"jsonrpc":"2.0","id":445,"result":[{"action":{"from":"0xafb4bce970b77222a74d240294bd67216114b8eb","callType":"call","gas":"0xd291","input":"0x095ea7b3000000000000000000000000779d1b5315df083e3f9e94cb495983500ba8e90700000000000000000000000000000000000000000000000006f05b59d3b1ffff","to":"0x1643e812ae58766192cf7d2cf9567df2c37e9b7f","value":"0x0"},"blockHash":"0xfe12089ecb9c2660fe6cb30d6073648e9044fa4358e7e4479ad1c414dfc1693f","blockNumber":8900060,"result":{"gasUsed":"0xaafe","output":"0x0000000000000000000000000000000000000000000000000000000000000001"},"subtraces":2,"traceAddress":[],"transactionHash":"0x2a577f35e8b6e61914485ce793ca19c50af5ca7d0e918d3d68d95b6abd49b613","transactionPosition":72,"type":"call"},{"action":{"from":"0x312ae3c2364231efa3f99b29d73e141b1110a92b","callType":"call","gas":"0xd29d","input":"0x095ea7b3000000000000000000000000779d1b5315df083e3f9e94cb495983500ba8e9070000000000000000000000000000000000000000000000000011c37937e07fff","to":"0x1643e812ae58766192cf7d2cf9567df2c37e9b7f","value":"0x0"},"blockHash":"0xfe12089ecb9c2660fe6cb30d6073648e9044fa4358e7e4479ad1c414dfc1693f","blockNumber":8900060,"result":{"gasUsed":"0xaafe","output":"0x0000000000000000000000000000000000000000000000000000000000000001"},"subtraces":2,"traceAddress":[],"transactionHash":"0xa5f5c189a0543af91253efb02489ed3086f343f239b28e51ade4cf58108185ed","transactionPosition":147,"type":"call"}]}

Erigon version is

$ ./erigon --version
erigon version 2.50.0-dev-33d8c08c

@qk-santi , @ineron , @vkuzenkov , can you confirm issue is fixed in last version?

@yperbasis
Copy link
Member

Please re-open if the issue still happens with v2.59.2 or later.

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

9 participants