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

Return errors from Connection methods to the Client #4734

Closed
Tracked by #3263
teor2345 opened this issue Jul 4, 2022 · 1 comment
Closed
Tracked by #3263

Return errors from Connection methods to the Client #4734

teor2345 opened this issue Jul 4, 2022 · 1 comment
Labels
A-network Area: Network protocol updates or fixes C-security Category: Security issues I-panic Zebra panics with an internal error message

Comments

@teor2345
Copy link
Contributor

teor2345 commented Jul 4, 2022

Motivation

We're seeing "failed servers must set their error slot" panics when Zebra is overloaded.

This panic is caused by the design of the Client connection code. Currently, the Client tasks share an ErrorSlot mutex, which must be updated before they exit.

This ticket stops using the error slot in the Connection task.

Designs

Instead of using the error slot, Client tasks should exit and return an error to the client instance.
The Client should exit when any task errors or stops.

We could try something like this:
(click for details)

Replace Connection.error_slot with returning a PeerError:

  • when there is an unrecoverable error, return an error from the current Connection method
  • propagate those errors up to Connection::run
  • break from the run loop, call shutdown, then return the error
  • check the error via the JoinHandle in the Client

Related Work

This is part of:

@teor2345 teor2345 added S-needs-triage Status: A bug report needs triage P-Medium ⚡ C-security Category: Security issues I-panic Zebra panics with an internal error message A-network Area: Network protocol updates or fixes labels Jul 4, 2022
@ftm1000 ftm1000 removed the S-needs-triage Status: A bug report needs triage label Jul 26, 2022
@teor2345
Copy link
Contributor Author

We're lowering the priority of network issues at the moment.

@teor2345 teor2345 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2022
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-panic Zebra panics with an internal error message
Projects
None yet
Development

No branches or pull requests

2 participants