This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Federation automatic joins raise 403 on callee homeserver #15012
Labels
A-Federated-Join
joins over federation generally suck
A-Invite
Inviting users to rooms and accepting invites
A-Modules
Module API: https://matrix-org.github.io/synapse/latest/modules/index.html
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Tolerable
Minor significance, cosmetic issues, low or no impact to users.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Z-Read-After-Write
A lack of read-after-write consistency, usually due to cache invalidation races with workers
Description
I have two federated homeservers, call them
alpha
andbeta
.On both servers it is installed the synapse-auto-accept-invite plugin that triggers a join as a third-party rule each time a user is invited to a room.
When I create a room on
alpha
and then I invite an user ofbeta
the rule is triggered, but it fails, below the stacktrace onbeta
homeserver (see also this issue):On
alpha
homeserver here is the stacktrace (I've patched the original code on /synapse/http/server.py:_async_render_wrapper, line ~315 in order to print this):This is due to the fact that events received by the function /synapse/event_auth.py:_is_membership_change_allowed (arg
auth_events
) are these (once again patched version with more logging):When I manually accept from the beta client everything goes ok and the auth events logged are different (call from beta server is the same, I've compared the url):
Even hardcoding a
time.sleep(30)
on the third-party rule doesn't seem to solve the issue. I've also tried patching the third party rule to retry N times with backoff factor, but still the same issue.Is this inconsistent behavior on event storage a known issue?
If yes, has a fix already been planned?
Are there workaround possible?
Steps to reproduce
See description
Homeserver
local homeserver
Synapse Version
1.75.0
Installation Method
Docker (matrixdotorg/synapse)
Database
PostgreSQL, no separate servers, no porting, no restoring
Workers
Single process
Platform
See docker image matrixdotorg/synapse:v1.75.0
Configuration
Third party plugin:
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: