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

anvil-zksync is able to start even if the port is busy #512

Closed
popzxc opened this issue Jan 7, 2025 · 0 comments · Fixed by #542
Closed

anvil-zksync is able to start even if the port is busy #512

popzxc opened this issue Jan 7, 2025 · 0 comments · Fixed by #542
Labels
bug 🐛 Something isn't working good first issue 🐣 Good for newcomers (based on difficulty)

Comments

@popzxc
Copy link
Member

popzxc commented Jan 7, 2025

If you start two instances of anvil-zksync without specifying the port (e.g. in two terminals), the second instance would be able to start. However, in logs it outputs:

thread '09:40:57  INFO (3) 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6
<unnamed>' panicked at 09:40:57  INFO (4) 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a
src/main.rs:10109:40:57  INFO (5) 0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba
:48:
called `Result::unwrap()` on an `Err` value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }09

...after which it appears running.

Probably, the panic isn't handled correctly during the API server spin up process.

@popzxc popzxc added the bug 🐛 Something isn't working label Jan 7, 2025
@dutterbutter dutterbutter added the good first issue 🐣 Good for newcomers (based on difficulty) label Jan 15, 2025
mm-zk added a commit that referenced this issue Jan 17, 2025
* refactor: reduce usage of `ForkStorage` outside `inner` module (#539)

* reduce usage of `ForkStorage` outside `inner` module

* adapt for zkos

* fix destination path (#541)

* fix: anvil-zksync able to start even if the port is busy (#542)

* fix: closes #512 - start instance even if port is busy

* chore: apply make lint:fix

* chore: refactor test to make use of anvil-zksync instance

* chore: remove no longer needed deps

* chore: remove no longer needed deps

* chore: bump actions/upload-artifact: v3 to v4 due to CI fail

* chore: bump actions/upload-artifact / download: v3 to v4 due to CI fail

* compilation fixes

---------

Co-authored-by: Daniyar Itegulov <ditegulov@gmail.com>
Co-authored-by: Nisheeth Barthwal <nbaztec@gmail.com>
Co-authored-by: Dustin Brickwood <dustinbrickwood204@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working good first issue 🐣 Good for newcomers (based on difficulty)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants