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

Rotated megolm session not shared to all members #1986

Open
3 tasks
BillCarsonFr opened this issue Oct 18, 2021 · 1 comment
Open
3 tasks

Rotated megolm session not shared to all members #1986

BillCarsonFr opened this issue Oct 18, 2021 · 1 comment

Comments

@BillCarsonFr
Copy link
Member

See this Rageshake:
https://github.com/matrix-org/element-web-rageshakes/issues/6602

Previous session shared to members in 9 slices
Rotated session only shared in 3 slices

=> Lost a lot of users

We don't have enough information to find exactly where is the problem.
Potential sources:

public prepareToEncrypt(room: Room): void {

  • await this.getDevicesInRoom(room); Returns the wrong number of members?
  • this.removeUnknownDevices(devicesInRoom) did drop wrong devices?

Also from the log the reason for rotation was not printed out.

As we don't know exactly what can be the reason, maybe we can improve the logs to:

  • Logs informations on devices in the rooms #getDevicesInRoom
  • Ensure to print reason for session rotation (here there was no reason printed out)
  • More logs on loadMembersIfNeeded in room (and put roomId in the trace)
@uhoreg
Copy link
Member

uhoreg commented Oct 25, 2021

It looks like the cause of this is that the js-sdk's state storage had stale information. So when Element was restarted, it only had a partial membership list. I haven't found a cause for this stale data, but I've created #1998 so that it will reload the membership list for encrypted rooms when it gets restarted, to work around it. Debugging the stale data is hard due to element-hq/element-web#6291.

I'm going to stop working on this for now, but leave the issue open until we figure out why the data can be stale.

@uhoreg uhoreg removed their assignment Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants