-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Synapse is sending non-local events over federation #1753
Comments
I'm suddenly worried that this may be causing a federation storm, where rather than each event being sent only by the origin server, it's also sent simultaneously by other servers too, resulting in N-times more traffic flying around... |
This might explain @Tokodomo's syn flood warnings on federation traffic, if we're receiving the same event in quick succession from a random set of homeservers. It might also explain why we're hitting deadlocks more often? |
This is indeed happening. I ran arasphere in debug mode this afternoon for a few hours, and stripped all the event_ids out of the fed txns it received. Many events arrive from different homeservers, duplicated 40-50x over. For instance, event
|
It may be coincidence, but every single one of those duplicates came from 0.18.5 (or 0.18.6) |
Looks like https://github.com/matrix-org/synapse/blob/v0.18.5/synapse/federation/transaction_queue.py#L146-L170 doesn't have a check to make sure we only send events from this server. |
This was probably introduced when we split out the federation sender to a worker and the code was rewritten to pull events from the database. #1635 |
It looks like synapse pre-0.18.5 used to send messages on behalf of other servers under certain circumstances. https://github.com/matrix-org/synapse/pull/1635/files#diff-3f6de39b112e0c501c3c2925a571b908L850 I guess that was why the check to ensure the event came from this server was omitted from #1635. |
#1764 might fix this. |
It didn't fix it. but hopefully b2850e6 does. |
this is tested in the wild and seen to be working at last. |
I'm seeing events being sent over federation which don't belong to the origin homeserver. For instance, arasphere just received a PDU (from a 0.18.5 server) with:
Why on earth is z.z6c.de sending events originating from matrix.org?
I've seen something looking like this a few times whilst debugging #1733 and #1738, but this is the first time i've caught it in the act with debug-level logging.
The text was updated successfully, but these errors were encountered: