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

Fix nil-pointer on accessing condition in autoscaler #9794

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

markusthoemmes
Copy link
Contributor

Proposed Changes

Seen in the wild as

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x17b7be5]

goroutine 156 [running]:
knative.dev/serving/pkg/reconciler/autoscaling/kpa.(*Reconciler).ReconcileKind(0xc00066d6b0, 0x2030d40, 0xc001767c50, 0xc0017026c0, 0x1ff71a0, 0xc001702878)
	/go/src/knative.dev/serving/pkg/reconciler/autoscaling/kpa/kpa.go:151 +0x1335
knative.dev/serving/pkg/client/injection/reconciler/autoscaling/v1alpha1/podautoscaler.(*reconcilerImpl).Reconcile(0xc0003f5130, 0x2030d40, 0xc001767bc0, 0xc0024d6150, 0x21, 0xc001686db0, 0x2030d40)
	/go/src/knative.dev/serving/pkg/client/injection/reconciler/autoscaling/v1alpha1/podautoscaler/reconciler.go:253 +0x146c
knative.dev/pkg/controller.(*Impl).processNextWorkItem(0xc0006b01c0, 0x0)
	/go/src/knative.dev/serving/vendor/knative.dev/pkg/controller/controller.go:511 +0x728
knative.dev/pkg/controller.(*Impl).RunContext.func3(0xc0016e1860, 0xc0006b01c0)
	/go/src/knative.dev/serving/vendor/knative.dev/pkg/controller/controller.go:449 +0x53
created by knative.dev/pkg/controller.(*Impl).RunContext
	/go/src/knative.dev/serving/vendor/knative.dev/pkg/controller/controller.go:447 +0x1f5

Release Note

Fixed a rare nil-pointer exception in the autoscaler

/assign @julz @vagababov

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Oct 13, 2020
@knative-prow-robot knative-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 13, 2020
@knative-prow-robot knative-prow-robot added area/API API objects and controllers area/autoscale approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 13, 2020
Copy link
Member

@julz julz left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: julz, markusthoemmes

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

@codecov
Copy link

codecov bot commented Oct 13, 2020

Codecov Report

Merging #9794 into master will decrease coverage by 0.02%.
The diff coverage is 63.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9794      +/-   ##
==========================================
- Coverage   87.77%   87.74%   -0.03%     
==========================================
  Files         180      180              
  Lines        8499     8553      +54     
==========================================
+ Hits         7460     7505      +45     
- Misses        791      798       +7     
- Partials      248      250       +2     
Impacted Files Coverage Δ
cmd/activator/main.go 0.00% <0.00%> (ø)
cmd/autoscaler/main.go 13.13% <0.00%> (-0.14%) ⬇️
pkg/queue/health/probe.go 93.93% <ø> (ø)
cmd/queue/main.go 0.51% <50.00%> (+0.51%) ⬆️
...g/apis/serving/v1alpha1/domainmapping_lifecycle.go 70.58% <64.28%> (+3.92%) ⬆️
pkg/apis/serving/v1/revision_validation.go 80.00% <66.66%> (+2.22%) ⬆️
pkg/reconciler/domainmapping/reconciler.go 85.00% <66.66%> (+13.12%) ⬆️
pkg/autoscaler/statforwarder/forwarder.go 81.18% <68.18%> (-3.12%) ⬇️
pkg/activator/net/lb_policy.go 91.17% <100.00%> (ø)
pkg/apis/serving/v1/configuration_validation.go 100.00% <100.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfd1074...4e8dcc8. Read the comment docs.

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/API API objects and controllers area/autoscale cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. 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.

4 participants