Skip to content

Restore keybackup after verification will freeze E2EE for big backups #23359

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

Closed
BillCarsonFr opened this issue Sep 27, 2022 · 3 comments · Fixed by matrix-org/matrix-js-sdk#4005
Labels
A-E2EE-Key-Backup 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

@BillCarsonFr
Copy link
Member

Steps to reproduce

  1. Need an account with a big key backup (100k keys)
  2. Login a new web session
  3. Verify with passphrase (or any)
  4. Wait a few moment for the keybackup data to be downloaded

Outcome

Actual

As soon as the backup is downloaded the SDK will start looping to decrypt all keys and import them.
Log is full of this

Storing megolm session aXXXXXXXMD/XXXXXXXwith first index 0

Now you can see incoming messages in e2ee rooms.
If you try to send a message, it will be stuck until all backup is imported

=> For my backup its more than half an hour

Workaround => refresh the page to stop that auto import (at the risk of losing the unprocessed to_device received meanwhile)

Expected

It should not import the full backup like that, unless there is a proper way to have it in background, with user feedback, by chunks and priorize per active rooms.
It can just be disabled now, as the backup is queried incrementaly on fail to decrypt.
Full import could still be done from the UI where we have a proper feedback.

I am unsure why it's locking every e2ee related actions. Maybe too many transactions on DB? I am not sure how web is doing things in background

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

No response

Homeserver

No response

Will you send logs?

No

@dbkr dbkr added S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely labels Sep 28, 2022
@anoadragon453
Copy link
Member

Workaround => refresh the page to stop that auto import (at the risk of losing the unprocessed to_device received meanwhile)

In my case, freezes persisted even after refreshing the page.

@richvdh
Copy link
Member

richvdh commented Nov 7, 2023

Related: element-hq/element-meta#2176

@richvdh
Copy link
Member

richvdh commented Dec 12, 2023

Also related: #20694

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE-Key-Backup 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

Successfully merging a pull request may close this issue.

4 participants