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

Sync error : invalid memory address when set an invalid apiVersion version #21256

Open
YvesZelros opened this issue Dec 19, 2024 · 0 comments
Open
Labels
bug Something isn't working component:application-controller version:2.13 Latest confirmed affected version is 2.13

Comments

@YvesZelros
Copy link

Describe the bug

Sync error with "runtime error: invalid memory address or nil pointer dereference"

To Reproduce

Issue occur after on a commit that change an apiVersion on EnvoyFilter objects to an invalid version regarding the crd.

-apiVersion: networking.istio.io/v1alpha3
+apiVersion: networking.istio.io/v1
 kind: EnvoyFilter

Version

2.13.1 & v2.13.2+dc43124

Logs

Recovered from panic: runtime error: invalid memory address or nil pointer dereference
goroutine 216 [running]:
runtime/debug.Stack()
\t/usr/local/go/src/runtime/debug/stack.go:26 +0x5e
github.com/argoproj/argo-cd/v2/controller.(*ApplicationController).processAppRefreshQueueItem.func1()
\t/go/src/github.com/argoproj/argo-cd/controller/appcontroller.go:1552 +0x54
panic({0x3d7f860?, 0x8075fb0?})
\t/usr/local/go/src/runtime/panic.go:785 +0x132
github.com/argoproj/argo-cd/v2/util/argo/managedfields.newTypedResults(0xc0152b28b0?, 0xc0152b28f0, 0x0)
\t/go/src/github.com/argoproj/argo-cd/util/argo/managedfields/managed_fields.go:98 +0x2a
github.com/argoproj/argo-cd/v2/util/argo/managedfields.Normalize(0xc0152b28b8, 0xc0152b28b0, {0xc02d2f2040, 0x1, 0xc024645d90?}, 0x0)
\t/go/src/github.com/argoproj/argo-cd/util/argo/managedfields/managed_fields.go:34 +0xab
github.com/argoproj/argo-cd/v2/util/argo/diff.preDiffNormalize({0xc000e6a008, 0x116, 0x274cd27fe95b?}, {0xc02c996008, 0x116, 0xc1d112646ae195ed?}, {0x5a18fe0, 0xc041137200})
\t/go/src/github.com/argoproj/argo-cd/util/argo/diff/diff.go:436 +0x571
github.com/argoproj/argo-cd/v2/util/argo/diff.StateDiffs({0xc000e6a008?, 0x4609917?, 0x46230b0?}, {0xc02c996008?, 0xc038939180?, 0x6?}, {0x5a18fe0, 0xc041137200})
\t/go/src/github.com/argoproj/argo-cd/util/argo/diff/diff.go:300 +0x45
github.com/argoproj/argo-cd/v2/controller.(*appStateManager).CompareAppState(0xc000ae62a0, 0xc068e2d408, 0xc000baefc8, {0xc029320fe0, 0x1, 0x1}, {0xc03c74c310, 0x1, 0x1}, 0x0, ...)
\t/go/src/github.com/argoproj/argo-cd/controller/state.go:715 +0x3c6d
github.com/argoproj/argo-cd/v2/controller.(*ApplicationController).processAppRefreshQueueItem(0xc000e588c0)
\t/go/src/github.com/argoproj/argo-cd/controller/appcontroller.go:1672 +0x14f3
github.com/argoproj/argo-cd/v2/controller.(*ApplicationController).Run.func3()
\t/go/src/github.com/argoproj/argo-cd/controller/appcontroller.go:879 +0x25
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x30?)
\t/go/pkg/mod/k8s.io/apimachinery@v0.31.0/pkg/util/wait/backoff.go:226 +0x33
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc000925b60, {0x59a9fa0, 0xc001baa4e0}, 0x1, 0xc00120c0e0)
\t/go/pkg/mod/k8s.io/apimachinery@v0.31.0/pkg/util/wait/backoff.go:227 +0xaf
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000925b60, 0x3b9aca00, 0x0, 0x1, 0xc00120c0e0)
\t/go/pkg/mod/k8s.io/apimachinery@v0.31.0/pkg/util/wait/backoff.go:204 +0x7f
k8s.io/apimachinery/pkg/util/wait.Until(...)
\t/go/pkg/mod/k8s.io/apimachinery@v0.31.0/pkg/util/wait/backoff.go:161
created by github.com/argoproj/argo-cd/v2/controller.(*ApplicationController).Run in goroutine 37
\t/go/src/github.com/argoproj/argo-cd/controller/appcontroller.go:878 +0x7cc

@YvesZelros YvesZelros added the bug Something isn't working label Dec 19, 2024
@YvesZelros YvesZelros changed the title Sync error : invalid memory when set an invalid apiVersion version Sync error : invalid memory address when set an invalid apiVersion version Dec 19, 2024
@andrii-korotkov-verkada andrii-korotkov-verkada added version:2.13 Latest confirmed affected version is 2.13 component:application-controller labels Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:application-controller version:2.13 Latest confirmed affected version is 2.13
Projects
None yet
Development

No branches or pull requests

2 participants