Open douglaz opened 4 months ago
I suspect this is a problem with the crypto store. We need to investigate. How many clients do you have? What's your use case? How often does it happen?
How many clients do you have?
10+ clients on the same rust process
What's your use case?
We're developing a load test tool for matrix servers so we can properly setup them for a given expected number of simultaneous users
How often does it happen?
It always happens on our tests, but it make take a few minutes depending on the server size
Question: How hard would it be for you to write an integration test inside the Matrix Rust SDK, so that it helps us to reproduce the problem?
I don't think that this is a bug, that panic happens if you didn't exchange room keys and attempt to encrypt and send a message to a room, please take a look at the, sadly unfinished, tutorial for the crypto crate: https://github.com/matrix-org/matrix-rust-sdk/pull/2352/files#diff-c90ec6ed5dae76e5da6ae0abcf6f48a10effbb532b3b093e04ea69fcd03e61c8R852-R906
If you want to develop a load test tool I would suggest you to use the matrix-sdk
crate instead of the matrix-sdk-crypto
crate.
The matrix-sdk
crate is a higher level crate which will allow you to send encrypted messages without having to care about room keys and how to send them to other devices.
Question: How hard would it be for you to write an integration test inside the Matrix Rust SDK, so that it helps us to reproduce the problem?
I'll try that as soon as I get some spare time.
If you want to develop a load test tool I would suggest you to use the
matrix-sdk
crate instead of thematrix-sdk-crypto
crate.The
matrix-sdk
crate is a higher level crate which will allow you to send encrypted messages without having to care about room keys and how to send them to other devices.
I'm using matrix-sdk, look at the beginning of stacktrace (/home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/matrix-sdk-0.7.1/src/room/futures.rs:95:78
)
Oh indeed, sorry about the confusion.
Care to share how your Client
setup looks, what type of storage you are using and how your EncryptionSettings
look like.
Testing against both local/remote synapse instances under high load (many clients running in different tasks, and each client is shared between two different tasks):
I don't have right now a self contained project. I may try to create one if this gets difficult to reproduce/debug.