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

Keep getting segfaults on anvil #5754

Closed
1 of 2 tasks
mike-code opened this issue Aug 30, 2023 · 2 comments · Fixed by #5759
Closed
1 of 2 tasks

Keep getting segfaults on anvil #5754

mike-code opened this issue Aug 30, 2023 · 2 comments · Fixed by #5759
Labels
T-bug Type: bug

Comments

@mike-code
Copy link

mike-code commented Aug 30, 2023

Component

Anvil

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

anvil 0.2.0 (c976619 2023-08-30T16:41:30.798064692Z)

What command(s) is the bug in?

anvil --chain-id 1337

Operating System

Linux amd64

Describe the bug

I'm trying to deploy a contract using hardhat (HardhatRuntimeEnvironment.deployments.deploy()), but every time I try to run the deployment, anvil segfaults. Those contracts work just fine on mainnet/goerli/sepolia.

platform: linux amd64
I've tried nightly (0.2.0) as well as nightly from August, 1 (0.1.0), but I keep getting the same error.
I've tried both pre-built assets as well as compiling anvil myself.

Listening on 127.0.0.1:8545
eth_chainId
eth_chainId
eth_accounts
eth_accounts
eth_chainId
eth_chainId
eth_blockNumber
eth_chainId
eth_chainId
eth_estimateGas
eth_chainId
eth_getTransactionCount
eth_blockNumber
eth_chainId
eth_getBlockByNumber
eth_feeHistory
eth_sendTransaction
thread 'tokio-runtime-worker' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/memory-db-0.29.0/src/malloc_size_of.rs:68:9:
attempt to add with overflow
stack backtrace:
   0:     0x55e8d179419c - <unknown>
   1:     0x55e8d17bfddc - <unknown>
   2:     0x55e8d179035e - <unknown>
   3:     0x55e8d1793f84 - <unknown>
   4:     0x55e8d179550a - <unknown>
   5:     0x55e8d17951f7 - <unknown>
   6:     0x55e8d1795b0b - <unknown>
   7:     0x55e8d17959c1 - <unknown>
   8:     0x55e8d17946c6 - <unknown>
   9:     0x55e8d1795752 - <unknown>
  10:     0x55e8d0a27c93 - <unknown>
  11:     0x55e8d0a27d23 - <unknown>
  12:     0x55e8d0bd5856 - <unknown>
  13:     0x55e8d0bd5064 - <unknown>
  14:     0x55e8d0bbce50 - <unknown>
  15:     0x55e8d0bd121e - <unknown>
  16:     0x55e8d0bd5c53 - <unknown>
  17:     0x55e8d0bbc577 - <unknown>
  18:     0x55e8d0bc1be5 - <unknown>
  19:     0x55e8d0b66191 - <unknown>
zsh: IOT instruction (core dumped)  anvil --chain-id 1337
@mike-code mike-code added the T-bug Type: bug label Aug 30, 2023
@Evalir
Copy link
Member

Evalir commented Aug 30, 2023

I see—is it possible to get a small repro so we can look into this?

@mike-code
Copy link
Author

Sure thing. I've reduced my project's code to the bare minimum and published it in in a public repository.

I'm sure you're familiar with Hardhat and Node in general, but just for clarity's sake, to run the PoC, it goes as follows

$ yarn
$ yarn run start-node
$ yarn run deploy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants