Skip to content

Conversation

@liggitt
Copy link
Member

@liggitt 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 k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 12, 2019
@k8s-ci-robot
Copy link
Contributor

[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

Details 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
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 "Looks good to me", indicates that a PR is ready to be merged. label Jan 12, 2019
@k8s-ci-robot k8s-ci-robot merged commit d1e5311 into kubernetes:master Jan 12, 2019
@liggitt liggitt deleted the nil-panic-propagation branch January 13, 2019 06:43
k8s-ci-robot added a commit that referenced this pull request Jan 14, 2019
…6-upstream-release-1.12

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

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

k8s-ci-robot added a commit that referenced this pull request Jan 14, 2019
…6-upstream-release-1.13

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

/cc @jpbetz

@k8s-ci-robot k8s-ci-robot requested a review from jpbetz January 14, 2019 21:09
@jpbetz
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
…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
…6-upstream-release-1.11

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

So how about cherry-picking this to release 1.12?

@liggitt
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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apiserver returns 0-length responses

8 participants