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

Fix nil panic propagation #72856

Merged
merged 1 commit into from Jan 12, 2019

Conversation

@liggitt
Copy link
Member

liggitt commented Jan 12, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
https://github.com/kubernetes/kubernetes/pull/71076/files#diff-390e9c6b4af51b3a3723c78f40b0e134 introduced a bug in which nil could be sent to the rest panic-propagating channel.

When the response actually did panic, this code worked properly.

When the response did not panic, it would send nil, racing the err and result channels. When the panic-propagating channel won the race, a nil panic would be thrown. This would short-circuit all response writing, resulting in no content type and no status code, but maddeningly, would not be logged (because the object sent to panic was nil).

Which issue(s) this PR fixes:
Fixes #71696

Special notes for your reviewer:
@dims is a hero for tracking this down.

Does this PR introduce a user-facing change?:

Fixes spurious 0-length API responses.

/assign @dims @sttts
/sig api-machinery
/kind bug
/priority critical-urgent

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jan 12, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt

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

@dims

This comment has been minimized.

Copy link
Member

dims commented Jan 12, 2019

/lgtm

w00t!!! Thanks for all your help @liggitt

@k8s-ci-robot k8s-ci-robot added the lgtm label Jan 12, 2019

@k8s-ci-robot k8s-ci-robot merged commit d1e5311 into kubernetes:master Jan 12, 2019

18 checks passed

cla/linuxfoundation liggitt authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-e2e-kubeadm-gce Skipped
pull-kubernetes-godeps Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
tide In merge pool.
Details

@liggitt liggitt deleted the liggitt:nil-panic-propagation branch Jan 13, 2019

k8s-ci-robot added a commit that referenced this pull request Jan 14, 2019

Merge pull request #72858 from liggitt/automated-cherry-pick-of-#7285…
…6-upstream-release-1.12

Automated cherry pick of #72856: Fix nil panic propagation
@wojtek-t

This comment has been minimized.

Copy link
Member

wojtek-t commented Jan 14, 2019

@liggitt @dims - thanks a lot for debugging and fixing that!

k8s-ci-robot added a commit that referenced this pull request Jan 14, 2019

Merge pull request #72857 from liggitt/automated-cherry-pick-of-#7285…
…6-upstream-release-1.13

Automated cherry pick of #72856: Fix nil panic propagation
@fedebongio

This comment has been minimized.

Copy link
Contributor

fedebongio commented Jan 14, 2019

/cc @jpbetz

@k8s-ci-robot k8s-ci-robot requested a review from jpbetz Jan 14, 2019

@jpbetz

This comment has been minimized.

Copy link
Contributor

jpbetz commented Jan 15, 2019

You found it! Impressive work @liggitt and @dims! Thank you!

k8s-ci-robot added a commit that referenced this pull request Jan 16, 2019

Merge pull request #72860 from liggitt/automated-cherry-pick-of-#7285…
…6-upstream-release-1.10

Automated cherry pick of #72856: Fix nil panic propagation

k8s-ci-robot added a commit that referenced this pull request Jan 17, 2019

Merge pull request #72859 from liggitt/automated-cherry-pick-of-#7285…
…6-upstream-release-1.11

Automated cherry pick of #72856: Fix nil panic propagation
@MikeSpreitzer

This comment has been minimized.

Copy link
Member

MikeSpreitzer commented Feb 5, 2019

So how about cherry-picking this to release 1.12?

@liggitt

This comment has been minimized.

Copy link
Member Author

liggitt commented Feb 5, 2019

So how about cherry-picking this to release 1.12?

already done: #72858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment