Skip to content

Do not hold the peer map lock during the peerDBNetworkWalk#1638

Merged
mavenugo merged 1 commit intomoby:masterfrom
aboch:ovlk
Feb 7, 2017
Merged

Do not hold the peer map lock during the peerDBNetworkWalk#1638
mavenugo merged 1 commit intomoby:masterfrom
aboch:ovlk

Conversation

@aboch
Copy link
Copy Markdown
Contributor

@aboch aboch commented Feb 7, 2017

Otherwise it can lead to dead lock.

For example a dead lock on the channel send, if the walking function is pushLocalEndpointEvent waiting on the event channel (size 1) to be drained, while the drainer function serfLoop is blocked while processing an event which also locks on the nMap.Lock() itself.

Signed-off-by: Alessandro Boch aboch@docker.com

Signed-off-by: Alessandro Boch <aboch@docker.com>
@mavenugo
Copy link
Copy Markdown
Contributor

mavenugo commented Feb 7, 2017

LGTM

@mavenugo mavenugo merged commit 6d6d4ac into moby:master Feb 7, 2017
runcom added a commit to projectatomic/docker that referenced this pull request Apr 27, 2017
runcom added a commit to projectatomic/docker that referenced this pull request Apr 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants