-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[release-1.18] runtime_vm: Ensure closeIOChan is not nil inside CloseStdin's function … #4360
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
[release-1.18] runtime_vm: Ensure closeIOChan is not nil inside CloseStdin's function … #4360
Conversation
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]>
Codecov Report
@@ Coverage Diff @@
## release-1.18 #4360 +/- ##
=============================================
Coverage 38.69% 38.69%
=============================================
Files 106 106
Lines 7941 7941
=============================================
Hits 3073 3073
Misses 4569 4569
Partials 299 299 |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
LGTM |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: openshift-cherrypick-robot, umohnani8 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 |
This is an automated cherry-pick of #4354
/assign fidencio