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

Set globalResync function for KafkaChannel reconciler #4098

Conversation

pierDipi
Copy link
Member

Fix for panic

k8s.io/apimachinery/pkg/util/runtime.logPanic({0x1f9a4c0, 0x3a9fbb0})
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:75 +0x85
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc000ec6380?})
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:49 +0x6b
panic({0x1f9a4c0?, 0x3a9fbb0?})
	/usr/lib/golang/src/runtime/panic.go:770 +0x132
knative.dev/eventing-kafka-broker/control-plane/pkg/reconciler/channel.NewController.HandleAll.PassNew.func12({0x4?, 0x23?}, {0x22c8200?, 0xc0033a2000?})
	/go/src/github.com/openshift/origin/vendor/knative.dev/pkg/controller/controller.go:76 +0x1c
k8s.io/client-go/tools/cache.ResourceEventHandlerFuncs.OnUpdate(...)
	/go/src/github.com/openshift/origin/vendor/k8s.io/client-go/tools/cache/controller.go:246
k8s.io/client-go/tools/cache.FilteringResourceEventHandler.OnUpdate({0xc000669470?, {0x269eb70?, 0xc0005cd248?}}, {0x22c8200, 0xc0059745a0}, {0x22c8200, 0xc0033a2000})
	/go/src/github.com/openshift/origin/vendor/k8s.io/client-go/tools/cache/controller.go:311 +0xdc
k8s.io/client-go/tools/cache.(*processorListener).run.func1()
	/go/src/github.com/openshift/origin/vendor/k8s.io/client-go/tools/cache/shared_informer.go:970 +0xea
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x30?)
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:226 +0x33
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc0044e3f70, {0x268b2c0, 0xc000e85500}, 0x1, 0xc000e8d5c0)
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:227 +0xaf
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000ec0f70, 0x3b9aca00, 0x0, 0x1, 0xc000e8d5c0)
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:204 +0x7f
k8s.io/apimachinery/pkg/util/wait.Until(...)
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:161
k8s.io/client-go/tools/cache.(*processorListener).run(0xc0006485a0)
	/go/src/github.com/openshift/origin/vendor/k8s.io/client-go/tools/cache/shared_informer.go:966 +0x69
k8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1()
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:72 +0x52
created by k8s.io/apimachinery/pkg/util/wait.(*Group).Start in goroutine 326
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:70 +0x73
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1cdbc1c]

Fix for panic
```
k8s.io/apimachinery/pkg/util/runtime.logPanic({0x1f9a4c0, 0x3a9fbb0})
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:75 +0x85
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc000ec6380?})
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:49 +0x6b
panic({0x1f9a4c0?, 0x3a9fbb0?})
	/usr/lib/golang/src/runtime/panic.go:770 +0x132
knative.dev/eventing-kafka-broker/control-plane/pkg/reconciler/channel.NewController.HandleAll.PassNew.func12({0x4?, 0x23?}, {0x22c8200?, 0xc0033a2000?})
	/go/src/github.com/openshift/origin/vendor/knative.dev/pkg/controller/controller.go:76 +0x1c
k8s.io/client-go/tools/cache.ResourceEventHandlerFuncs.OnUpdate(...)
	/go/src/github.com/openshift/origin/vendor/k8s.io/client-go/tools/cache/controller.go:246
k8s.io/client-go/tools/cache.FilteringResourceEventHandler.OnUpdate({0xc000669470?, {0x269eb70?, 0xc0005cd248?}}, {0x22c8200, 0xc0059745a0}, {0x22c8200, 0xc0033a2000})
	/go/src/github.com/openshift/origin/vendor/k8s.io/client-go/tools/cache/controller.go:311 +0xdc
k8s.io/client-go/tools/cache.(*processorListener).run.func1()
	/go/src/github.com/openshift/origin/vendor/k8s.io/client-go/tools/cache/shared_informer.go:970 +0xea
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x30?)
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:226 +0x33
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc0044e3f70, {0x268b2c0, 0xc000e85500}, 0x1, 0xc000e8d5c0)
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:227 +0xaf
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000ec0f70, 0x3b9aca00, 0x0, 0x1, 0xc000e8d5c0)
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:204 +0x7f
k8s.io/apimachinery/pkg/util/wait.Until(...)
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go:161
k8s.io/client-go/tools/cache.(*processorListener).run(0xc0006485a0)
	/go/src/github.com/openshift/origin/vendor/k8s.io/client-go/tools/cache/shared_informer.go:966 +0x69
k8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1()
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:72 +0x52
created by k8s.io/apimachinery/pkg/util/wait.(*Group).Start in goroutine 326
	/go/src/github.com/openshift/origin/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:70 +0x73
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1cdbc1c]
```

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 13, 2024
@pierDipi
Copy link
Member Author

/cherry-pick release-1.15

@knative-prow-robot
Copy link
Contributor

@pierDipi: once the present PR merges, I will cherry-pick it on top of release-1.15 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 48.55%. Comparing base (76e67cd) to head (ae8d245).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
control-plane/pkg/reconciler/channel/controller.go 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4098      +/-   ##
==========================================
- Coverage   48.55%   48.55%   -0.01%     
==========================================
  Files         244      244              
  Lines       14825    14827       +2     
==========================================
  Hits         7199     7199              
- Misses       6912     6913       +1     
- Partials      714      715       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pierDipi
Copy link
Member Author

/retest

Copy link
Contributor

@creydr creydr left a comment

Choose a reason for hiding this comment

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

/lgtm

@@ -123,6 +124,10 @@ func NewController(ctx context.Context, watcher configmap.Watcher, configs *conf
}
})

globalResync = func(obj interface{}) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
globalResync = func(obj interface{}) {
globalResync = func(_ interface{}) {

nit to fix linter.

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 16, 2024
Copy link

knative-prow bot commented Sep 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, pierDipi

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

@pierDipi
Copy link
Member Author

/test upgrade-tests

3 similar comments
@pierDipi
Copy link
Member Author

/test upgrade-tests

@pierDipi
Copy link
Member Author

/test upgrade-tests

@Cali0707
Copy link
Member

/test upgrade-tests

@knative-prow knative-prow bot merged commit 8b4b0dd into knative-extensions:main Sep 16, 2024
35 of 37 checks passed
@knative-prow-robot
Copy link
Contributor

@pierDipi: new pull request created: #4100

In response to this:

/cherry-pick release-1.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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/control-plane 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