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

Faster room joins: Outgoing device list updates not sent if we leave the room before join completes #13894

Open
squahtx opened this issue Sep 23, 2022 · 3 comments
Labels
A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. A-Federated-Join joins over federation generally suck O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@squahtx
Copy link
Contributor

squahtx commented Sep 23, 2022

When a local user updates their device list while in a partial state room, their device list updates are buffered up, since it's not known for sure which servers are in the room and expecting device list updates. #13891 ensures that buffered device list updates are sent once the room transitions to full state.

However, if the room is left before then, there is no transition to full state and some remote homeservers will miss updates.

eg.

  1. @alice:local partial state joins a room
  2. The local homeserver thinks @elsie:remote is not in the room and does not send them device list updates, either because the /send_join servers_in_room response was incorrect or it has calculated incorrect state.
  3. @elsie:remote queries @alice:local's device list and caches it.
  4. @alice:local updates their device list.
  5. @elsie:remote joins another room shared with @alice:local.
  6. @alice:local leaves the partial state room.
  7. (bad) @elsie:remote thinks their cached device list for @alice:local is up to date when it's actually stale.

We're missing complement tests for this too.

related:

@squahtx squahtx added A-Federated-Join joins over federation generally suck A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Sep 23, 2022
@richvdh
Copy link
Member

richvdh commented Sep 29, 2022

Is this tested at all by matrix-org/complement#476?

@squahtx
Copy link
Contributor Author

squahtx commented Sep 29, 2022

Those tests are for incoming device list updates rather than outgoing ones. We're missing tests for this issue.

@richvdh
Copy link
Member

richvdh commented Oct 5, 2022

We think this is an edge-case, and no worse than existing bugs in device-list tracking (such as #13651), so not making it a priority for a fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. A-Federated-Join joins over federation generally suck O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

2 participants