-
Notifications
You must be signed in to change notification settings - Fork 881
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
[MOD] fix fatal error: concurrent map read and map write #1506
Conversation
Please sign your commits following these rules: $ git clone -b "master" git@github.com:cmingxu/libnetwork.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
Signed-off-by: kevin xu <cming.xu@gmail.com>
I believe I am experiencing the issue solved in this pull, would it be of any use for me to open an issue?
|
@kalahari There is already an issue moby/moby#27486 and it is already fixed. It will be available in the next patch release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change does not fix the original issue.
The fix for it was pushed in #1512 and merged.
sb.Lock() | ||
sb.RLock() | ||
defer sb.RUnlock() | ||
|
||
_, ok := sb.populatedEndpoints[ep.ID()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The access to this map is already protected by sandbox lock.
This change does not help.
The root cause of the issue was a delete on the map run outside of sandbox lock and was fixed in #1512
@@ -80,6 +80,7 @@ type sandbox struct { | |||
ingress bool | |||
ndotsSet bool | |||
sync.Mutex | |||
sync.RWMutex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You adding sync.RWMutex
along with the existing sync.Mutex
.
From which package will all the existing calls sb.Lock()/Unlock()
execute, sync.mutex
or sync.RWMutex
?
If we were to accept this change, you should remove sync.Mutex
.
Based on the comments, I will go ahead and close this PR |
No description provided.