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

Setting --update-state=false for the Ingress Controller results in a panic #232

Closed
stackedsax opened this issue Jan 28, 2019 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@stackedsax
Copy link

Summary

When I added the setting --update-state=false to the Ingress Controller's startup args, the controller would not start up. The logs emit a large stacktrace.

Kong Ingress controller version

  Release:    0.3.0
  Build:      git-d429f2ec

Kong or Kong Enterprise version
CE 1.0

Kubernetes version

Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.2", GitCommit:"cff46ab41ff0bb44d8584413b598ad8360ec1def", GitTreeState:"clean", BuildDate:"2019-01-13T23:15:13Z", GoVersion:"go1.11.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.5-gke.5", GitCommit:"9aba9c1237d9d2347bef28652b93b1cba3aca6d8", GitTreeState:"clean", BuildDate:"2018-12-11T02:36:50Z", GoVersion:"go1.10.3b4", Compiler:"gc", Platform:"linux/amd64"}

Environment

  • Cloud provider or hardware configuration: GKE
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened

I changed the update-state setting and got an error when starting the controller.

Expected behavior

The controller should start up and not error

Steps To Reproduce

  1. In the ingress controller deployment definition, add - --update-state=false to the argument list
  2. kubectl install kong-ingress-controller.yaml
  3. kubectl logs kong-controller-6946f9b9cf-h2px9 -c ingress-controller -f
  4. Observe the following stack trace:
E0128 04:59:53.524662       6 runtime.go:66] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:72
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51
/usr/local/Cellar/go/1.11.4/libexec/src/runtime/asm_amd64.s:522
/usr/local/Cellar/go/1.11.4/libexec/src/runtime/panic.go:513
/usr/local/Cellar/go/1.11.4/libexec/src/runtime/panic.go:82
/usr/local/Cellar/go/1.11.4/libexec/src/runtime/signal_unix.go:390
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/ingress/controller/controller.go:108
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/ingress/controller/run.go:80
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/task/queue.go:112
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/task/queue.go:59
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88
/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/task/queue.go:59
/usr/local/Cellar/go/1.11.4/libexec/src/runtime/asm_amd64.s:1333
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=0x18 pc=0x10e845f]

goroutine 129 [running]:
github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x108
panic(0x12b6b40, 0x223b9d0)
	/usr/local/Cellar/go/1.11.4/libexec/src/runtime/panic.go:513 +0x1b9
github.com/kong/kubernetes-ingress-controller/internal/ingress/controller.(*NGINXController).syncIngress(0xc0000e47e0, 0x1322bc0, 0xc00036a8a0, 0xc01f441f3a, 0x58df13c8)
	/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/ingress/controller/controller.go:108 +0x7f
github.com/kong/kubernetes-ingress-controller/internal/ingress/controller.(*NGINXController).syncIngress-fm(0x1322bc0, 0xc00036a8a0, 0xa, 0xc000592dd8)
	/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/ingress/controller/run.go:80 +0x3e
github.com/kong/kubernetes-ingress-controller/internal/task.(*Queue).worker(0xc0002aa510)
	/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/task/queue.go:112 +0x2de
github.com/kong/kubernetes-ingress-controller/internal/task.(*Queue).worker-fm()
	/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/task/queue.go:59 +0x2a
github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc000308fa8)
	/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x54
github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000592fa8, 0x3b9aca00, 0x0, 0xc000097301, 0xc00007f080)
	/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbe
github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc000308fa8, 0x3b9aca00, 0xc00007f080)
	/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
github.com/kong/kubernetes-ingress-controller/internal/task.(*Queue).Run(0xc0002aa510, 0x3b9aca00, 0xc00007f080)
	/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/task/queue.go:59 +0x5d
created by github.com/kong/kubernetes-ingress-controller/internal/ingress/controller.(*NGINXController).Start
	/Users/harry/go/src/github.com/kong/kubernetes-ingress-controller/internal/ingress/controller/run.go:147 +0xe6

This happens to be very similar to the error noted in issue #57. However, I don't think it's the same cause so I opened a new issue.

Interestingly, the update-status flag is recognized a little earlier in the log:

I0128 04:59:52.322285       6 main.go:166] kong version: 1.0.0
W0128 04:59:52.323344       6 run.go:98] Update of ingress status is disabled (flag --update-status=false was specified)
I0128 04:59:52.323609       6 run.go:139] starting Ingress controller
@hbagdi hbagdi added the bug Something isn't working label Mar 8, 2019
@hbagdi hbagdi closed this as completed in 9eb994e Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants