-
Notifications
You must be signed in to change notification settings - Fork 246
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
Cross-process lock doesn't seem to work #3313
Comments
I'm not really sure how best to debug this. We could probably start by turning on all the |
I'll try to check. |
I think I repro'd this. It's flakey though. https://github.com/matrix-org/complement-crypto/actions/runs/9094842308/job/24996764717?pr=52#step:15:790 shows
This is exactly what the test shows: |
I'll try to come back to this next week to see if I can get a reliable repro case. |
We have a lock whose job it is to prevent both the main process and the NSE (notifications) process on Element X from using the OlmAccount at the same time. It also stops the two processes from performing an "encryption sync" (ie, a sliding-sync request in which we request to-device messages) concurrently.
However, we have evidence that it doesn't actually work. We have a rageshake where the main process makes a
sync
request:... and overlapping with that, the NSE process makes another
/sync
request:This shouldn't be possible, because both operations are done holding the cross-process lock (the main process in
next_sync_with_lock
, and the NSE process inrun_fixed_iterations
).Now, I also see this in the log from the main process, in the middle of that
next_sync_with_lock
operation:... which I believe means we are dropping the cross-process lock. That would obviously explain a lot of things, but I can't figure out how it happens.
The text was updated successfully, but these errors were encountered: