-
Notifications
You must be signed in to change notification settings - Fork 1.1k
runtime_vm: Ensure closeIOChan is not nil inside CloseStdin's function … #4354
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
runtime_vm: Ensure closeIOChan is not nil inside CloseStdin's function … #4354
Conversation
|
/area-vm |
832d7e9 to
7c384c0
Compare
This patch fixes the situation of `kubectl cp` hanging forever. Debugging this issue I've faced a quite interesting situatuon where after `closeIOChan` is closed, the `CloseStdin` functions "resumes" while `closeIOChan` is **nil**, making the function to sit there and wait forever. Honestly, this bugs my mind quite a bit as I was under the impression that all the everyone waiting for the channel to be closed would be notified, would consume its content, and only after that it'd be nullified. Well, Today I learnt. The simplest and more future proof way to work this issue around is to ensure `closeIOChan` is not **nil** inside CloseStdin's function. Thanks to @liubin, @haircommander, and @r4f4 for being available to discuss the issue. Fixes: cri-o#4353 Signed-off-by: Fabiano Fidêncio <[email protected]>
7c384c0 to
6e897b8
Compare
|
@haircommander, updated in order to keep the |
Codecov Report
@@ Coverage Diff @@
## master #4354 +/- ##
=======================================
Coverage 39.36% 39.36%
=======================================
Files 112 112
Lines 8825 8825
=======================================
Hits 3474 3474
Misses 4965 4965
Partials 386 386 |
saschagrunert
left a comment
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fidencio, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/test e2e-aws |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/retest |
|
LGTM |
|
/retest |
1 similar comment
|
/retest |
|
/cherry-pick release-1.19 |
|
/cherry-pick release-1.18 |
|
@fidencio: new pull request created: #4359 DetailsIn 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. |
|
@fidencio: new pull request created: #4360 DetailsIn 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. |
|
@fidencio: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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 understand the commands that are listed here. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This patch fixes the situation of
kubectl cphanging forever.Debugging this issue I've faced a quite interesting situatuon where after
closeIOChanis closed, theCloseStdinfunctions "resumes" whilecloseIOChanis nil, making the function to sit there and wait forever.Honestly, this bugs my mind quite a bit as I was under the impression that all the everyone waiting for the channel to be closed would be notified, would consume its content, and only after that it'd be nullified. Well, Today I learnt.
The simplest and more future proof way to work this issue around is to ensure
closeIOChanis not nil inside CloseStdin's function.Thanks to @liubin, @haircommander, and @r4f4 for being available to discuss the issue.
Which issue(s) this PR fixes:
Fixes #4353
Special notes for your reviewer:
Does this PR introduce a user-facing change?