0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 18:33:51 +01:00
synapse/tests/util
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
..
caches Add missing type hints to test.util.caches (#14529) 2022-11-22 17:35:54 -05:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_async_helpers.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_batching_queue.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_check_dependencies.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_dict_cache.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_expiring_cache.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_file_consumer.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_itertools.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_linearizer.py Fix edge case where a Linearizer could get stuck (#12358) 2022-04-05 17:19:16 +01:00
test_logcontext.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_logformatter.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_lrucache.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_macaroons.py Support RFC7636 PKCE in the OAuth 2.0 flow. (#14750) 2023-01-04 14:58:08 -05:00
test_ratelimitutils.py Fix stack overflow in _PerHostRatelimiter due to synchronous requests (#14812) 2023-01-13 00:16:21 +00:00
test_retryutils.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_rwlock.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_stream_change_cache.py Check the stream position before checking if the cache is empty. (#14639) 2022-12-08 11:35:49 -05:00
test_stringutils.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_threepids.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_treecache.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00
test_wheel_timer.py Add missing types to tests.util. (#14597) 2022-12-02 17:58:56 +00:00