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 tracing trait #3205

Closed
arnouthoebreckx opened this issue Apr 14, 2022 · 5 comments · Fixed by #3471
Closed

Nil pointer dereference tracing trait #3205

arnouthoebreckx opened this issue Apr 14, 2022 · 5 comments · Fixed by #3471
Assignees
Labels
area/traits kind/bug Something isn't working

Comments

@arnouthoebreckx
Copy link

Having issues with trying to run an Integration that uses the tracing trait with the following errors in the operator.

We're currently running the helm-operator, but I tried this with the 1.8.x operator-channel on Openshift with the same issue.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1d123442022-04-14T10:32:03.383302466+02:00 ]

goroutine 1120 [running]:
github.com/apache/camel-k/addons/tracing.(*tracingTrait).Configure(0xc00076ae00, 0xc0004909a0, 0x0, 0x0, 0x0)
	github.com/apache/camel-k/addons/tracing/tracing.go:99 +0x164
github.com/apache/camel-k/pkg/trait.(*Catalog).apply(0xc0014895602022-04-14T10:32:03.383364527+02:00 , 0xc0004909a0, 0xc001489560, 0xc000b41800)
	github.com/apache/camel-k/pkg/trait/trait_catalog.go:105 +2022-04-14T10:32:03.383391815+02:00 0x3b9
github.com/apache/camel-k/pkg/trait.Apply(2022-04-14T10:32:03.383535080+02:00 0x27444c0, 0xc001488360, 0x277e8e0, 0xc000b418002022-04-14T10:32:03.383562313+02:00 , 0x0, 0xc000936480, 0x0, 0x0, 0x1a2022-04-14T10:32:03.383617354+02:00 )
	github.com/apache/camel-k/pkg/trait/trait.go:47 +2022-04-14T10:32:03.383648775+02:00 0xd9
github.com/apache/camel-k/pkg/controller/integrationkit.(*initializeAction).Handle(0xc000161740, 0x27444c0, 2022-04-14T10:32:03.383665526+02:00 0xc001488360, 0xc000936480, 0xc00102bc90, 0x12022-04-14T10:32:03.383677126+02:00 , 0x1)
	github.com/apache/camel-k/pkg/controller/integrationkit/initialize.go2022-04-14T10:32:03.383688498+02:00 :46 +0x65
github.com/apache/camel-k/pkg/controller/integrationkit.(*reconcileIntegrationKit).Reconcile(0xc0007653b0, 0x27444c02022-04-14T10:32:03.383711789+02:00 , 0xc001488360, 0xc001dd0300, 0x112022-04-14T10:32:03.383723468+02:00 , 0xc001dd02e8, 0x18, 0x302022-04-14T10:32:03.383739363+02:00 , 0xc001488360, 0xc000e493e0, ...)
	github.com/apache/camel-k/pkg/controller/integrationkit/integrationkit_controller.go2022-04-14T10:32:03.383750749+02:00 :273 +0xf67
github.com/apache/camel-k/pkg/util/monitoring.(*instrumentedReconciler).Reconcile(0xc000b418802022-04-14T10:32:03.383888219+02:00 , 0x27444c0, 0xc001488360, 0xc001dd03002022-04-14T10:32:03.383911656+02:00 , 0x11, 0xc001dd02e8, 0x18, 0xc001488360, 0xc00003a000, 0x21e2ea02022-04-14T10:32:03.383923589+02:00 , ...)
	github.com/apache/camel-k/pkg/util/monitoring/controller.go:702022-04-14T10:32:03.383934929+02:00  +0xd92022-04-14T10:32:03.384282634+02:00
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0009c3540, 0x2744418, 0xc0009a0880, 0x2171860, 0xc00076c020)
	sigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:298 +0x30d
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0009c3540, 0x2744418, 0xc0009a0880, 0xc0012cc000)
	sigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:253 +0x205
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2(0xc00111a3b0, 0xc0009c3540, 0x2744418, 0xc0009a0880)
	sigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:214 +0x6b
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
	sigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:210 +0x425

This is the following setup for the integration

apiVersion: camel.apache.org/v1
kind: Integration
metadata:
  name: test-integration
  namespace: sandbox
spec:
  flows:
   ...
  replicas: 1
  template:
    spec:
      ...
  traits:
    logging:
      configuration:
        level: INFO
    openapi:
      configuration:
        configmaps:
          - openapi-configmap
        enabled: true
    route:
      configuration:
        enabled: true
    tracing:
      configuration:
        serviceName: test-integration

And we have the following IntegrationPlatform applied

apiVersion: camel.apache.org/v1
kind: IntegrationPlatform
metadata:
  labels:
    app: camel-k
    app.kubernetes.io/instance: camel-k
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: camel-k-operator
    app.kubernetes.io/version: 1.9.0-SNAPSHOT
spec:
  build:
    registry: {}
  cluster: OpenShift
  profile: OpenShift
  traits:
    health:
      configuration:
        enabled: true
        livenessProbeEnabled: true
        readinessProbeEnabled: true
    logging:
      configuration:
        enabled: true
        json: true
    pdb:
      configuration:
        enabled: true
        minAvailable: 50%
    prometheus:
      configuration:
        enabled: true
    route:
      configuration:
        tlsInsecureEdgeTerminationPolicy: Redirect
        tlsTermination: edge
    service:
      configuration:
        auto: false
        enabled: true
        nodePort: false
    tracing:
      configuration:
        enabled: true
        endpoint: http://jaeger-collector.jaeger.svc.cluster.local:14268/api/traces
@squakez
Copy link
Contributor

squakez commented Apr 18, 2022

Thanks for reporting. That trace appears on some kamel command execution or on the operator log?

@arnouthoebreckx
Copy link
Author

This is on the operator log.

@squakez squakez added kind/bug Something isn't working area/traits labels Apr 19, 2022
@Gre8t
Copy link
Contributor

Gre8t commented Apr 25, 2022

@squakez could this be assigned to me? T for thanks!

@squakez
Copy link
Contributor

squakez commented Apr 25, 2022

@squakez could this be assigned to me? T for thanks!

Sure, thanks a lot!

@tadayosi
Copy link
Member

@Gre8t Since it's been inactive for long time, let me take it over.

@tadayosi tadayosi assigned tadayosi and unassigned Gre8t Jul 21, 2022
tadayosi added a commit to tadayosi/camel-k that referenced this issue Jul 21, 2022
tadayosi added a commit to tadayosi/camel-k that referenced this issue Jul 21, 2022
This issue happened when an trait was enabled at IntegrationPlatform
which is implemented not considering possible absence of Integration.

Fix apache#3205
tadayosi added a commit to tadayosi/camel-k that referenced this issue Jul 22, 2022
This issue happened when an trait was enabled at IntegrationPlatform
which is implemented not considering possible absence of Integration.

Fix apache#3205
tadayosi added a commit to tadayosi/camel-k that referenced this issue Jul 22, 2022
This issue happened when an trait was enabled at IntegrationPlatform
which is implemented not considering possible absence of Integration.

Fix apache#3205
tadayosi added a commit that referenced this issue Jul 22, 2022
This issue happened when an trait was enabled at IntegrationPlatform
which is implemented not considering possible absence of Integration.

Fix #3205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/traits kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants