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

Closing Quic session is inconsistent #1019

Open
oteffahi opened this issue May 13, 2024 · 0 comments
Open

Closing Quic session is inconsistent #1019

oteffahi opened this issue May 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@oteffahi
Copy link
Contributor

oteffahi commented May 13, 2024

Describe the bug

When closing a Zenoh session, it is expected that the socket is available after the session.close() call returns. This should be observed independently of which Link protocol is used by the session. This is not the case sometimes when using Quic.

Testing locally has shown this to be true on TCP, UDP and TLS. However, sequentially closing and opening a router/peer Quic session leads to panic due to the socket being unavailable. This only occurs when the session in question has been used (i.e. a client or peer has established a connection on that socket), this case is therefore not covered by this test which only opens one router session and alternates open/close of client sessions that connect to it.

To reproduce

#[tokio::main]
async fn main() {

  {...Initializations and config...}

  println!("Opening Router Session...");
  let router = zenoh::open(router_config.clone())
      .res_async()
      .await
      .unwrap();
  println!("Opening Client Session...");
  let client = zenoh::open(client_config.clone())
      .res_async()
      .await
      .unwrap();
  println!("Closing Client Session...");
  client.close().res_async().await.unwrap();
  println!("Closing Router Session...");
  router.close().res_async().await.unwrap();

  println!("Reopening Router Session...");
  // This will panic most of the time if the Transport is using Quic unicast Link
  // It does not panic when using TLS, TCP or UDP links (tested locally)
  let s2 = zenoh::open(router_config.clone())
      .res_async()
      .await
      .unwrap();
}

System info

MacBook Air, Mac OS, Apple Silicon M2
Zenoh 0.11.0-dev

@oteffahi oteffahi added the bug Something isn't working label May 13, 2024
@oteffahi oteffahi changed the title Quic session closing is inconsistent Closing Quic session is inconsistent May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant