Closed s-0xa1fa closed 3 days ago
The following logs were associate with an a timeout of simulateV1 with this params payload:
[{"blockStateCalls":[{"blockOverrides":{},"calls":[{"from":"0xa45e4cbcc004f486bf8b52d42e2694574fb72735","to":"0xe592427a0aece92de3edee1f18e0157c05861564","maxFeePerGas":"0x2246f08fc6","maxPriorityFeePerGas":"0x77359400","value":"0x0","nonce":5320,"input":"0x414bf389000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000556c3cbdca77a7f21afe15b17e644e0e98e64df40000000000000000000000000000000000000000000000000000000000002710000000000000000000000000a45e4cbcc004f486bf8b52d42e2694574fb7273500000000000000000000000000000000000000000000000000000000673515cb0000000000000000000000000000000000000000000000000dde99aa4c6d2880000000000000000000000000000000000000000004f61c861a0b0880000000000000000000000000000000000000000000000000000000000000000000000000","type":2}]}],"traceTransfers":false,"validation":false,"returnFullTransactions":false},"0x14333b4"]
2024-11-28T05:52:32.374530Z DEBUG libmdbx: Transaction lock is already acquired, blocking... txn=118836711940272 backtrace= 0:
2024-11-28T05:52:32.374574Z WARN libmdbx: Long-lived read transaction has been timed out open_duration=300.00006151s
2024-11-28T05:52:32.374580Z DEBUG libmdbx: Transaction lock is already acquired, blocking... txn=118836711940272 backtrace= 0:
2024-11-28T05:52:32.532142Z WARN storage::db::mdbx: The database read transaction has been open for too long. Backtrace:
0:
Logs from a debug build:
0: reth_db::implementation::mdbx::tx::MetricsHandler
Current backtrace:
0: reth_db::implementation::mdbx::tx::MetricsHandler
I assume this is related to state root calc
@klkvr should we disable the stateroot processing here for now?
hmm, yeah we could skip calculating state root here, though I guess this is technically off-spec as the block hashes would end up incorrect
yeah, but unfortunately we can't efficiently handle this for rpc so I'd rather disable state root for now because this I assume most use cases don't need the stateroot
Ran these rpc requests against that branch, can confirm it fixes the problem.
Describe the bug
I'm running into an issue where I get persistent hangs / eventual timeouts when running eth_simulateV1. I believe the issue is if I cancel an previous rpc request, and then rerun the same rpc request. Presumably there might be an internal db lock that doesn't drop if the rpc request in improperly canceled? The issue persists past reth restarts.
An example rpc request params for simulateV1 that cause it: [{"blockStateCalls":[{"blockOverrides":{},"calls":[{"from":"0x539a08d1552128d5db42ab5576ae5e945a34ad3c","to":"0x7a250d5630b4cf539739df2c5dacb4c659f2488d","maxFeePerGas":"0xcc022e4fc","maxPriorityFeePerGas":"0x9502f900","value":"0x0","nonce":55,"input":"0x38ed173900000000000000000000000000000000000000000000000034226fe117a68ec700000000000000000000000000000000000000000163ecd43849cc5b4767103e00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000539a08d1552128d5db42ab5576ae5e945a34ad3c00000000000000000000000000000000000000000000000000000000674776cb0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000002e7f808990638e9e67e1f00313037ede2362361","type":2},{"from":"0x539a08d1552128d5db42ab5576ae5e945a34ad3c","to":"0x02e7f808990638e9e67e1f00313037ede2362361","maxFeePerGas":"0xcc022e4fc","maxPriorityFeePerGas":"0x9502f900","value":"0x0","nonce":56,"input":"0x095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","type":2}]}],"traceTransfers":false,"validation":false,"returnFullTransactions":false},"0x144b9de"]
Note above, where on the few requests this succeeds then subsequently hangs.
Steps to reproduce
Described above. I'm not 100% sure of the exact steps to reproduce but it seems to happen when I cancel the rpc client making a request, then subsequently rerun the rpc request.
I could not find any debug logs that were associated with these requests.
Node logs
Platform(s)
Linux (x86)
What version/commit are you on?
Commit SHA: d5f01036016263fbad6a3af9dc3707b2701adc1d Build Timestamp: 2024-11-04T17:33:06.250985070Z Build Features: jemalloc Build Profile: maxperf
What database version are you on?
2024-11-28T01:05:34.508854Z INFO Initialized tracing, debug log directory: /home/node/.cache/reth/logs/mainnet Current database version: 2 Local database version: 2
Which chain / network are you on?
mainnet
What type of node are you running?
Archive (default)
What prune config do you use, if any?
N/A
If you've built Reth from source, provide the full command you used
cargo build --profile maxperf
Code of Conduct