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

panic: runtime error after golang update #149

Closed
oleksandrsemak opened this issue Mar 17, 2020 · 1 comment
Closed

panic: runtime error after golang update #149

oleksandrsemak opened this issue Mar 17, 2020 · 1 comment
Milestone

Comments

@oleksandrsemak
Copy link

Hello previous image flant/shell-operator:latest works fine after update pod throw error.

kubectl version:

Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:14:22Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.10+IKS", GitCommit:"18e8565daf60eb3a20c0ac29a7d3a93622659e4d", GitTreeState:"clean", BuildDate:"2020-01-16T04:08:27Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

After update image flant/shell-operator: latest i got:

{"level":"info","msg":"shell-operator master-3ab0bc97-ubuntu-2020.03.16_06:26:46","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"Listen on 0.0.0.0:9115","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"Hooks dir: /hooks","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"Use temporary dir: /tmp/shell-operator","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"Debug endpoint listen on /var/run/shell-operator/debug.socket","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"Kubernetes client is configured successfully with 'out-of-cluster' config","operator.component":"KubernetesAPIClient","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"Initialize hooks manager. Search for and load all hooks.","time":"2020-03-17T01:42:33Z"}
{"hook":"hook.sh","level":"info","msg":"Load config from '/hooks/hook.sh'","phase":"config","time":"2020-03-17T01:42:33Z"}
{"hook":"hook.sh","level":"info","msg":"Loaded config: OnStartup:1, Watch k8s kinds: 'Node'","phase":"config","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"start shell-operator","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"add HookRun@OnStartup tasks for 1 hooks","operator.component":"initMainQueue","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"queue task EnableKubernetesBindings: with hook hook.sh","operator.component":"initMainQueue","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"Create new metric shell_operator_shell_operator_live_ticks","operator.component":"metricsStorage","time":"2020-03-17T01:42:33Z"}
{"binding":"onStartup","hook":"hook.sh","level":"info","msg":"Execute hook","operator.component":"taskRunner","queue":"","task":"HookRun","time":"2020-03-17T01:42:33Z"}
{"level":"info","msg":"Create new metric shell_operator_shell_operator_tasks_queue_length","operator.component":"metricsStorage","time":"2020-03-17T01:42:33Z"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12915d4]

goroutine 27 [running]:
github.com/flant/shell-operator/pkg/task/queue.(*TaskQueue).Iterate(0x0, 0xc0006818f0)
	/src/shell-operator/pkg/task/queue/task_queue.go:364 +0x34
github.com/flant/shell-operator/pkg/shell-operator.(*ShellOperator).CombineBingingContextForHook(0xc000195ea0, 0x19d7be0, 0xc0000a9920, 0x1)
	/src/shell-operator/pkg/shell-operator/operator.go:363 +0x1fc
github.com/flant/shell-operator/pkg/shell-operator.(*ShellOperator).TaskHandler(0xc000195ea0, 0x19d7be0, 0xc0000a9920, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/src/shell-operator/pkg/shell-operator/operator.go:285 +0xc4a
github.com/flant/shell-operator/pkg/task/queue.(*TaskQueue).Start.func1(0xc0005606c0)
	/src/shell-operator/pkg/task/queue/task_queue.go:292 +0x396
created by github.com/flant/shell-operator/pkg/task/queue.(*TaskQueue).Start
	/src/shell-operator/pkg/task/queue/task_queue.go:271 +0x4f

rollback to tag v1.0.0-beta.8 fixed this issue.

@diafour
Copy link
Contributor

diafour commented Mar 18, 2020

The bug was in #144. The compaction may start for a nonexistent queue. This is fixed in #150.

@diafour diafour closed this as completed Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants