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

synchronize exec combined output buffer when necessary #972

Merged
merged 1 commit into from
Oct 20, 2019

Conversation

BenTheElder
Copy link
Member

When we execute things in kind we capture the output in case of an error and provide this when debugging. This is very handy, but had a nasty bug, xref: #971.

When cmd.Stdout == cmd.Stderr, go will set up a single fd passed to the underyling process, and single io.Copy goroutine will be used for that fd. This makes it safe to share a buffer between cmd.Stdout and cmd.Stderr IFF cmd.Stdout == cmd.Stderr.

When this is not the case, we need to synchronize writes to the combined output buffer.

See:

fixes: #971

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 20, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 20, 2019
@BenTheElder
Copy link
Member Author

/priority critical-urgent
/kind bug

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. kind/bug Categorizes issue or PR as related to a bug. labels Oct 20, 2019
@BenTheElder BenTheElder mentioned this pull request Oct 20, 2019
@BenTheElder
Copy link
Member Author

IPv6 e2e flakes
/test pull-kind-conformance-parallel-ipv6

@aojea
Copy link
Contributor

aojea commented Oct 20, 2019

nice catch and thanks to @liggitt for keep finding occurrences
/lgtm

the ipv6 flakes show errors with some application holding the lock, I'm trying to investigate more

@BenTheElder BenTheElder added this to the v0.6.0 milestone Oct 20, 2019
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 20, 2019
@BenTheElder
Copy link
Member Author

the ipv6 flakes show errors with some application holding the lock, I'm trying to investigate more

[iptables, on the node, not the lock we introduced here]

@k8s-ci-robot k8s-ci-robot merged commit 44ac1f7 into kubernetes-sigs:master Oct 20, 2019
@BenTheElder BenTheElder deleted the facepalm branch October 20, 2019 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic in exec
3 participants