We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 deref
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0) -- | goroutine 129 [running]: | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x19d03dc] | panic: runtime error: invalid memory address or nil pointer dereference | panic: runtime error: invalid memory address or nil pointer dereference [recovered] | /go/src/github.com/argoproj/argo-workflows/workflow/controller/controller.go:241 +0xfb8 | created by github.com/argoproj/argo-workflows/v3/workflow/controller.(*WorkflowController).Run | /go/pkg/mod/k8s.io/client-go@v0.19.6/tools/leaderelection/leaderelection.go:222 +0x9c | k8s.io/client-go/tools/leaderelection.RunOrDie(0x206d8e0, 0xc00011fc40, 0x2079ce0, 0xc001e20500, 0x37e11d600, 0x2540be400, 0x12a05f200, 0xc0002118c0, 0xc001615c40, 0xc0015efd90, ...) | /go/pkg/mod/k8s.io/client-go@v0.19.6/tools/leaderelection/leaderelection.go:210 +0x15d | k8s.io/client-go/tools/leaderelection.(*LeaderElector).Run(0xc0016b8120, 0x206d8e0, 0xc001c6a100) | /go/pkg/mod/k8s.io/client-go@v0.19.6/tools/leaderelection/leaderelection.go:200 +0x29 | k8s.io/client-go/tools/leaderelection.(*LeaderElector).Run.func1(0xc0016b8120) | /go/src/github.com/argoproj/argo-workflows/workflow/controller/controller.go:256 +0x7c | github.com/argoproj/argo-workflows/v3/workflow/controller.(*WorkflowController).Run.func2() | /usr/local/go/src/runtime/panic.go:969 +0x1b9 | panic(0x1b6fb20, 0x2c9ca80) | /go/pkg/mod/k8s.io/apimachinery@v0.19.6/pkg/util/runtime/runtime.go:48 +0x89 | k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0) | /go/pkg/mod/k8s.io/apimachinery@v0.19.6/pkg/util/runtime/runtime.go:74 +0x95
The text was updated successfully, but these errors were encountered:
OnStoppedLeading: func() { logCtx.Info("stopped leading") cancel() },
cancel is nil.
cancel
Sorry, something went wrong.
Looking at the code, cancel is never set. It is always nil. StopLeading will always panic.
StopLeading
Because we have ReleaseOnCancel, We need
ReleaseOnCancel
ctx, cancel := context.WithCancel(ctx) defer cancel()
As the second line of (wfc *WorkflowController) Run.
(wfc *WorkflowController) Run
sarabala1979
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: