-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Pipelines 1.14.5
Description of problem:
Customer is seeing that the Tekton Chains Controller regularly crashes with the following being printed:
{"level":"info","ts":"2024-08-21T06:34:10.053Z","logger":"watcher","caller":"controller/controller.go:550","msg":"Reconcile succeeded","commit":"ebcd9c2","knative.dev/controller":"github.com.tektoncd.chains.pkg.reconciler.pipelinerun.Reconciler","knative.dev/kind":"tekton.dev.PipelineRun","knative.dev/traceid":"0947dd41-0d5b-4e97-afd8-c745db17b0bb","knative.dev/key":"rddl-build/policy-service-bxxkb","duration":0.000048124} panic: runtime error: index out of range [3] with length 3 goroutine 199 [running]: github.com/tektoncd/chains/pkg/chains/formats/slsa/v1/pipelinerun.buildConfig({0x3ca77f8?, 0xc0048a6840?}, 0xc0048febc0) /go/src/github.com/tektoncd/chains/pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go:106 +0x1129 github.com/tektoncd/chains/pkg/chains/formats/slsa/v1/pipelinerun.GenerateAttestation({0x3ca77f8, 0xc0048a6840}, 0xc0048a6840?, 0xc0048f3ef0) /go/src/github.com/tektoncd/chains/pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go:69 +0x19a github.com/tektoncd/chains/pkg/chains/formats/slsa/v1.(*InTotoIte6).CreatePayload(0xc006031bb8, {0x3ca77f8, 0xc0048a6840}, {0x34f4a20?, 0xc0048a0a20?}) /go/src/github.com/tektoncd/chains/pkg/chains/formats/slsa/v1/intotoite6.go:84 +0x525 github.com/tektoncd/chains/pkg/chains.(*ObjectSigner).Sign(0xc0001f1000, {0x3ca77f8, 0xc0048a6840}, {0x3cdcd10, 0xc0048a0a20}) /go/src/github.com/tektoncd/chains/pkg/chains/signing.go:147 +0x5d7 github.com/tektoncd/chains/pkg/reconciler/pipelinerun.(*Reconciler).FinalizeKind(0xc0001f1040, {0x3ca77f8, 0xc0048a6840}, 0xc002a34b40) /go/src/github.com/tektoncd/chains/pkg/reconciler/pipelinerun/pipelinerun.go:109 +0x8cc github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1/pipelinerun.(*reconcilerImpl).Reconcile(0xc0005cfe00, {0x3ca77f8, 0xc0048a6780}, {0xc003b25e30, 0x24}) /go/src/github.com/tektoncd/chains/vendor/github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1/pipelinerun/reconciler.go:241 +0x3be knative.dev/pkg/controller.(*Impl).processNextWorkItem(0xc000621320) /go/src/github.com/tektoncd/chains/vendor/knative.dev/pkg/controller/controller.go:542 +0x4cd knative.dev/pkg/controller.(*Impl).RunContext.func3() /go/src/github.com/tektoncd/chains/vendor/knative.dev/pkg/controller/controller.go:491 +0x68 created by knative.dev/pkg/controller.(*Impl).RunContext /go/src/github.com/tektoncd/chains/vendor/knative.dev/pkg/controller/controller.go:489 +0x354
After restarting sometimes the Tekton Chains Controller runs for a few minutes and then crashes again with the same issue. The issue appears on two different clusters at one customer, but not on others.
Steps to Reproduce
Tekton Chains Controller crashes with the following panic:
panic: runtime error: index out of range [3] with length 3
Expected results:
Tekton Chains Controller does not crash or at least only prints an error message.
Reproducibility (Always/Intermittent/Only Once):
Customer is seeing the same issue on two different clusters.
Additional info (Such as Logs, Screenshots, etc):
OpenShift version is 4.14.33
OpenShift Pipelines version is 1.14.5
Customer will also attach a Pipelines "must-gather" to the attached Support Case