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

Nil pointer on build failure recovery #804

Closed
jamesnetherton opened this issue Jul 4, 2019 · 0 comments · Fixed by #805
Closed

Nil pointer on build failure recovery #804

jamesnetherton opened this issue Jul 4, 2019 · 0 comments · Fixed by #805
Assignees
Labels
kind/bug Something isn't working

Comments

@jamesnetherton
Copy link
Contributor

I wanted to simulate a build failure so I did:

$ kamel run --dependency=camel-foobar examples/hello.xml

Which made the operator crash:

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=0x28 pc=0x12c9b56]
goroutine 412 [running]:
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/home/james/go/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x108
panic(0x1490540, 0x245c110)
	/usr/share/go/src/runtime/panic.go:513 +0x1b9
github.com/apache/camel-k/pkg/controller/build.(*errorRecoveryAction).Handle(0xc0005b8500, 0x182ae60, 0xc000042028, 0xc000638480, 0xc00089dc58, 0x1, 0x1)
	/home/james/go/src/github.com/apache/camel-k/pkg/controller/build/recovery.go:100 +0x346
github.com/apache/camel-k/pkg/controller/build.(*ReconcileBuild).Reconcile(0xc000100a80, 0xc00079aca0, 0x9, 0xc000ad4f40, 0x18, 0x24714a0, 0x0, 0x0, 0x0)
	/home/james/go/src/github.com/apache/camel-k/pkg/controller/build/build_controller.go:188 +0x888
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc000317900, 0x0)
	/home/james/go/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215 +0x18f
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1()
	/home/james/go/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158 +0x36
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc00034a0a0)
	/home/james/go/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x54
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc00034a0a0, 0x3b9aca00, 0x0, 0x1, 0xc0005a03c0)
	/home/james/go/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbe
k8s.io/apimachinery/pkg/util/wait.Until(0xc00034a0a0, 0x3b9aca00, 0xc0005a03c0)
	/home/james/go/src/github.com/apache/camel-k/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start
	/home/james/go/src/github.com/apache/camel-k/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x32a

This seems to be the problem. build.Status.Failure wont have been initialized at this point.

@jamesnetherton jamesnetherton added the kind/bug Something isn't working label Jul 4, 2019
jamesnetherton added a commit to jamesnetherton/camel-k that referenced this issue Jul 4, 2019
jamesnetherton added a commit to jamesnetherton/camel-k that referenced this issue Jul 4, 2019
jamesnetherton added a commit to jamesnetherton/camel-k that referenced this issue Jul 4, 2019
jamesnetherton added a commit to jamesnetherton/camel-k that referenced this issue Jul 4, 2019
@jamesnetherton jamesnetherton self-assigned this Jul 5, 2019
lburgazzoli pushed a commit that referenced this issue Jul 6, 2019
ipolyzos pushed a commit to ipolyzos/camel-k that referenced this issue Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant