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 dereference when using DAG target #865

Closed
jessesuen opened this issue May 24, 2018 · 0 comments
Closed

nil pointer dereference when using DAG target #865

jessesuen opened this issue May 24, 2018 · 0 comments
Labels

Comments

@jessesuen
Copy link
Member

Is this a BUG REPORT or FEATURE REQUEST?:

When using the target feature of a DAG template, the following panic is encountered:

time="2018-05-24T09:45:18Z" level=info msg="Updating node dag-diamond-lz84l.C (dag-diamond-lz84l-445793586) status Running -> Succeeded"
time="2018-05-24T09:45:18Z" level=info msg="Updated phase Running -> Error" namespace=default workflow=dag-diamond-lz84l
time="2018-05-24T09:45:18Z" level=info msg="Updated message  -> runtime error: invalid memory address or nil pointer dereference" namespace=default workflow=dag-diamond-lz84l
time="2018-05-24T09:45:18Z" level=info msg="Marking workflow completed" namespace=default workflow=dag-diamond-lz84l
time="2018-05-24T09:45:18Z" level=error msg="Recovered from panic: runtime error: invalid memory address or nil pointer dereference
goroutine 66 [running]:
runtime/debug.Stack(0xc4208e6120, 0x1889680, 0x18e7370)
	/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
github.com/argoproj/argo/workflow/controller.(*wfOperationCtx).operate.func1(0xc4208e6120)
	/root/go/src/github.com/argoproj/argo/workflow/controller/operator.go:108 +0xb5
panic(0x10422c0, 0x18e7370)
	/usr/local/go/src/runtime/panic.go:491 +0x283
github.com/argoproj/argo/workflow/controller.(*wfOperationCtx).processNodeOutputs(0xc4208e6120, 0xc42055f1c0, 0xc420113a64, 0x7, 0x0)
	/root/go/src/github.com/argoproj/argo/workflow/controller/operator.go:1164 +0x5d
github.com/argoproj/argo/workflow/controller.(*wfOperationCtx).executeDAG(0xc4208e6120, 0xc4207d67a0, 0x11, 0xc4203cc780, 0x0, 0x0, 0x0)
	/root/go/src/github.com/argoproj/argo/workflow/controller/dag.go:152 +0x5e1
github.com/argoproj/argo/workflow/controller.(*wfOperationCtx).executeTemplate(0xc4208e6120, 0xc42029e770, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4207d67a0, ...)
	/root/go/src/github.com/argoproj/argo/workflow/controller/operator.go:870 +0x9ca
github.com/argoproj/argo/workflow/controller.(*wfOperationCtx).operate(0xc4208e6120)
	/root/go/src/github.com/argoproj/argo/workflow/controller/operator.go:146 +0x37c
github.com/argoproj/argo/workflow/controller.(*WorkflowController).processNextItem(0xc420408000, 0x82e400)
	/root/go/src/github.com/argoproj/argo/workflow/controller/controller.go:216 +0x27c
github.com/argoproj/argo/workflow/controller.(*WorkflowController).runWorker(0xc420408000)
	/root/go/src/github.com/argoproj/argo/workflow/controller/controller.go:182 +0x2b
github.com/argoproj/argo/workflow/controller.(*WorkflowController).(github.com/argoproj/argo/workflow/controller.runWorker)-fm()
	/root/go/src/github.com/argoproj/argo/workflow/controller/controller.go:149 +0x2a
github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc420264130)
	/root/go/src/github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x5e
github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc420264130, 0x3b9aca00, 0x0, 0x1, 0xc4200661e0)
	/root/go/src/github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbd
github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc420264130, 0x3b9aca00, 0xc4200661e0)
	/root/go/src/github.com/argoproj/argo/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by github.com/argoproj/argo/workflow/controller.(*WorkflowController).Run
	/root/go/src/github.com/argoproj/argo/workflow/controller/controller.go:149 +0x597
" namespace=default workflow=dag-diamond-lz84l

How to reproduce it (as minimally and precisely as possible):

add target: C to the example/dag-diamond.yaml template:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: dag-diamond-
spec:
  entrypoint: diamond
  templates:
  - name: echo
    inputs:
      parameters:
      - name: message
    container:
      image: alpine:3.7
      command: [echo, "{{inputs.parameters.message}}"]
  - name: diamond
    dag:
      target: C     # <<<<<<<<<<< add this
      tasks:
      - name: A
        template: echo
        arguments:
          parameters: [{name: message, value: A}]
      - name: B
        dependencies: [A]
        template: echo
        arguments:
          parameters: [{name: message, value: B}]
      - name: C
        dependencies: [A]
        template: echo
        arguments:
          parameters: [{name: message, value: C}]
      - name: D
        dependencies: [B, C]
        template: echo
        arguments:
          parameters: [{name: message, value: D}]

Environment:

  • Argo version: 2.1.0
icecoffee531 pushed a commit to icecoffee531/argo-workflows that referenced this issue Jan 5, 2022
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

1 participant