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

Run async tasks that access AddressBook threaded mutexes on dedicated threads #3240

Closed
Tracked by #2310
teor2345 opened this issue Dec 15, 2021 · 2 comments · Fixed by #3244
Closed
Tracked by #2310

Run async tasks that access AddressBook threaded mutexes on dedicated threads #3240

teor2345 opened this issue Dec 15, 2021 · 2 comments · Fixed by #3244
Assignees
Labels
A-network Area: Network protocol updates or fixes C-security Category: Security issues I-hang A Zebra component stops responding to requests I-slow Problems with performance or responsiveness

Comments

@teor2345
Copy link
Contributor

Motivation

zebra-network keeps on having hard-to-diagnose hangs. These hangs could be happening because the AddressBook uses a threaded mutex, which blocks the executor, and all async tasks scheduled on the same thread.

Designs

  • launch tasks that access the AddressBook mutex using spawn_blocking, so they get their own dedicated thread
    • if needed, make the method async, or make it return a Future
    • if that's not possible, use block_in_place (this blocks tasks on the same thread, but not the whole executor)

Related Work

@teor2345 teor2345 added S-needs-triage Status: A bug report needs triage P-Medium C-security Category: Security issues I-hang A Zebra component stops responding to requests I-slow Problems with performance or responsiveness A-network Area: Network protocol updates or fixes labels Dec 15, 2021
@mpguerra mpguerra linked a pull request Dec 16, 2021 that will close this issue
3 tasks
@mpguerra
Copy link
Contributor

@teor2345
Copy link
Contributor Author

FYI this is implemented in PR #3244.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-network Area: Network protocol updates or fixes C-security Category: Security issues I-hang A Zebra component stops responding to requests I-slow Problems with performance or responsiveness
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants