moby--moby/container
Stephen J Day 5b55747a52
container: protect health monitor channel
While this code was likely called from a single thread before, we have
now seen panics, indicating that it could be called in parallel. This
change adds a mutex to protect opening and closing of the channel. There
may be another root cause associated with this panic, such as something
that led to the calling of this in parallel, as this code is old and we
had seen this condition until recently.

This fix is by no means a permanent fix. Typically, bugs like this
indicate misplaced channel ownership. In idiomatic uses, the channel
should have a particular "owner" that coordinates sending and closure.
In this case, the owner of the channel is unclear, so it gets opened
lazily. Synchronizing this access is a decent solution, but a refactor
may yield better results.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-11-13 13:31:28 -08:00
..
stream Update libcontainerd to use containerd 1.0 2017-10-20 07:11:37 -07:00
archive.go LCOW: Implemented support for docker cp + build 2017-09-14 12:07:52 -07:00
container.go Increase container default shutdown timeout on Windows 2017-10-23 10:31:31 -07:00
container_linux.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
container_notlinux.go Remove solaris build tag and `contrib/mkimage/solaris 2017-11-02 00:01:46 +00:00
container_unit_test.go LCOW: Remove CommonContainer - just Container 2017-06-20 08:55:46 -07:00
container_unix.go Remove solaris build tag and `contrib/mkimage/solaris 2017-11-02 00:01:46 +00:00
container_windows.go Increase container default shutdown timeout on Windows 2017-10-23 10:31:31 -07:00
env.go Move ReplaceOrAppendEnvValues to container package 2016-12-21 22:42:39 +01:00
env_test.go api: clarify that Env var without `=` is removed from the environment 2017-03-08 04:27:25 +00:00
health.go container: protect health monitor channel 2017-11-13 13:31:28 -08:00
history.go Release memoryStore locks before filter/apply 2016-05-23 11:45:04 -07:00
memory_store.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
memory_store_test.go Fix some output information for container test 2016-11-24 20:01:00 +08:00
monitor.go Update logrus to v1.0.1 2017-07-31 13:16:46 -07:00
mounts_unix.go Replace execdrivers with containerd implementation 2016-03-18 13:38:32 -07:00
mounts_windows.go Windows libcontainerd implementation 2016-03-18 13:38:41 -07:00
state.go Merge pull request #34999 from kolyshkin/wait-on-rm 2017-10-29 11:04:41 -07:00
state_solaris.go Re-export container state's ExitCode and Error fields 2016-08-30 14:17:09 -07:00
state_test.go add testcase IsValidStateString 2017-10-24 09:49:58 +08:00
store.go Extract container store from the daemon. 2016-01-19 13:21:41 -05:00
view.go Add gosimple linter 2017-09-12 12:09:59 -04:00
view_test.go container: Fix Delete on nonexistent container 2017-07-26 16:45:54 -07:00