anonymousland-synapse/synapse/rest/client
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
..
__init__.py
_base.py
account_data.py Add experimental support for MSC3391: deleting account data (#14714) 2023-01-01 03:40:46 +00:00
account_validity.py
account.py Disable sending confirmation email when 3pid is disabled #14682 (#14725) 2023-01-09 11:12:03 +00:00
auth.py
capabilities.py Implementation for MSC3664: Pushrules for relations (#11804) 2022-10-25 14:38:01 +01:00
devices.py Use ClientRestResource on both the main process and workers. (#14528) 2022-12-02 13:10:05 -05:00
directory.py Use Pydantic when PUTting room aliases (#14179) 2022-10-17 13:39:12 +01:00
events.py Do not allow a None-limit on PaginationConfig. (#14146) 2022-10-14 12:30:05 +00:00
filter.py
initial_sync.py Do not allow a None-limit on PaginationConfig. (#14146) 2022-10-14 12:30:05 +00:00
keys.py Use ClientRestResource on both the main process and workers. (#14528) 2022-12-02 13:10:05 -05:00
knock.py
login_token_request.py Save login tokens in database (#13844) 2022-10-26 11:45:41 +01:00
login.py Remove redundant types from comments. (#14412) 2022-11-16 15:25:24 +00:00
logout.py Add a type hint for get_device_handler() and fix incorrect types. (#14055) 2022-11-22 14:08:04 -05:00
models.py A third batch of Pydantic validation for rest/client/account.py (#13736) 2022-09-15 18:36:02 +01:00
mutual_rooms.py
notifications.py Remove support for unstable private read receipts (#13653) 2022-09-01 13:31:54 +01:00
openid.py
password_policy.py
presence.py
profile.py synapse.api.auth.Auth cleanup: make permission-related methods use Requester instead of the UserID (#13024) 2022-08-22 14:17:59 +01:00
push_rule.py
pusher.py Track device IDs for pushers (#13831) 2022-09-21 15:31:53 +00:00
read_marker.py Accept & store thread IDs for receipts (implement MSC3771). (#13782) 2022-09-23 14:33:28 +00:00
receipts.py Reject receipt requests with invalid room or event IDs. (#14632) 2022-12-07 17:35:41 +00:00
register.py Fix stack overflow in _PerHostRatelimiter due to synchronous requests (#14812) 2023-01-13 00:16:21 +00:00
relations.py Stabilize the threads API. (#14175) 2022-10-14 07:16:50 -04:00
rendezvous.py Implementation of HTTP 307 response for MSC3886 POST endpoint (#14018) 2022-10-18 15:52:25 +00:00
report_event.py
room_batch.py Reject history insertion during partial joins (#14291) 2022-10-27 10:52:23 +01:00
room_keys.py Add type annotations to trace decorator. (#13328) 2022-07-19 14:14:30 -04:00
room_upgrade_rest_servlet.py
room.py Move StateFilter to synapse.types (#14668) 2022-12-12 16:19:30 +00:00
sendtodevice.py Improve logging and opentracing for to-device message handling (#14598) 2022-12-06 09:52:55 +00:00
sync.py Return NOT_JSON if decode fails and defer set_timeline_upper_limit ca… (#14262) 2022-10-24 16:55:06 +01:00
tags.py
thirdparty.py
tokenrefresh.py
transactions.py
user_directory.py Fix a long-standing bug where the user directory would return 1 more row than requested. (#14631) 2022-12-07 11:19:43 +00:00
versions.py Advertise support for Matrix v1.5. (#14576) 2022-11-29 10:49:23 -05:00
voip.py