-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Windows error 10022 kills threads #375
Comments
Looks like this error code is sometimes exposed as
So it seems like maybe it should be covered already. At least in some envs. But somebody needs to check a reproducer under a relevant env. One way to do this is to connect to a GHA worker using https://github.com/marketplace/actions/debugging-with-tmate. |
This patch aims to prevent a situation when the working threads are killed by arbitrary exceptions that bubble up to their entry point layers that aren't handled properly or at all. This was causing DoS in many situations, including TLS errors and attempts to close the underlying sockets erroring out. Fixes cherrypy#358 Ref cherrypy#375 Resolves cherrypy#365
This patch aims to prevent a situation when the working threads are killed by arbitrary exceptions that bubble up to their entry point layers that aren't handled properly or at all. This was causing DoS in many situations, including TLS errors and attempts to close the underlying sockets erroring out. Fixes cherrypy#358 Ref cherrypy#375 Resolves cherrypy#365
This patch aims to prevent a situation when the working threads are killed by arbitrary exceptions that bubble up to their entry point layers that aren't handled properly or at all. This was causing DoS in many situations, including TLS errors and attempts to close the underlying sockets erroring out. Fixes cherrypy#358 Ref cherrypy#375 Resolves cherrypy#365
This patch aims to prevent a situation when the working threads are killed by arbitrary exceptions that bubble up to their entry point layers that aren't handled properly or at all. This was causing DoS in many situations, including TLS errors and attempts to close the underlying sockets erroring out. Fixes cherrypy#358 Ref cherrypy#375 Resolves cherrypy#365
This patch aims to prevent a situation when the working threads are killed by arbitrary exceptions that bubble up to their entry point layers that aren't handled properly or at all. This was causing DoS in many situations, including TLS errors and attempts to close the underlying sockets erroring out. Fixes cherrypy#358 Ref cherrypy#375 Resolves cherrypy#365
This patch aims to prevent a situation when the working threads are killed by arbitrary exceptions that bubble up to their entry point layers that aren't handled properly or at all. This was causing DoS in many situations, including TLS errors and attempts to close the underlying sockets erroring out. Fixes cherrypy#358 Ref cherrypy#375 Resolves cherrypy#365
This patch aims to prevent a situation when the working threads are killed by arbitrary exceptions that bubble up to their entry point layers that aren't handled properly or at all. This was causing DoS in many situations, including TLS errors and attempts to close the underlying sockets erroring out. Fixes cherrypy#358 Ref cherrypy#375 Resolves cherrypy#365
This patch aims to prevent a situation when the working threads are killed by arbitrary exceptions that bubble up to their entry point layers that aren't handled properly or at all. This was causing DoS in many situations, including TLS errors and attempts to close the underlying sockets erroring out. Fixes cherrypy#358 Ref cherrypy#375 Resolves cherrypy#365
A DoS would happen in many situations, including TLS errors and attempts to close the underlying sockets erroring out. This patch aims to prevent a situation when the worker threads are killed by arbitrary exceptions that bubble up to their entry point layers that aren't handled properly or at all. PR #649 Fixes #358 Fixes #354 Ref #310 Ref #346 Ref #375 Ref #599 Ref #641 Resolves #365
Hi, |
Same. It is difficult to reproduce but fatal |
@liquidaty I thought #649 made it better. No? |
I did too, but under certain conditions it appears that threads are still either dying or becoming unresponsive. Might be related to line 1291 of cheroot/server.py:
don't suppose there is an easy way to spit out, at regular intervals, the number of active and healthy threads? |
*** UPDATED ***
@webknjaz here's an example of an actual error log:
Maybe this would fix, in errors.py:
and in server.py:
|
Thanks for the traceback! I'm not sure yet. However, I seem to recall having some unfinished improvement attempts in this area somewhere on my laptop. I'll try to remember and see if those might be related. |
β I'm submitting a ...
π Describe the bug. What is the current behavior?
Sometimes when closing a connection, we get an error, probably because it's already closed or similar. This is addressed in 384e6d0 , the problem is that in windows the error might instead be WSAEINVAL (10022), and that is not caught.
β What is the motivation / use case for changing the behavior?
Because of this, in combination with, I think, the error seen in #358 , we are eventually running out of threads, and the server stops responding completely.
π‘ To Reproduce
Don't know how to reproduce, we get this error sporadically in production. All threads are typically gone in a few days or sometimes weeks.
π‘ Expected behavior
I expect this error to be ignored, so that the thread keeps on running.
π Details
Also tried switching to pyopenssl, but the same error happened there too.
π Environment
π Additional context
A typical error:
Then similar exceptions for thread after thread, until none are left.
In the references added in 9f9de65 there are several examples of dealing with error 10022 also, for example python/cpython@83a2c28 .
The text was updated successfully, but these errors were encountered: