-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 controllerManager.waitForRunnable
#1442
Comments
Yeah - the usage of WaitGroup is sketchy. It's true that |
What I don't understand is why -race is detecting the problem consistently in 0.8.3, but not back in 0.6.5. The usage patterns of WaitGroup did not change drastically. |
/assign |
FWIW, this is still present in v0.9.5. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale not to get this issue closed: the race condition is still present with v0.10.3 |
is this issue still valid with controller-runtime v0.11.0 ? |
I think it has been solved in #1695 . |
@AliMohammadiSoumee @brakthehack can you guys try to reproduce your race condition with controller-runtime prior v0.11 and then with v0.11 ? I cannot reproduce it with v0.11 personally, but it had only happened a few times |
I have reproduced it with controller-runtime v0.11.0, and apparently, the issue is solved. |
/close |
@FillZpp: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I got a race condition error when I was trying to run my tests with
-race
flag.The problem is with controllerManager.waitForRunnable. Based on this document,
Add
andWait
methods ofWaitGroup
should be called in the same goroutine.controllerManager
calls theWaitGroup.Add
method In the controllerManager.StartRunnable method, and calls theWaitGroup.Wait
method in the controllerManager.waitForRunnableToEnd method, WhilewaitForRunnableToEnd
andStartRunnable
are running in different goroutines.This log may help you, It's for v0.8.3:
The text was updated successfully, but these errors were encountered: