-
Notifications
You must be signed in to change notification settings - Fork 171
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
Multiprocess encryption can sometimes read stale values #7743
Comments
➤ PM Bot commented: Jira ticket: RCORE-2141 |
I don't want to undermine the existence of a bug in this complicated code. But could you clarify a few things for the sake of my understanding? In scenario 1, between steps 3-4, the entire page (all byte ranges) should have been refreshed from disk due to advancing versions and the read barrier that happens before writing. |
Reading and writing is always done via different mappings. Step 3 marks all of the pages as StaleIV, but doesn't reread anything. The read barrier on the write mapping brings that mapping fully up to date, but doesn't update the reader mapping. The write barrier on the write mapping copies just the modified bytes over to the read mapping, but not the rest of the page, and then clears StaleIV. |
Got it, thanks for this analysis. Having multiple mappings of the same data doesn't make things simple. |
There are at least two scenarios where multiprocess encryption can incorrectly consider stale values to be up to date. This one is hit by our tests once the shared mapping is removed and they're able to test the multiprocess code paths within one process:
This one is more theoretical and it's unlikely anyone has actually hit it:
The text was updated successfully, but these errors were encountered: