-
Notifications
You must be signed in to change notification settings - Fork 581
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
EthersDB deadlock #1056
Comments
I think I encountered another scenario triggering the deadlock outside single-threaded executor. I haven't found the root cause yet. Will update here. Currently my guess is that if this bug exists in single-threaded executor, it should also happen in multi-threaded but just at a smaller chance. |
I added a min repro: |
I just started to try out revm and found that the generate_block_traces.rs example gets stuck while executing the transactions. From what I've found (as a Rust newbie):
Am I correct, that this is another case of this issue? |
can you test if #1089 fixes it? |
No, using this branch it panics with following error:
stack backtrace:
|
Should just make functions async, this would fix it. |
Some updates: If I change the main function in https://github.com/publicqi/revm_hang to synchronous So the hang happens when async I'm not familiar with async internals. A temp fix in my code is to not to call ethersdb's synchronous functions inside an async function. |
#1135 shall fix this by removing Quote:
|
repro: https://github.com/publicqi/revm_hang
If a EthersDB is constructed in an async test function (or single-threaded executor) with no block number specified, the program will hang.
#[tokio::test]
uses a single-threaded runtime. revm submits theget_block_number
usingfutures::executor::block_on
, but this task will never execute since the runtime is always polling the previous task (test_hang
, in this case).Some refs when digging into the bug:
tokio-rs/tokio#2603
tokio-rs/tokio#2376
The text was updated successfully, but these errors were encountered: