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

Rerun ends up with an orphaned window when it fails to bind to a tcp port #1644

Closed
jleibs opened this issue Mar 21, 2023 · 0 comments · Fixed by #1650
Closed

Rerun ends up with an orphaned window when it fails to bind to a tcp port #1644

jleibs opened this issue Mar 21, 2023 · 0 comments · Fixed by #1650
Assignees
Labels
🪳 bug Something isn't working 🦟 regression A thing that used to work in an earlier release

Comments

@jleibs
Copy link
Member

jleibs commented Mar 21, 2023

To repo, run a script that includes rr.init(..., spawn=True) twice.

Previous behavior:

Console would show:

[2023-03-21T13:34:49Z WARN  rerun::run] Failed to bind TCP address "0.0.0.0:9876" for our WS server.. Another Rerun instance is probably running.

And no window would be launched.

Current behavior:

We get a stack trace but the window still comes up.

thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to bind TCP address "0.0.0.0:9876"

Caused by:
    Address already in use (os error 98)', re_sdk_comms/src/server.rs:42

   6: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
   7: core::result::unwrap_failed
             at core/src/result.rs:1791:5
   8: core::result::Result<T,E>::unwrap
             at core/src/result.rs:1113:23
      re_sdk_comms::server::listen_for_new_clients::{{closure}}
             at re_sdk_comms/src/server.rs:39:20
   9: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at tokio-1.24.1/src/runtime/task/core.rs:223:17
      tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at tokio-1.24.1/src/loom/std/unsafe_cell.rs:14:9
      tokio::runtime::task::core::Core<T,S>::poll
             at tokio-1.24.1/src/runtime/task/core.rs:212:13
  10: tokio::runtime::task::harness::poll_future::{{closure}}

Appears to be a regression related to: 7c36951

@jleibs jleibs added 🪳 bug Something isn't working 🦟 regression A thing that used to work in an earlier release labels Mar 21, 2023
@Wumpf Wumpf self-assigned this Mar 21, 2023
jleibs pushed a commit that referenced this issue Mar 21, 2023
* Fix crash when trying to listen on a taken TCP port
Fixes  #1644

* Don't spawn a viewer before binding tcp listener to ensure we don't spawn a viewer when we can't connect

* fix doc test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🦟 regression A thing that used to work in an earlier release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants