-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
/keys/query loop in unverified sessions #27165
/keys/query loop in unverified sessions #27165
Comments
I'm suspecting it's happening since the switch to the Rust Crypto SDK, but I will have to confirm that tomorrow. |
This sounds like #26194 which @richvdh closed in matrix-org/matrix-js-sdk#3757 |
Please send debug logs from within the application. |
I have just re-produced the issue using the build on https://develop.element.io and uploaded logs from there. |
Because I said I'd do so last night: I can also confirm that this behavior does not occur with EDIT: I sadly cannot provide logs from this test because I did so running the |
The debug logs show lots of calls to |
I was unable to reproduce this following the reproduction steps.
Surely if it is an empty database, you cannot login? Did you register the user somehow? Or are you using an unusual authentication system? Assuming you're using an existing account: when I try to log in again, I see this screen: @fnwbr can you confirm if you see that? |
Thanks for giving this a look, I can check back in tomorrow and provide more details. But to answer one question:
Yep, sorry for not mentioning. We're using the LDAP provider module as outlined in: |
I just want to say that this issue happened to me for a long time. These endless loops triggered bans so I decided to stop my service (unfederated server) after not getting help in the chat. Today I've re-installed the server with a hope it's solved, but it's not. |
I was able to reproduce this too. I think you need an account which:
Note that being verified (and actually having access to the secrets in secret storage) doesn't seem to be a factor here. Contrary to what you might expect, |
@richvdh, to me it happens in a completely new server, so I wasn't in any room (encrypted or not) and I was the only user on that server. |
Ok please can you file a separate issue with as much detail as you can, and send a bug report from within the application |
@BillCarsonFr looked at this and observed that we call However, it looks like we do that quite deliberately: https://github.com/matrix-org/matrix-rust-sdk/blob/5df53d7338a381fd596c580f36cbe69fdcfceed8/crates/matrix-sdk-crypto/src/store/mod.rs#L648. I think we should understand why that line is there before we rip it out. |
Actually, no, that's not what that code is doing. Ignore my last comment; I still don't really understand why this bug is happening. |
So the loop goes:
The obvious solution is to have |
I'm not sure if this issue should be closed despite matrix-org/matrix-rust-sdk#3442 has been merged. I let @richvdh decides 🙂. |
Thanks @Hywan. Yes, we'll keep this open until the fix actually lands in element-web (which means a new release of the wasm bindings, and a fix to matrix-org/matrix-rust-sdk#3447) |
@richvdh, thanks a lot for looking on this! I completely shut down 2 of my servers months ago because of this bug. |
I'm afraid I can't speak to Element Android. It may be affected by the same problem, or it may be something else. I'd suggest opening an issue on the element-android repository. |
Slightly more involved than normal because it requires us to pass a backup version into OlmMachine.importBackedUpRoomKeys. On the other hand we can now re-enable the test that was disabled in #4214 due to matrix-org/matrix-rust-sdk#3447 Fixes: element-hq/element-web#27165
FYI we have a server with a main at 100% and we can pinpoint that to the deploy of v1.11.67, which seems to be because this version migrates 30% of the users to the Rust crypto layer which triggers this bug. We only have 10-ish people with this new version but it's enough to peg the main of this server, probably also because it was quite loaded before that. Thanks for fixing it. |
Hey while this issue is being fixed (thanks!), would be possible to prevent that by using some of the ratelimiting configurations? |
I've outlined this in #element-web:matrix.org already; but to no luck. We've started seeing this as of 1 or 2 weeks ago:
Steps to reproduce
I tried this on a fresh Synapse instance with an empty database.
Outcome
What did you expect?
Element to not go crazy.
What happened instead?
Watch the console output repeating the following block about 60 times per second:
Application version
Element version: 1.11.60 Crypto version: Rust SDK 0.7.0 (b1918e9), Vodozemac 0.5.1
Homeserver
Synapse v1.102.0
The text was updated successfully, but these errors were encountered: