moby--moby/libnetwork/drivers
Martin Dojcak feab0cca9f libnetwork/overlay:fix join sandbox deadlock
Operations performed on overlay network sandboxes are handled by
dispatching operations send through a channel. This allows for
asynchronous operations to be performed which, since they are
not called from within another function, are able to operate in
an idempotent manner with a known/measurable starting state from
which an identical series of iterative actions can be performed.

However, it was possible in some cases for an operation dispatched
from this channel to write a message back to the channel in the
case of joining a network when a sufficient volume of sandboxes
were operated on.

A goroutine which is simultaneously reading and writing to an
unbuffered channel can deadlock if it sends a message to a channel
then waits for it to be consumed and completed, since the only
available goroutine is more or less "talking to itself". In order
to break this deadlock, in the observed race, a goroutine is now
created to send the message to the channel.

Signed-off-by: Martin Dojcak <martin.dojcak@lablabs.io>
Signed-off-by: Ryan Barry <rbarry@mirantis.com>
2022-03-22 11:15:14 -04:00
..
bridge Fix flaky TestPortMappingV6Config 2021-11-16 09:37:34 +01:00
host libnetwork: remove unused "testutils" imports 2021-08-18 14:20:37 +02:00
ipvlan Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
macvlan Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
null libnetwork: remove unused "testutils" imports 2021-08-18 14:20:37 +02:00
overlay libnetwork/overlay:fix join sandbox deadlock 2022-03-22 11:15:14 -04:00
remote refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
windows Windows: require Windows Server RS5 / ltsc2019 (build 17763) as minimum 2022-02-18 22:58:28 +01:00