Fix unsafe accesses of host objects from the manager#2248
Merged
stevenengler merged 3 commits intoshadow:mainfrom Jul 1, 2022
Merged
Fix unsafe accesses of host objects from the manager#2248stevenengler merged 3 commits intoshadow:mainfrom
stevenengler merged 3 commits intoshadow:mainfrom
Conversation
9fd280c to
de91b62
Compare
sporksmith
approved these changes
Jul 1, 2022
This fixes a memory safety issue where `manager_getNodeBandwidth{Up,Down}()`
accesses a `Host` object without acquiring its lock. We cannot acquire the lock
here because a `GMutex` is not reentrant.
This fixes a memory safety issue where `manager_getLatency()` and `manager_getReliability()` access a `Host` object without acquiring its lock. We cannot acquire the lock here because a `GMutex` is not reentrant.
de91b62 to
569a818
Compare
This will noticably change the networking performance of larger simulations.
569a818 to
78283eb
Compare
Contributor
Author
|
Some examples of the expected network performance change (the difference between PR #2248 and nightly): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The manager accesses
Hostobjects without acquiring the hosts' locks, which is not safe.Edit:
The simulation results have changed slightly in this PR, so I will try to investigate where this difference is from.
Edit 2:
With the workaround commit, the results are the same. We can revert that commit in a new PR.