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

Tekton controller segfault when combining matrix task with regular parameters #8514

Closed
Pranaysaha2 opened this issue Jan 22, 2025 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Pranaysaha2
Copy link

Expected Behavior

We should be able to combine matrix parameters (for fan-out operations) with regular static parameters in the same task.

Actual Behavior

tekton-pipelines-controller and tekton-chains-controller both show signal SIGSEGV: segmentation violation{}

Steps to Reproduce the Problem

Description of problem:

When a user uses the matrix and regular params, segfault occurs during pipeline validation, before any tasks are executed.

If the pipeline with the matrix params stays on the cluster it continuously crashes the tekton-controller - not only for the pipeline in question but all pipelines.

tekton-pipelines-controller and tekton-chains-controller both show signal SIGSEGV: segmentation violation

Example YAML causing the issue:

    - name: namespace-approvers
      displayName: "Validating approver $(params.approver) for file $(params.namespace-file)"
      taskRef:
        name: validate-approvers
      params:
        - name: cluster-info-secret
          value: "cluster-info-$(params.cluster-name)"
        - name: debug
          value: $(params.debug)
      matrix:
        params:
          - name: namespace-file
            value: $(tasks.list-changed-files-in-pr.results.changedfiles-array[*])
          - name: approver
            value: $(tasks.pull-request-get-approvers.results.approvers-array[*])

Create a pipeline with a matrix task that requires both fanned-out parameters and static parameters.

The matrix task is defined with:
Matrix parameters: namespace-file and approver (array values)
Regular parameter: cluster-info-secret (static string value)

Additional Info

  • Kubernetes version:

    Output of kubectl version:

1.29
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

v0.62.6

tekton-pipelines-controller and tekton-chains-controller fails with below logs:

2025-01-15T15:59:27.657417998Z panic: runtime error: invalid memory address or nil pointer dereference
2025-01-15T15:59:27.657417998Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x2176f3b]
2025-01-15T15:59:27.657417998Z
2025-01-15T15:59:27.657417998Z goroutine 192 [running]:
2025-01-15T15:59:27.657417998Z github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun/resources.ValidateParamEnumSubset({0xc011f68be0?, 0xc0117ee390?, 0xc011e565a0?}, {0xc01211c308, 0x8, 0xc011e778f0?}, 0x0)
2025-01-15T15:59:27.657417998Z  /go/src/github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go:904 +0x31b
2025-01-15T15:59:27.657482234Z github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun.(*Reconciler).reconcile(0xc0006e0480, {0x2db93e8, 0xc0117ee300}, 0xc0113ecfc8, 0xc0117e0a50, 0xc0117dac40)
2025-01-15T15:59:27.657482234Z  /go/src/github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun/pipelinerun.go:664 +0x3478
2025-01-15T15:59:27.657482234Z github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun.(*Reconciler).ReconcileKind(0xc0006e0480, {0x2db93e8, 0xc0117ee180}, 0xc0113ecfc8)
2025-01-15T15:59:27.657482234Z  /go/src/github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun/pipelinerun.go:266 +0x115b
2025-01-15T15:59:27.657482234Z github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1/pipelinerun.(*reconcilerImpl).Reconcile(0xc00080cf00, {0x2db93e8, 0xc0117ee090}, {0xc01178b450, 0x48})
2025-01-15T15:59:27.657482234Z  /go/src/github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1/pipelinerun/reconciler.go:236 +0x4f2
2025-01-15T15:59:27.657482234Z knative.dev/pkg/controller.(*Impl).processNextWorkItem(0xc0006fc9c0)
2025-01-15T15:59:27.657482234Z  /go/src/github.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:542 +0x508
2025-01-15T15:59:27.657482234Z knative.dev/pkg/controller.(*Impl).RunContext.func3()
2025-01-15T15:59:27.657482234Z  /go/src/github.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:491 +0x59
2025-01-15T15:59:27.657482234Z created by knative.dev/pkg/controller.(*Impl).RunContext in goroutine 261
2025-01-15T15:59:27.657482234Z  /go/src/github.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:489 +0x325

@Pranaysaha2 Pranaysaha2 added the kind/bug Categorizes issue or PR as related to a bug. label Jan 22, 2025
@vdemeester
Copy link
Member

Hey @Pranaysaha2 I think it is similar to #8464 and might have been fixed by #8465.

We just need to cherry-pick the fix to the LTS(es)

@Pranaysaha2
Copy link
Author

@vdemeester Thank you a lot

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.
Projects
Status: Done
Development

No branches or pull requests

2 participants