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

It's possible to wedge "snabb config listen" #668

Closed
wingo opened this Issue Dec 9, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@wingo

wingo commented Dec 9, 2016

"Snabb config listen" will attempt to pipeline requests to the leader. However it's possible to end up in a situation where "snabb config listen" deadlocks with the leader. Consider, the listener has many requests to the leader, and is just encoding them and writing them out. The leader will handle them one by one. So the leader polls and sees it has a request, cool, it goes into a state where it reads that request off in a non-blocking way; when it has the request, it runs it, then mkes a response, goes into a state of writing that response back, and when the response is gone, it goes back to listening for another request. Well what happens if the response is bigger than the request? In that case probably the leader could end up stuck in the writing state (which does not block the process but does block the handling of that client), whereas the "snabb config listen" might be in a writing state waiting for the leader to drain the write side!

Disabling pipelining is obviously a possibility, but it's not so nice. Not sure what to do here, or whose fault this is.

@wingo

This comment has been minimized.

wingo commented May 7, 2018

This is fixed!!!! Yaaay. Due to #1060.

@wingo wingo closed this May 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment