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

ConnectionManager finally block cleans connections sequentially and can lead to delays on timeout ennforcement #3573

Closed
bolt12 opened this issue Jan 13, 2022 · 0 comments · Fixed by #3532
Assignees
Labels
connection-manager Issues / PRs related to connection-manager io-sim-discovered Issue discovered by IOSim

Comments

@bolt12
Copy link
Contributor

bolt12 commented Jan 13, 2022

ConnectionManager cleans connections and cancels their connection handler thread in a sequential fashion. The logic to do so is blocking and requires locks on the connection's connVar. This can incur in delays while performing each cleanup sequentially making us fail timeout deadlines.

To mitigate this one should perform each cleanup on a different thread and wait for all cleanups to be done, since no locks are shared, in order to minimize the wait time on cleanup.

@bolt12 bolt12 added networking io-sim-discovered Issue discovered by IOSim labels Jan 13, 2022
@bolt12 bolt12 linked a pull request Jan 13, 2022 that will close this issue
@bolt12 bolt12 added the connection-manager Issues / PRs related to connection-manager label Jan 13, 2022
@bolt12 bolt12 self-assigned this Jan 13, 2022
@coot coot moved this to In Progress in Ouroboros Network Feb 2, 2022
@iohk-bors iohk-bors bot closed this as completed in #3532 Feb 3, 2022
Repository owner moved this from In Progress to Done in Ouroboros Network Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connection-manager Issues / PRs related to connection-manager io-sim-discovered Issue discovered by IOSim
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant