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

PipelineRun with pipelineSpecs panics #1785

Closed
chmouel opened this issue Dec 23, 2019 · 2 comments · Fixed by #1852
Closed

PipelineRun with pipelineSpecs panics #1785

chmouel opened this issue Dec 23, 2019 · 2 comments · Fixed by #1852
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@chmouel
Copy link
Member

chmouel commented Dec 23, 2019

Expected Behavior

An error or a working state

Actual Behavior

A crash :

Crash log
{"level":"info","logger":"tekton","caller":"metrics/prometheus_exporter.go:37","msg":"Created Opencensus Prometheus exporter with config: &{tekton.dev/pipeline tekton prometheus 5000000000 9090  false false  }. Start the server for Prometheus exporter."}
{"level":"info","logger":"tekton","caller":"metrics/config.go:243","msg":"Successfully updated the metrics exporter; old config: ; new config &{tekton.dev/pipeline tekton prometheus 5000000000 9090  false false  }"}
{"level":"info","logger":"tekton","caller":"sharedmain/main.go:150","msg":"Starting informers."}
{"level":"info","logger":"tekton","caller":"sharedmain/main.go:156","msg":"Starting controllers..."}
{"level":"info","logger":"tekton.pipeline-controller","caller":"controller/controller.go:280","msg":"Starting controller and workers","knative.dev/controller":"pipeline-controller"}
{"level":"info","logger":"tekton.pipeline-controller","caller":"controller/controller.go:290","msg":"Started workers","knative.dev/controller":"pipeline-controller"}
{"level":"info","logger":"tekton.pipeline-controller","caller":"pipelinerun/pipelinerun.go:114","msg":"Reconciling 2019-12-23 12:22:38.271615838 +0000 UTC m=+20.559734881","knative.dev/controller":"pipeline-controller"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1470ca3]

goroutine 370 [running]:
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun.(*Reconciler).reconcile(0xc00074e370, 0x1bc3840, 0xc000544c30, 0xc000c44fc0, 0x16, 0xc000c69f60)
/go/src/github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun/pipelinerun.go:297 +0x963
github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun.(*Reconciler).Reconcile(0xc00074e370, 0x1bc3840, 0xc000544c30, 0xc000c883c0, 0x2c, 0xc000c70340, 0x1bc3840)
/go/src/github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun/pipelinerun.go:179 +0x67b
knative.dev/pkg/controller.(*Impl).processNextWorkItem(0xc0007cb180, 0xc00032c700)
/go/src/github.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:335 +0x680
knative.dev/pkg/controller.(*Impl).Run.func1(0xc000c4d0a0, 0xc0007cb180)
/go/src/github.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:285 +0x5b
created by knative.dev/pkg/controller.(*Impl).Run
/go/src/github.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:283 +0x1ef

Steps to Reproduce the Problem

  1. Import buildah task
  2. Create PipelineResource for git and image output
  3. Create a PipelineRun with pipelineSpec like this :
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineRun
metadata:
  name: pipeline-uno
spec:
  resources:
  - name: git
    resourceRef:
      name: repo-ein
  - name: image
    resourceRef:
      name: image-dois

  pipelineSpec:
    tasks:
      - name: build-ehad
        taskRef:
          name: buildah
  1. Observe controller output

Additional Info

This is using last night build from git, available here as well

@chmouel
Copy link
Member Author

chmouel commented Dec 23, 2019

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 23, 2019
@bobcatfish bobcatfish added this to the Pipelines 0.10 🐱 milestone Jan 9, 2020
@bobcatfish
Copy link
Collaborator

We should fix panics ASAP! Adding this to our current milestone.

@bobcatfish bobcatfish added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Jan 9, 2020
@bobcatfish bobcatfish changed the title PiplineRun with pipelineSpecs PiplineRun with pipelineSpecs panics Jan 9, 2020
@chmouel chmouel changed the title PiplineRun with pipelineSpecs panics PipelineRun with pipelineSpecs panics Jan 9, 2020
@dibyom dibyom self-assigned this Jan 9, 2020
dibyom added a commit to dibyom/pipeline that referenced this issue Jan 10, 2020
In a couple of places we were using `pr.Spec.PipelineRef.Name`.
pipelineRef is nil for embedded pipelineSpecs leading to reconciler
panics. Also added some test cases for that catches these scenarios.

Fixes tektoncd#1785

Signed-off-by: Dibyo Mukherjee <[email protected]>
tekton-robot pushed a commit that referenced this issue Jan 13, 2020
In a couple of places we were using `pr.Spec.PipelineRef.Name`.
pipelineRef is nil for embedded pipelineSpecs leading to reconciler
panics. Also added some test cases for that catches these scenarios.

Fixes #1785

Signed-off-by: Dibyo Mukherjee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants