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
[test/kubelet]: Fix deadlock in watch manager test #92920
[test/kubelet]: Fix deadlock in watch manager test #92920
Conversation
Hi @gaurav1086. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/assign @msau42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/sig node
/ok-to-test |
might be worth to include this PR in the 1.19 release? |
/retest |
/retest |
/approve |
/retest Review the full test history for this PR. Silence the bot with an |
64a63d3
to
5d74555
Compare
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
5d74555
to
22dc474
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
/priority important-longterm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gaurav1086, msau42, neolit123 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/milestone v1.19 |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
this is a good catch, but only really causes problems when the test would have already failed moving to 1.20 since we're approaching code thaw and any 1.19 fixes will need cherry picks shortly /milestone v1.20 |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
2 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
//test pull-kubernetes-e2e-kind-ipv6 |
Ooop. |
/test pull-kubernetes-conformance-kind-ga-only-parallel |
Signed-off-by: Gaurav Singh gaurav1086@gmail.com
What type of PR is this?
What this PR does / why we need it:
Fixes a deadlock condition if all the goroutines (10) will fail and try to write to the errCh and block instead of finishing the execution, while the main thread will also block through wait() for all the goroutines to finish before it tries to read from the errCh in the select operation, thus causing a deadlock. A simple illustration: https://play.golang.com/p/x0WpLjw_f1i
The solution is to create a buffered channel upto the size of the total number of the goroutines so they can all finish execution asynchronously.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
https://play.golang.com/p/x0WpLjw_f1i
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: