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

Usage of skipRecreate causes pods Crash loops with Go Panic #1151

Closed
tewfik-ghariani opened this issue Mar 19, 2023 · 4 comments
Closed

Usage of skipRecreate causes pods Crash loops with Go Panic #1151

tewfik-ghariani opened this issue Mar 19, 2023 · 4 comments
Labels

Comments

@tewfik-ghariani
Copy link
Contributor

Which component:
controller

Describe the bug
Hii! Thanks a lot for adding the skipRecreate flag per #1118

However, after enabling it, the controller pod unfortunately fell into a crash loop with the following Go panic

2023/03/19 21:23:15 Starting sealed-secrets controller version: 0.20.1
2023/03/19 21:23:15 Searching for existing private keys
2023/03/19 21:23:15 ----- sealed-secrets-pub-key-15465
E0319 21:23:15.188417       1 runtime.go:79] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 127 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic({0x1731ec0?, 0x27ee9d0})
	/home/runner/go/pkg/mod/k8s.io/apimachinery@v0.26.2/pkg/util/runtime/runtime.go:75 +0x99
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0x0?})
	/home/runner/go/pkg/mod/k8s.io/apimachinery@v0.26.2/pkg/util/runtime/runtime.go:49 +0x75
panic({0x1731ec0, 0x27ee9d0})
	/opt/hostedtoolcache/go/1.19.4/x64/src/runtime/panic.go:884 +0x212
github.com/bitnami-labs/sealed-secrets/pkg/controller.(*Controller).Run(0xc00014a230, 0xc000152660)
	/home/runner/work/sealed-secrets/sealed-secrets/pkg/controller/controller.go:210 +0x136
created by github.com/bitnami-labs/sealed-secrets/pkg/controller.Main
	/home/runner/work/sealed-secrets/sealed-secrets/pkg/controller/main.go:210 +0x445
2023/03/19 21:23:15 HTTP server serving on :8080
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=0x1568256]

goroutine 127 [running]:
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0x0?})
	/home/runner/go/pkg/mod/k8s.io/apimachinery@v0.26.2/pkg/util/runtime/runtime.go:56 +0xd7
panic({0x1731ec0, 0x27ee9d0})
	/opt/hostedtoolcache/go/1.19.4/x64/src/runtime/panic.go:884 +0x212
github.com/bitnami-labs/sealed-secrets/pkg/controller.(*Controller).Run(0xc00014a230, 0xc000152660)
	/home/runner/work/sealed-secrets/sealed-secrets/pkg/controller/controller.go:210 +0x136
created by github.com/bitnami-labs/sealed-secrets/pkg/controller.Main
	/home/runner/work/sealed-secrets/sealed-secrets/pkg/controller/main.go:210 +0x445

I tried to troubleshoot it a bit but no luck

To Reproduce
Steps to reproduce the behavior:

  1. Start the controller with the --skip-recreate flag
  2. See error

Expected behavior
The controller should start without a Go panic

Version of Kubernetes:

  • Output of kubectl version:
v1.24.10
@alemorcuq
Copy link
Collaborator

Thanks for reporting this, @tewfik-ghariani. We are looking into this.

@alemorcuq
Copy link
Collaborator

I've reproduced the issue. I'm working on a fix and then we will release a new bugfix version.

@alemorcuq alemorcuq added bug and removed triage Issues/PRs that need to be reviewed labels Mar 20, 2023
@alemorcuq
Copy link
Collaborator

Controller v0.20.2 and chart v2.8.1 were released. Thanks again for reporting this, @tewfik-ghariani.

@tewfik-ghariani
Copy link
Contributor Author

Thank you so much for the quick fix, that is really appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants