Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Federation falling behind, with Event %s failed history check errors #3923

Closed
richvdh opened this issue Sep 20, 2018 · 2 comments
Closed

Federation falling behind, with Event %s failed history check errors #3923

richvdh opened this issue Sep 20, 2018 · 2 comments
Assignees

Comments

@richvdh
Copy link
Member

richvdh commented Sep 20, 2018

@turt2live reported problems with his homeserver getting behind. Inspection of the logs initially revealed the suspicious log line Event %s failed history check

@richvdh
Copy link
Member Author

richvdh commented Sep 20, 2018

That log line was really unhelpful, and #3904 made significant improvements, including turning that %s into an actual event id.

After Travis had been running #3904 for a while, we then saw:

homeserver_1 - 2018-09-19 07:13:12,585 - synapse.handlers.federation - 345 - WARNING - PUT-138932 - [<room> <event>] Error attempting to resolve state at missing prev_events
Traceback (most recent call last):
  File "/home/matrix/.synapse/local/lib/python2.7/site-packages/synapse/handlers/federation.py", line 339, in on_receive_pdu
    state = (yield self.store.get_events(state_map.values())).values()
TypeError: unhashable type: 'list'

This turns out to have been a bug introduced by #3456, where on_receive_pdu calls get_state_groups expecting it to return a list of state groups, but it actually returns a dict mapping from state_group id to state group.

@richvdh richvdh self-assigned this Sep 21, 2018
richvdh added a commit that referenced this issue Sep 27, 2018
get_state_groups returns a map from state_group_id to a list of FrozenEvents,
so was very much the wrong thing to be putting as one of the entries in the
list passed to resolve_events_with_factory (which expects maps from
(event_type, state_key) to event id).

We actually want get_state_groups_ids().values() rather than
get_state_groups().

This fixes the main problem in #3923, but there are other problems with this
bit of code which get discovered once you do so.
@richvdh
Copy link
Member Author

richvdh commented Oct 1, 2018

fixed by #3968

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants