Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Out-of-sync olm sessions #1209

Closed
richvdh opened this issue May 8, 2017 · 5 comments
Closed

Out-of-sync olm sessions #1209

richvdh opened this issue May 8, 2017 · 5 comments
Labels

Comments

@richvdh
Copy link
Member

richvdh commented May 8, 2017

I've seen pairs of android devices failing to communicate with

E/MXOlmDevice: ## decryptMessage() : decryptMessage failed BAD_MESSAGE_MAC
@richvdh
Copy link
Member Author

richvdh commented May 8, 2017

See, for example, https://github.com/matrix-org/riot-android-rageshakes/issues/133 and https://github.com/matrix-org/riot-android-rageshakes/issues/132.

See also https://github.com/matrix-org/riot-android-rageshakes/issues/123, which may be due to corruption on the android end, or may not.

It's possible these were hangovers from #799, but at this point it seems somewhat unlikely.

@richvdh
Copy link
Member Author

richvdh commented May 11, 2017

Hopefully yannick fixed this in matrix-org/matrix-android-sdk@aa5016b

@richvdh richvdh closed this as completed May 11, 2017
@richvdh
Copy link
Member Author

richvdh commented May 11, 2017

For the record: under certain conditions it was possible for two instances of MXFileCryptoStore to be active at once; the old one was used to encrypt a message while the new one was still loading; then when the old instance was discarded, the state had been rewound.

@ylecollen
Copy link
Contributor

fixed with b6fecb7

@richvdh
Copy link
Member Author

richvdh commented Jun 2, 2017

Note to self: The symptoms of this bug in the logs are something like the following.

Normal start for MXFileCryptiStore is as follows:

05-24 17:51:23.692 1633 D/MXFileCryptoStore: ## preloadCryptoData() starts
05-24 17:51:23.703 1633 D/MXFileCryptoStore: ## preloadCryptoData() : load mOlmAccount in 11 ms
05-24 17:51:23.705 1633 D/MXFileCryptoStore: ## preloadCryptoData() : load mRoomsAlgorithms (0 algos) in 0 ms
05-24 17:51:27.863 1633 D/MXFileCryptoStore: ## preloadCryptoData() : load 889 olmsessions in 4158 ms
05-24 17:51:41.772 1633 D/MXFileCryptoStore: ## preloadCryptoData() : load 1991 inboundGroupSessions in 13904 ms

(note the significant pauses while it loads the olm sessions and inboundgroupsessions).

When this bug happens, it looks more like:

05-08 13:04:27.681 786 D/MXFileCryptoStore: ## preloadCryptoData() starts
05-08 13:04:27.691 786 D/MXFileCryptoStore: ## preloadCryptoData() : load mOlmAccount in 10 ms
05-08 13:04:27.692 786 D/MXFileCryptoStore: ## preloadCryptoData() : load mRoomsAlgorithms (0 algos) in 0 ms
... lots of other things, including other operations on MXFileCryptoStore
05-08 13:04:30.426 786 D/MXFileCryptoStore: ## preloadCryptoData() : load 726 olmsessions in 2733 ms
... more other things.
05-08 13:04:46.932 786 D/MXFileCryptoStore: ## preloadCryptoData() : load 3169 inboundGroupSessions in 16505 ms

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants