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

Operator NIL pointer derefence #647

Closed
pavolloffay opened this issue Oct 17, 2023 · 0 comments · Fixed by #757
Closed

Operator NIL pointer derefence #647

pavolloffay opened this issue Oct 17, 2023 · 0 comments · Fixed by #757
Assignees
Labels
bug Something isn't working

Comments

@pavolloffay
Copy link
Collaborator

st","namespace":"default"},"namespace":"default","name":"simplest","reconcileID":"57a06b38-ac3a-42b2-ad7b-6828f1e0d7ae","tempo":{"name":"simplest","namespace":"default"},"name":"default/simplest"}
{"level":"info","ts":"2023-10-17T13:11:20.608939828Z","msg":"Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference","controller":"tempostack","controllerGroup":"tempo.grafana.com","controllerKind":"TempoStack","TempoStack":{"name":"simplest","namespace":"default"},"namespace":"default","name":"simplest","reconcileID":"c46d07dd-12e5-4bbf-9ec6-a71da0a5d517"}
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x161db11]

goroutine 325 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.2/pkg/internal/controller/controller.go:116 +0x1e5
panic({0x17f3940?, 0x2a24520?})
	/usr/local/go/src/runtime/panic.go:914 +0x21f
github.com/grafana/tempo-operator/internal/handlers/gateway.GetOIDCTenantSecrets({_, _}, {_, _}, {{{0xc00056af10, 0xe}, {0xc00056af20, 0x5}, {0x0, 0x0}, ...}, ...})
	/workspace/internal/handlers/gateway/oidc_secret.go:30 +0x111
github.com/grafana/tempo-operator/controllers/tempo.(*TempoStackReconciler).createOrUpdate(_, {_, _}, {{_, _}, _}, {{{0xc00056ae30, 0x7}, {0xc00056ae28, 0x8}}}, ...)
	/workspace/controllers/tempo/tempostack_create_or_update.go:137 +0x725
github.com/grafana/tempo-operator/controllers/tempo.(*TempoStackReconciler).Reconcile(0xc00010c000, {0x1d1f2d8, 0xc00062cf00}, {{{0xc00056ae30, 0x7}, {0xc00056ae28, 0x8}}})
	/workspace/controllers/tempo/tempostack_controller.go:115 +0x917
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x1d21d90?, {0x1d1f2d8?, 0xc00062cf00?}, {{{0xc00056ae30?, 0xb?}, {0xc00056ae28?, 0x0?}}})
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.2/pkg/internal/controller/controller.go:119 +0xb7
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc000272280, {0x1d1f310, 0xc00026ce60}, {0x1882540?, 0xc000622080?})
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.2/pkg/internal/controller/controller.go:316 +0x3c5
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc000272280, {0x1d1f310, 0xc00026ce60})
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.2/pkg/internal/controller/controller.go:266 +0x1c9
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.2/pkg/internal/controller/controller.go:227 +0x79
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 in goroutine 121
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.2/pkg/internal/controller/controller.go:223 +0x565
kubectl apply -f - <<EOF
apiVersion: tempo.grafana.com/v1alpha1
kind: TempoStack
metadata:
  name: simplest
spec:
  storage:
    secret: 
      name: minio-test
      type: s3
  storageSize: 1Gi
  resources:
    total:
      limits:
        memory: 2Gi
        cpu: 2000m
  tenants:
    mode: static
    authentication:
      - tenantName: dev
        tenantId: "1610b0c3-c509-4592-a256-a1871353dbfa"
      - tenantName: production
        tenantId: "1610b0c3-c509-4592-a256-a1871353dbfb"
    authorization:
      roleBindings:
      - name: read-write
        roles:
          - read-write-traces
        subjects:
          - kind: user
            name: system:serviceaccount:ploffay:dev-collector
          - kind: user
            name: system:serviceaccount:ploffay:production-collector
          - kind: user
            name: kubeadmin
      roles:
      - name: read-write-traces
        permissions:
          - read
          - write
        resources: 
          - traces
        tenants:
          - dev
          - production
  template:
    gateway:
      enabled: true
    queryFrontend:
      jaegerQuery:
        enabled: true
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants