-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
WIP: fix deadlock between play kube and cleanup #14969
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tyler92 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This is my idea how to fix #14921. Actually in my tests this change works properly. But I'm no very familiar with Podman's code and maybe this is incorrect approach from architecture point of view. Please let me known if this PR make sense or we should reject it. |
ddcc796
to
ba7a72b
Compare
/release-note-none |
What is the reproducer for the issue? I tried with the reproducer for #14929 but I still see deadlock. |
#14929 and #14921 look like different issues. Steps to reproduce this PR:
|
I don't like this because it serializes cleanups across the pod, which could have perf implications. I'm trying to track down exactly where Cleanup locks the pod, thus far without success, to make a more precise fix. |
Look at @giuseppe's analysis in #14929 (comment). It is the very same problem.
|
There was a deadlock between two concurrent processes: play kube and cleanup, that is called after container exit when RestartPolicy is used. Before the fix, the cleanup command didn't lock Pod's lock, so there was a possibility of obtaining two locks in different order in two processes. [NO NEW TESTS NEEDED] Closes containers#14921 Signed-off-by: Mikhail Khachayants <[email protected]>
ba7a72b
to
e7dfdba
Compare
A little bit tungled way: Container.Cleanup locks container ->
I agree with you, so please consider my PR as just an idea of potential fix. |
I think we need to solve the problem in |
@tyler92 |
I think I will close this, as it is fixed. |
There was a deadlock between two concurrent processes: play kube and cleanup,
that is called after container exit when RestartPolicy is used. Before the fix,
the cleanup command didn't lock Pod's lock, so there was a possibility of
obtaining two locks in different order in two processes.
[NO NEW TESTS NEEDED]
Closes #14921
Signed-off-by: Mikhail Khachayants [email protected]
Does this PR introduce a user-facing change?