-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
avoid dobule RLock() in cpumanager #62464
avoid dobule RLock() in cpumanager #62464
Conversation
/ok-to-test |
@choury: you can't request testing unless you are a kubernetes member. 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. |
39b6623
to
49d5a93
Compare
/ok-to-test |
/assign @vishh |
/assign @ConnorDoyle |
@ConnorDoyle Would you like to review this? This is a bug fix, and should be cherry-picked to 1.8, 1.9 and 1.10 |
@@ -59,10 +59,10 @@ func (s *stateMemory) GetCPUSetOrDefault(containerID string) cpuset.CPUSet { | |||
s.RLock() |
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.
Can you instead just not lock here?
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.
Yes, that seems a better solution since atomic operation is not needed here.
49d5a93
to
c1b19fc
Compare
Thanks very much for fixing this bug. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: choury, ConnorDoyle 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 |
/test pull-kubernetes-e2e-kops-aws |
/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-kops-aws |
kops tests are temporarily blocking the queue (see #63024) |
/retest Review the full test history for this PR. Silence the bot with an |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
@choury: I created the cherry-pick PRs to the three affected release branches (see links above). |
What this PR does / why we need it:
We met a deadlock when removing pod.
kubelet keeps logging:
After debug, we found it stuck in
SetDefaultCPUSet
here while another goroutine are callingGetCPUSetOrDefault
here.According golang/go#15418, It is not safe to double RLock a RWMutex.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):none
Special notes for your reviewer:
Release note: