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

ss_send() may attempt to entail data SKBs to inactive or closed socket #118

Closed
keshonok opened this issue Jun 18, 2015 · 3 comments
Closed
Assignees
Milestone

Comments

@keshonok
Copy link
Contributor

When a request comes, Tempesta chooses a backend server to forward that request to. By the time Tempesta actually starts putting request's SKBs to the socket connected to the backend server (destination socket), that socket may have been closed or be in the process of closing. ss_send() would then attempt to entail SKBs to a socket that is closed or is being closed.

There's no easy solution.

Also, #114 is related to this issue.

@keshonok keshonok changed the title ss_send() may attempt to entail data SKBs to a inactive or closed socket ss_send() may attempt to entail data SKBs to inactive or closed socket Jun 18, 2015
@krizhanovsky
Copy link
Contributor

Backend socket transmission is done after the request scheduling, i.e. the scheduler 'decides' the socket as alive and backend as normally operational, while it's not actually. This is unexpected condition, so Tempesta must return 500 error to client.

@krizhanovsky krizhanovsky added this to the 0.5.0 SSL, Stable milestone Jun 19, 2015
@krizhanovsky
Copy link
Contributor

This is quite similar to #114. So consider this tasks as a task for race condition when the server is chosen when it was alive, but it dies which a request is scheduled to the connection of the server. This case is rare, so moved to next release.

keshonok added a commit that referenced this issue Sep 14, 2015
Split them into more specific and fine-tuned functions that can be
called individually.
keshonok added a commit that referenced this issue Sep 15, 2015
@keshonok keshonok self-assigned this Sep 15, 2015
@keshonok
Copy link
Contributor Author

Fixed with a set of patches in #237.

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

No branches or pull requests

2 participants