Skip to content
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

AuthorityTemporaryStore potential inconsistent access of object state #394

Closed
lxfind opened this issue Feb 8, 2022 · 6 comments
Closed
Assignees
Labels
sui-node Type: Bug Something isn't working
Milestone

Comments

@lxfind
Copy link
Contributor

lxfind commented Feb 8, 2022

In AuthorityTemporaryStore, we have two fields that contain object state: objects and written. objects contains the original content of the objects from the input, while written contains any mutated object state.
Whenever we are trying to read objects, unless it's read-only, we will need to read from written first to see if it's there.
We should also consider renaming objects to something like original_objects to avoid confusions.

@lxfind lxfind added the Type: Bug Something isn't working label Feb 8, 2022
@awelc awelc self-assigned this Feb 8, 2022
@awelc
Copy link
Contributor

awelc commented Feb 8, 2022

I will try fixing as part of #90 as (I believe) that's where the bug manifests itself.

@gdanezis
Copy link
Collaborator

gdanezis commented Feb 8, 2022

This is a known issue, because I do not believe the VM issues reads commands for anything besides already published read-only objects. In fact why not simply remove the read operation and replace it with something like get module by ID. Or are we actually reading after writing (I do not think so, but better check).

@lxfind
Copy link
Contributor Author

lxfind commented Feb 8, 2022

#90 will start doing reading after writing.

@gdanezis
Copy link
Collaborator

gdanezis commented Feb 9, 2022

Ok, then temp authority needs to be more sophisticated:

  • When we do a read we need to check if it has been written before.
  • Depending on the needs we may need to explicitly also track deletes, since reading something after its deleted should return None or something.

@gdanezis
Copy link
Collaborator

gdanezis commented Mar 3, 2022

Hey @awelc , has this been addressed in:

@awelc
Copy link
Contributor

awelc commented Apr 21, 2022

This has been addressed in #337 and #436.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sui-node Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants