moby/pkg/plugins
Brian Goff 2938dce794 Fix race/deadlock in v1 plugin handlers
When a plugin is activated, and then `plugins.Handle` is called to
register a new handler for a given plugin type, a deadlock occurs when
for anything which calls `waitActive`, including `Get`, and `GetAll`.

This happens because `Handle()` is setting `activated` to `false` to
ensure that plugin handlers are run on next activation.
Maybe these handlers should be called immediately for any plugins which
are already registered... but to preserve the existing behavior while
fixing the deadlock, track if handlers have been run on plugins and
reset when a new handler is registered.

The simplest way to reproduce the deadlock with Docker is to add a `-v
/foo` to the test container created for the external graphdriver tests.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-12-27 12:27:41 -05:00
..
pluginrpc-gen Add support for volume scopes 2016-06-05 15:37:15 -04:00
transport Call plugins with custom transports. 2016-03-02 12:54:53 -05:00
client.go Add HTTP client timeout. 2016-11-21 13:11:40 -08:00
client_test.go Revert "Add default timeout to pkg/plugins/client" 2016-09-20 10:01:03 +02:00
discovery.go Add spec file support for Windows plugin discovery. 2016-08-22 09:14:57 -07:00
discovery_test.go Fix govet for go1.7 2016-09-02 19:07:54 -07:00
discovery_unix.go fix spec file support for Windows plugin discovery (#25903) 2016-08-26 22:11:58 +02:00
discovery_unix_test.go Fix govet for go1.7 2016-09-02 19:07:54 -07:00
discovery_windows.go fix spec file support for Windows plugin discovery (#25903) 2016-08-26 22:11:58 +02:00
errors.go Fix some typos in comments and strings 2016-02-22 20:27:15 +01:00
plugin_test.go Fix race/deadlock in v1 plugin handlers 2016-12-27 12:27:41 -05:00
plugins.go Fix race/deadlock in v1 plugin handlers 2016-12-27 12:27:41 -05:00