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

Running EW in two tabs may cause subtle nasty misbehaviour #21039

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

Running EW in two tabs may cause subtle nasty misbehaviour #21039

ara4n opened this issue Feb 11, 2022 · 2 comments
Labels
A-E2EE O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@ara4n
Copy link
Member

ara4n commented Feb 11, 2022

I think we’ve tied down the main splitbrain reliability problem with matrix-video-chat as being due to folks leaving instances running in background tabs. This means they keep a sync loop running for the same device in the other tabs, which race to consume to-device msgs with the fg tab. I think the race is something like:

  • tab1 is calling /sync
  • tab2 calls the sameish /sync, which returns with a todevice
  • tab2 calls /sync again before tab1 returns, acknowleding and deleting the queued to device msg
  • tab1 returns but without the todevice which has been “stolen” by tab2

This could affect device verif, possibly e2ee, and voip when msc3401 lands.

@ara4n ara4n added the T-Defect label Feb 11, 2022
@aaronraimist
Copy link
Collaborator

Related: #11088

@SimonBrandner SimonBrandner added A-E2EE O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Feb 11, 2022
@jryans
Copy link
Collaborator

jryans commented Feb 11, 2022

As one potential approach, Hydrogen's service worker tracks concurrent session access, ensuring only one tab can access a session at a time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

4 participants