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

[Bug] [All platforms] Unicast lease (possibly others?) does not kill session on timeout #369

Open
meganukebmp opened this issue Mar 9, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@meganukebmp
Copy link

Describe the bug

Whenever the keepalive lease times out (for example, zenohd shut down), the session never actually gets closed. Doing z_check(session) keeps returning true as well. The session remains active so for example a publisher will keep publishing to nothing.

To reproduce

  1. Open a session to zenohd
  2. Check if the session is up
  3. Close session
  4. z_check(session) returns true after timeout.

System info

Zenohd 0.10.1
zenoh-pico 0.10.1
esp32-eth01, esp32-lolin

@meganukebmp meganukebmp added the bug Something isn't working label Mar 9, 2024
@meganukebmp
Copy link
Author

Dissecting this issue further. Log states session will close:
https://github.com/eclipse-zenoh/zenoh-pico/blob/main/src/transport/unicast/lease.c#L56

Then disables the lease loop. It then calls this:
https://github.com/eclipse-zenoh/zenoh-pico/blob/main/src/transport/unicast/transport.c#L281

That then simply creates a close message and transmits it to the router (if it exists, generic session close command)
https://github.com/eclipse-zenoh/zenoh-pico/blob/main/src/transport/unicast/transport.c#L272
But at no point does it actually close the session on its own.

@meganukebmp meganukebmp changed the title [Bug] [ESP-IDF] Unicast lease (possibly others?) does not kill session on timeout [Bug] [All platforms] Unicast lease (possibly others?) does not kill session on timeout Mar 19, 2024
@meganukebmp
Copy link
Author

Confirmed, this issue is present on all platforms.

Easy test on linux machine:

  1. Run zenohd -l tcp/192.168.1.100:7447 -l udp/192.168.1.100:7447
  2. Build the examples of zenoh-pico
  3. Run `z_pub -n 999 -m client -e tcp/192.168.1.100:7447
  4. Wait for session to connect and begin publishing messages
  5. Kill the zenohd router
  6. z_pub keeps publishing data to nothing forever

@jean-roland
Copy link
Contributor

Related to #333

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

2 participants