-
Notifications
You must be signed in to change notification settings - Fork 42.1k
Fix nil panic propagation #72856
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
Conversation
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm w00t!!! Thanks for all your help @liggitt |
…6-upstream-release-1.12 Automated cherry pick of #72856: Fix nil panic propagation
…6-upstream-release-1.13 Automated cherry pick of #72856: Fix nil panic propagation
|
/cc @jpbetz |
…6-upstream-release-1.10 Automated cherry pick of #72856: Fix nil panic propagation
…6-upstream-release-1.11 Automated cherry pick of #72856: Fix nil panic propagation
|
So how about cherry-picking this to release 1.12? |
already done: #72858 |
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?:
/assign @dims @sttts
/sig api-machinery
/kind bug
/priority critical-urgent