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

πŸ› Handle stray exceptions in worker threads #649

Merged

Commits on Mar 27, 2024

  1. πŸ› Handle stray exceptions in worker threads

    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
    webknjaz committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    7b34907 View commit details
    Browse the repository at this point in the history
  2. πŸ§ͺ Test unexpected exception @ HTTP resp fallback

    This simulates a situation when the server attempts sending at least
    something useful to a connection with broken HTTP.
    webknjaz committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    e50b858 View commit details
    Browse the repository at this point in the history
  3. πŸ§ͺ Test shutdown w/ keyboard interrupt @ handler

    This documents the expected keyboard interrupt server shutdown
    handling sequence.
    webknjaz committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    ca6b081 View commit details
    Browse the repository at this point in the history
  4. πŸ§ͺ Test exceptions raised from HTTP handlers

    This is to ensure that such exceptions don't leak into the internal
    worker thread logic.
    webknjaz committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    0ba2b69 View commit details
    Browse the repository at this point in the history
  5. πŸ§ͺ Test unhandled internal exceptions in workers

    This is to ensure that such exceptions don't crash the worker threads
    starving the server of the processing resources.
    webknjaz committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    abc42c5 View commit details
    Browse the repository at this point in the history
  6. πŸ§ͺ Allow many noqa comments in test_conn

    This is necessary since tests are more prone to linting exceptions.
    webknjaz committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    a7665f3 View commit details
    Browse the repository at this point in the history