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

bug (anvil): thread 'fork-backend-thread' panicked at 'A Tokio 1.x context was found, but timers are disabled. #1763

Closed
2 tasks done
mds1 opened this issue May 29, 2022 · 4 comments
Labels
C-anvil Command: anvil T-bug Type: bug

Comments

@mds1
Copy link
Collaborator

mds1 commented May 29, 2022

Component

Anvil

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

anvil 0.1.0 (76b00d0 2022-05-28T00:08:43.25713Z)

What command(s) is the bug in?

anvil --fork-url $OPTIMISM_RPC_URL

Operating System

macOS (Intel)

Describe the bug

I'll start anvil against an Optimism RPC URL (which may not be relevant to the bug, but it's how I'm currently using anvil to access contracts deployed on that network). Often, after running a deploy script against it a handful of times, anvil crashes with the below error. The preceding RPC methods vary and are not always the same as the sequence shown below.

eth_getTransactionCount
eth_getCode
thread 'fork-backend-thread' panicked at 'A Tokio 1.x context was found, but timers are disabled. Call `enable_time` on the runtime builder to enable timers.', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.18.0/src/time/driver/handle.rs:58:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[1]    90513 abort      anvil --fork-url $OPTIMISM_RPC_URL
@mds1 mds1 added the T-bug Type: bug label May 29, 2022
@mattsse
Copy link
Member

mattsse commented May 29, 2022

potentially fixed one commit later #1750

should be in latest nightly

@mds1
Copy link
Collaborator Author

mds1 commented May 29, 2022

Ah so I actually ran foundryup -b master about an hour ago and am using commit 562d876. It seems anvil --version doesn't take that into account

@onbjerg onbjerg added the C-anvil Command: anvil label May 30, 2022
@mattsse
Copy link
Member

mattsse commented May 31, 2022

that's odd, because these constants are generated during build.

is this still an issue on nightly?

@mds1
Copy link
Collaborator Author

mds1 commented May 31, 2022

Updated again this morning, and so far this hasn't happened when using anvil to test some scripts over the last hour, so this appears to be resolved. Going to close for now and will re-open if it occurs again

@mds1 mds1 closed this as completed May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil T-bug Type: bug
Projects
No open projects
Archived in project
Development

No branches or pull requests

3 participants