Skip to content

Close the links after closing the Face #1979

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Hugal31
Copy link
Contributor

@Hugal31 Hugal31 commented Jun 5, 2025

This is another attempt to minimize the occurrence of the race condition described in #1886.

When loosing the connection to a peer, if the send buffer happens to fill up before the keep alive timeout, the tx_task can be stuck in the send_batch operation. On my computer, it can be stuck for 15 minutes before returning with EHOSTUNREACH ("No route to host").

Now this is not that bat itself, it's just a dangling task, a TransportLinkUnicastUniversal and a TransportUnicastUniversal. But this make the race condition mentioned in #1886 very likely: if the peer reconnect within those 15 minutes, the re-connection is bogus.

This "fix" make TransportUnicastUniversal::delete() notify the RuntimeSession of the transport deletion before closing the link, instead of after closing the link. It doesn't seem to cause any issue. I didn't do the same in TransportUnicastLowlatency because I am not sure it is necessary.

I am not really happy with this hack, because I don't fully understand the consequences of the fix and it just make the race-condition a lot less likely (15min time span vs a few milliseconds). Have a look at #1886 for more information.

This is an attempt to minimize the occurrence of the race condition described
in eclipse-zenoh#1886.
Copy link

github-actions bot commented Jun 5, 2025

PR missing one of the required labels: {'dependencies', 'breaking-change', 'enhancement', 'internal', 'bug', 'new feature', 'documentation'}

Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.89%. Comparing base (b33ddc3) to head (a120311).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1979      +/-   ##
==========================================
- Coverage   71.02%   70.89%   -0.14%     
==========================================
  Files         364      364              
  Lines       61519    61519              
==========================================
- Hits        43693    43612      -81     
- Misses      17826    17907      +81     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant