Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync v2 implicit todevice acks considered incredibly harmful. #7

Open
ara4n opened this issue Feb 11, 2022 · 4 comments
Open

sync v2 implicit todevice acks considered incredibly harmful. #7

ara4n opened this issue Feb 11, 2022 · 4 comments
Labels
feature Suggestion for a significant extension which needs considerable consideration

Comments

@ara4n
Copy link
Member

ara4n commented Feb 11, 2022

I think we’ve tracked the main final reliability problem on matrix-video-chat to the fact that people leave instances lying around in bg tabs, which sit there running a sync loop which races to consume msc matrix-org/matrix-spec-proposals#3401 todevice messages.

I think the race is that if one sync loop calls /sync before the other tab’s /sync returns, it can “steal” the todevice messages out from the other loop by acknowledging and thus deleting them. As a result, half your todevice messages go missing (hence all my accusations in matrix-org/synapse#9533 about unreliable todevice msgs).

@kegsay - any suggestions on a backwards compatible change to v2 sync to fix this so we’re not blocked waiting for sliding sync to land?

See also matrix-org/synapse#6450 as another instance of this wreaking havoc.

@kegsay
Copy link
Member

kegsay commented Feb 11, 2022

Move the sync loop to a SharedWorker maybe?

@turt2live
Copy link
Member

Why are there multiple tabs in play? Pantalaimon already works around this problem and has multiple sync loops, which puts into question the application's architecture.

@kegsay
Copy link
Member

kegsay commented Feb 13, 2022

people leave instances lying around in bg tabs

This is likely why there are multiple tabs in play.

@turt2live
Copy link
Member

I'm a little bit surprised that happens for a voip stack though, and that the client isn't built to handle it without the need for protocol changes. Element Web (for example) doesn't choke when it happens.

@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
@turt2live turt2live added the feature Suggestion for a significant extension which needs considerable consideration label May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Suggestion for a significant extension which needs considerable consideration
Projects
None yet
Development

No branches or pull requests

3 participants