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

Faster joins: incoming /send requests block during a faster join #13684

Closed
richvdh opened this issue Aug 31, 2022 · 2 comments · Fixed by #13830
Closed

Faster joins: incoming /send requests block during a faster join #13684

richvdh opened this issue Aug 31, 2022 · 2 comments · Fixed by #13830
Assignees
Labels
A-Federated-Join joins over federation generally suck O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@richvdh
Copy link
Member

richvdh commented Aug 31, 2022

Things like typing updates can cause /send requests to block while there is a faster-join going on. This is bad because it means that all traffic ends up getting stacked up.

2022-08-31 22:22:35,106 - synapse.storage.util.partial_state_events_tracker - 169 - INFO - PUT-795 - Awaiting un-partial-stating of room !OGEhHVWSdvArJzumhm:matrix.org
Stack (most recent call last):
...
  File "/usr/local/lib/python3.9/site-packages/synapse/util/async_helpers.py", line 227, in _concurrently_execute_inner
    await maybe_awaitable(func(value))
  File "/usr/local/lib/python3.9/site-packages/synapse/federation/federation_server.py", line 522, in _process_edu
    await self.registry.on_edu(edu.edu_type, origin, edu.content)
  File "/usr/local/lib/python3.9/site-packages/synapse/federation/federation_server.py", line 1441, in on_edu
    await handler(origin, content)
  File "/usr/local/lib/python3.9/site-packages/synapse/handlers/typing.py", line 365, in _recv_edu
    domains = await self._storage_controllers.state.get_current_hosts_in_room(
  File "/usr/local/lib/python3.9/site-packages/synapse/storage/controllers/state.py", line 525, in get_current_hosts_in_room
    await self._partial_state_room_tracker.await_full_state(room_id)
  File "/usr/local/lib/python3.9/site-packages/synapse/logging/opentracing.py", line 876, in _wrapper
    return await func(*args, **kwargs)  # type: ignore[misc]
  File "/usr/local/lib/python3.9/site-packages/synapse/storage/util/partial_state_events_tracker.py", line 169, in await_full_state
    logger.info(

(I think this might be fundamentally the same as #13288)

@squahtx squahtx added A-Federated-Join joins over federation generally suck S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. O-Occasional Affects or can be seen by some users regularly or most users rarely labels Sep 1, 2022
@MatMaul
Copy link
Contributor

MatMaul commented Sep 16, 2022

I am adding tests and fixing if needed the receiving of EDUs during fast joins:

  • m.typing should be fixed by typing: check origin server of typing event against room's servers #13830
  • m.direct_to_device is ok
  • m.presence is not refusing the transaction however it doesn't seem to go down the sync afterwards, I haven't investigated yet
  • m.receipt is ok
  • m.signing_key_update is ok but sync result unchecked (need an encrypted room & devices for that)
  • m.device_list_update is ok but sync result unchecked (need an encrypted room & devices for that)

The PR for the complement tests is here: matrix-org/complement#465

@richvdh
Copy link
Member Author

richvdh commented Sep 28, 2022

fixed by #13830. Thanks @MatMaul !

@richvdh richvdh closed this as completed Sep 28, 2022
DMRobertson pushed a commit to matrix-org/complement that referenced this issue Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Federated-Join joins over federation generally suck O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants