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

Panic in UPnP search #4171

Closed
deffrian opened this issue Apr 6, 2023 · 12 comments
Closed

Panic in UPnP search #4171

deffrian opened this issue Apr 6, 2023 · 12 comments
Labels
bug Something isn't working Networking

Comments

@deffrian
Copy link

deffrian commented Apr 6, 2023

Description

Lighthouse crashes during startup

Version

a53830f (current master)

Present Behaviour

lighthouse bn --network sepolia --execution-endpoint http://localhost:8551 --execution-jwt <path> --checkpoint-sync-url https://sepolia.checkpoint-sync.ethpandaops.io --disable-deposit-contract-sync

Apr 06 13:19:14.045 INFO Execution payloads are pruned           service: freezer_db
thread 'tokio-runtime-worker' panicked at 'invalid url or method: Error(InvalidBaseUrl)', /home/deffrian/.cargo/registry/src/github.com-1ecc6299db9ec823/attohttpc-0.10.1/src/request.rs:94:41
stack backtrace:
   0: rust_begin_unwind
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:64:14
   2: core::result::unwrap_failed
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/result.rs:1790:5
   3: attohttpc::request::RequestBuilder::new
   4: igd::search::search_gateway
   5: network::nat::construct_upnp_mappings
   6: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
   7: tokio::runtime::task::core::Core<T,S>::poll
   8: tokio::runtime::task::harness::Harness<T,S>::poll
   9: tokio::runtime::blocking::pool::Inner::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Apr 06 13:19:14.066 CRIT Task panic. This is a bug!              advice: Please check above for a backtrace and notify the developers, message: <none>, task_name: UPnP
Apr 06 13:19:14.066 INFO Internal shutdown received              reason: Panic (fatal error)
Apr 06 13:19:14.066 INFO Shutting down..                         reason: Failure("Panic (fatal error)")
Apr 06 13:19:14.067 INFO Saved DHT state                         service: network
Apr 06 13:19:14.067 INFO Network service shutdown                service: network
Apr 06 13:19:14.067 INFO HTTP server is disabled
Apr 06 13:19:14.068 INFO Saved beacon chain to disk              service: beacon
Panic (fatal error)

Expected Behaviour

No exception

@deffrian
Copy link
Author

deffrian commented Apr 6, 2023

also on 4d17fb3

@michaelsproul
Copy link
Member

Which OS? Any virtualisation or containerisation in play? Looks like a weird error from the OS being unable to do UPnP.

You can probably work around it with --disable-upnp

@deffrian
Copy link
Author

deffrian commented Apr 6, 2023

Thanks, works with --disable-upnp. Os: Ubuntu 22.04.2

@deffrian
Copy link
Author

deffrian commented Apr 6, 2023

No virtualization or containers

@michaelsproul
Copy link
Member

Our UPnP support is best-effort due to the vast number of routers and networking setups that are possible, but I think we could avoid panicking in this case (a clean failure would be better).

Which router do you have, if you don't mind me asking? You can also DM the answer on Discord, I'm @sproul#3907, you can cross-check my profile on the Lighthouse Discord.

@michaelsproul michaelsproul added bug Something isn't working Networking labels Apr 6, 2023
@michaelsproul
Copy link
Member

In terms of a fix, looks like maybe we'd have to go to the igd dep.

@deffrian
Copy link
Author

deffrian commented Apr 7, 2023

I don't know it was on public wi-fi. I will try to ask owner of router in few days

@michaelsproul michaelsproul changed the title 'tokio-runtime-worker' panicked at 'invalid url or method' Panic in UPnP search Apr 10, 2023
@ackintosh
Copy link
Member

ackintosh commented Apr 16, 2023

I had a look at the igd a bit, perhaps the PR below might improve this issue:

sbstp/rust-igd#55

@ackintosh
Copy link
Member

I have filed a PR to rust-igd. sbstp/rust-igd#56

@deffrian
Copy link
Author

Sorry, I can't reproduce it anymore. Just prints
INFO UPnP not available error: IO error: Resource temporarily unavailable (os error 11), service: UPnP
On commit 4d17fb3

bors bot pushed a commit that referenced this issue May 3, 2023
## Issue Addressed

#4171

## Proposed Changes

Through [this PR](sbstp/rust-igd#56) in rust-igd, `igd` v0.12.1 no longer panics if there is an issue while searching for a gateway. So updating igd makes lighthouse emit a helpful log instead of panicking.

## Additional Info

No CHANGELOG exists in rust-igd. 👀 Here is the commit history between v0.11.1 and v0.12.1. No breaking changes.

sbstp/rust-igd@v0.11.1...v0.12.1
bors bot pushed a commit that referenced this issue May 3, 2023
## Issue Addressed

#4171

## Proposed Changes

Through [this PR](sbstp/rust-igd#56) in rust-igd, `igd` v0.12.1 no longer panics if there is an issue while searching for a gateway. So updating igd makes lighthouse emit a helpful log instead of panicking.

## Additional Info

No CHANGELOG exists in rust-igd. 👀 Here is the commit history between v0.11.1 and v0.12.1. No breaking changes.

sbstp/rust-igd@v0.11.1...v0.12.1
@ackintosh
Copy link
Member

In current unstable branch, we have updated the dependency causing the panic. Now, if there's any issue while searching for a gateway, lighthouse will emit logs indicating what is wrong.

@divagant-martian
Copy link
Collaborator

Closed by #4257

ghost pushed a commit to oone-world/lighthouse that referenced this issue Jul 13, 2023
## Issue Addressed

sigp#4171

## Proposed Changes

Through [this PR](sbstp/rust-igd#56) in rust-igd, `igd` v0.12.1 no longer panics if there is an issue while searching for a gateway. So updating igd makes lighthouse emit a helpful log instead of panicking.

## Additional Info

No CHANGELOG exists in rust-igd. 👀 Here is the commit history between v0.11.1 and v0.12.1. No breaking changes.

sbstp/rust-igd@v0.11.1...v0.12.1
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this issue Jan 6, 2024
## Issue Addressed

sigp#4171

## Proposed Changes

Through [this PR](sbstp/rust-igd#56) in rust-igd, `igd` v0.12.1 no longer panics if there is an issue while searching for a gateway. So updating igd makes lighthouse emit a helpful log instead of panicking.

## Additional Info

No CHANGELOG exists in rust-igd. 👀 Here is the commit history between v0.11.1 and v0.12.1. No breaking changes.

sbstp/rust-igd@v0.11.1...v0.12.1
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this issue Jan 6, 2024
## Issue Addressed

sigp#4171

## Proposed Changes

Through [this PR](sbstp/rust-igd#56) in rust-igd, `igd` v0.12.1 no longer panics if there is an issue while searching for a gateway. So updating igd makes lighthouse emit a helpful log instead of panicking.

## Additional Info

No CHANGELOG exists in rust-igd. 👀 Here is the commit history between v0.11.1 and v0.12.1. No breaking changes.

sbstp/rust-igd@v0.11.1...v0.12.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Networking
Projects
None yet
Development

No branches or pull requests

4 participants