MatrixSynapse/tests
Sean Quah 772e8c2385
Fix stack overflow in `_PerHostRatelimiter` due to synchronous requests (#14812)
When there are many synchronous requests waiting on a
`_PerHostRatelimiter`, each request will be started recursively just
after the previous request has completed. Under the right conditions,
this leads to stack exhaustion.

A common way for requests to become synchronous is when the remote
client disconnects early, because the homeserver is overloaded and slow
to respond.

Avoid stack exhaustion under these conditions by deferring subsequent
requests until the next reactor tick.

Fixes #14480.

Signed-off-by: Sean Quah <seanq@matrix.org>
2023-01-13 00:16:21 +00:00
..
api
app
appservice
config Add missing type hints to tests.config. (#14681) 2022-12-16 08:53:28 -05:00
crypto Add missing type hints to tests. (#14687) 2022-12-28 08:29:35 -05:00
events
federation
handlers Support RFC7636 PKCE in the OAuth 2.0 flow. (#14750) 2023-01-04 14:58:08 -05:00
http
logging
metrics Add missing type hints to tests. (#14687) 2022-12-28 08:29:35 -05:00
module_api Add `set_displayname` to the module API (#14629) 2023-01-11 18:41:52 +00:00
push Factor out common code in tests and fix comments. (#14819) 2023-01-11 13:36:41 -05:00
replication
rest Implement MSC3925: changes to bundling of edits (#14811) 2023-01-10 16:31:28 +00:00
scripts
server_notices
state
storage Re-enable some linting (#14821) 2023-01-12 10:52:07 +00:00
test_utils
types
util Fix stack overflow in `_PerHostRatelimiter` due to synchronous requests (#14812) 2023-01-13 00:16:21 +00:00
__init__.py
server.py
test_distributor.py
test_event_auth.py
test_federation.py
test_mau.py
test_phone_home.py
test_rust.py
test_server.py
test_state.py
test_terms_auth.py
test_test_utils.py
test_types.py
test_visibility.py
unittest.py
utils.py