Skip to content
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

Set stdin to nil for HyperV execs #21021

Closed
wants to merge 1 commit into from

Conversation

mheon
Copy link
Member

@mheon mheon commented Dec 14, 2023

We're seeing a bug where failed Podman commands can hang in the test suite, but somehow un-hang on STDIN activity (e.g. pressing enter). On Brent's vague suspicion that it was related to STDIN, I disabled STDIN on all execs from HyperV, and the hangs disappear. I don't know why this is, or why the hangs happen in the first place, but since this seems to work and should not have any negative consequences that I can think of, here we go.

[NO NEW TESTS NEEDED] I have no idea how to test this one.

Does this PR introduce a user-facing change?

NONE

We're seeing a bug where failed Podman commands can hang in the
test suite, but somehow un-hang on STDIN activity (e.g. pressing
enter). On Brent's vague suspicion that it was related to STDIN,
I disabled STDIN on all execs from HyperV, and the hangs
disappear. I don't know why this is, or why the hangs happen in
the first place, but since this seems to work and should not have
any negative consequences that I can think of, here we go.

[NO NEW TESTS NEEDED] I have no idea how to test this one.

Signed-off-by: Matt Heon <[email protected]>
Copy link
Contributor

openshift-ci bot commented Dec 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mheon

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 14, 2023
@mheon
Copy link
Member Author

mheon commented Dec 14, 2023

/cherry-pick v4.8

For 4.9

@openshift-cherrypick-robot
Copy link
Collaborator

@mheon: once the present PR merges, I will cherry-pick it on top of v4.8 in a new PR and assign it to you.

In response to this:

/cherry-pick v4.8

For 4.9

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.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stdin is nil by default and looking at the source this seems to also be the case for windows. I mean setting it explicitly to nil won't cause harm but I fail to see how this could change the behaviour in any way so I doubt it fixes anything.

@baude
Copy link
Member

baude commented Dec 15, 2023

@n1hility do you mind weighing in ?

@n1hility
Copy link
Member

@baude @mheon hmm this change shouldn't create any effect. In all of these cases exec.Command() is either called directly or indirectly just before, and exec.Command doesn't touch cmd.Stdin. Since all struct values initialize as nil, it already is nil, so all 3 of these should effectively be no-ops.

@mheon
Copy link
Member Author

mheon commented Jan 14, 2024

Doesn't seem like this is necessary, so closing

@mheon mheon closed this Jan 14, 2024
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Apr 15, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants