Skip to content
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

Race condition in plugin registration #75097

Closed
bertinatto opened this issue Mar 7, 2019 · 1 comment · Fixed by #75110
Closed

Race condition in plugin registration #75097

bertinatto opened this issue Mar 7, 2019 · 1 comment · Fixed by #75110
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage.

Comments

@bertinatto
Copy link
Member

bertinatto commented Mar 7, 2019

What happened:

A race condition in the plugin watcher might happen when a pluginwatcher.Watcher is created, started and immediately stopped and cleaned up. If executed several times, the unit test TestNewManagerImplStartProbeMode will expose this issue.

The PR #71440 addressed part of the problem by serializing the handling of CREATE and DELETE events. However, a race might still happen in the pluginwatcher.traversePluginDir function. #71440 (comment) describes in detail the problem.

How to reproduce it (as minimally and precisely as possible):

# Create a binary
$ go test -c k8s.io/kubernetes/pkg/kubelet/cm/devicemanager -run  ^TestNewManagerImplStartProbeMode$

# Run the test in a loop until it fails
$ while ./devicemanager.test -test.failfast=true ; do :; done

/sig storage
/sig node

@bertinatto bertinatto added the kind/bug Categorizes issue or PR as related to a bug. label Mar 7, 2019
@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/node Categorizes an issue or PR as relevant to SIG Node. labels Mar 7, 2019
@bertinatto
Copy link
Member Author

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants