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

[processor/geoip] Data race detected in tests #34882

Closed
crobert-1 opened this issue Aug 27, 2024 · 4 comments
Closed

[processor/geoip] Data race detected in tests #34882

crobert-1 opened this issue Aug 27, 2024 · 4 comments
Labels
bug Something isn't working processor/geoip

Comments

@crobert-1
Copy link
Member

Component(s)

processor/geoip

Describe the issue you're reporting

Failing CI/CD action

Failure output:

=== Failed
=== FAIL: . TestProcessor/source_address_located_in_inner_attributes (0.02s)
==================
ERROR rerun aborted because previous run had errors
WARNING: DATA RACE
Read at 0x00010284d760 by goroutine 43:
  go.opentelemetry.io/otel/attribute.(*Set).Len()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:80 +0x2c
make[2]: *** [test] Error 3
  go.opentelemetry.io/otel/attribute.(*Iterator).Len()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/iterator.go:66 +0x44
make[1]: *** [processor/geoipprocessor] Error 2
make[1]: *** Waiting for unfinished jobs....
  go.opentelemetry.io/otel/attribute.(*Iterator).ToSlice()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/iterator.go:73 +0x34
  go.opentelemetry.io/otel/attribute.(*Set).ToSlice()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:144 +0xfc
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).geoLocation()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:78 +0x70
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processAttributes()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:95 +0xf8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processMetricAttributes()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_metrics.go:54 +0x5ec
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processMetrics()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_metrics.go:24 +0x3f0
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processMetrics-fm()
      <autogenerated>:1 +0x5c
  go.opentelemetry.io/collector/processor/processorhelper.NewMetricsProcessor.func1()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/processor@v0.107.1-0.20240827012220-5963d446ca4a/processorhelper/metrics.go:48 +0x100
  go.opentelemetry.io/collector/consumer.ConsumeMetricsFunc.ConsumeMetrics()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/consumer@v0.107.1-0.20240827012220-5963d446ca4a/metrics.go:26 +0x74
  go.opentelemetry.io/collector/consumer.(*baseMetrics).ConsumeMetrics()
      <autogenerated>:1 +0x28
  go.opentelemetry.io/collector/processor/processorhelper.(*metricsProcessor).ConsumeMetrics()
      <autogenerated>:1 +0x78
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor.func3.compareAllSignals.1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:144 +0x294
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor.func3()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:221 +0x1e8
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Previous write at 0x00010284d760 by goroutine 39:
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).geoLocation()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:78 +0x1f0
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processAttributes()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:95 +0xf8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processTraces()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_traces.go:17 +0x15c
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processTraces-fm()
      <autogenerated>:1 +0x5c
  go.opentelemetry.io/collector/processor/processorhelper.NewTracesProcessor.func1()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/processor@v0.107.1-0.20240827012220-5963d446ca4a/processorhelper/traces.go:48 +0x100
  go.opentelemetry.io/collector/consumer.ConsumeTracesFunc.ConsumeTraces()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/consumer@v0.107.1-0.20240827012220-5963d446ca4a/traces.go:26 +0x74
  go.opentelemetry.io/collector/consumer.(*baseTraces).ConsumeTraces()
      <autogenerated>:1 +0x28
  go.opentelemetry.io/collector/processor/processorhelper.(*tracesProcessor).ConsumeTraces()
      <autogenerated>:1 +0x78
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind.func1.compareAllSignals.1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:163 +0x554
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind.func1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/integration_test.go:29 +0x1b4
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Goroutine 43 (running) created at:
  testing.(*T).Run()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x5e4
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:219 +0x164
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Goroutine 39 (running) created at:
  testing.(*T).Run()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x5e4
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/integration_test.go:26 +0x180
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40
==================
==================
WARNING: DATA RACE
Read at 0x00c0003af888 by goroutine 43:
  go.opentelemetry.io/otel/attribute.(*Set).Get()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:96 +0x188
  go.opentelemetry.io/otel/attribute.(*Iterator).Attribute()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/iterator.go:46 +0x174
  go.opentelemetry.io/otel/attribute.(*Iterator).ToSlice()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/iterator.go:80 +0x80
  go.opentelemetry.io/otel/attribute.(*Set).ToSlice()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:144 +0xfc
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).geoLocation()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:78 +0x70
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processAttributes()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:95 +0xf8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processMetricAttributes()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_metrics.go:54 +0x5ec
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processMetrics()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_metrics.go:24 +0x3f0
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processMetrics-fm()
      <autogenerated>:1 +0x5c
  go.opentelemetry.io/collector/processor/processorhelper.NewMetricsProcessor.func1()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/processor@v0.107.1-0.20240827012220-5963d446ca4a/processorhelper/metrics.go:48 +0x100
  go.opentelemetry.io/collector/consumer.ConsumeMetricsFunc.ConsumeMetrics()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/consumer@v0.107.1-0.20240827012220-5963d446ca4a/metrics.go:26 +0x74
  go.opentelemetry.io/collector/consumer.(*baseMetrics).ConsumeMetrics()
      <autogenerated>:1 +0x28
  go.opentelemetry.io/collector/processor/processorhelper.(*metricsProcessor).ConsumeMetrics()
      <autogenerated>:1 +0x78
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor.func3.compareAllSignals.1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:144 +0x294
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor.func3()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:221 +0x1e8
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Previous write at 0x00c0003af888 by goroutine 39:
  reflect.typedmemmove()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/runtime/mbarrier.go:203 +0x0
  reflect.packEface()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/reflect/value.go:135 +0xa4
  reflect.valueInterface()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/reflect/value.go:1526 +0x148
  reflect.Value.Interface()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/reflect/value.go:1496 +0x174
  go.opentelemetry.io/otel/attribute.computeDistinctReflect()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:401 +0x180
  go.opentelemetry.io/otel/attribute.computeDistinct()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:338 +0x4c
  go.opentelemetry.io/otel/attribute.NewSetWithFiltered()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:239 +0x364
  go.opentelemetry.io/otel/attribute.NewSet()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:184 +0x1d8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).geoLocation()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:78 +0x70
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processAttributes()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:95 +0xf8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processTraces()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_traces.go:17 +0x15c
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processTraces-fm()
      <autogenerated>:1 +0x5c
  go.opentelemetry.io/collector/processor/processorhelper.NewTracesProcessor.func1()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/processor@v0.107.1-0.20240827012220-5963d446ca4a/processorhelper/traces.go:48 +0x100
  go.opentelemetry.io/collector/consumer.ConsumeTracesFunc.ConsumeTraces()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/consumer@v0.107.1-0.20240827012220-5963d446ca4a/traces.go:26 +0x74
  go.opentelemetry.io/collector/consumer.(*baseTraces).ConsumeTraces()
      <autogenerated>:1 +0x28
  go.opentelemetry.io/collector/processor/processorhelper.(*tracesProcessor).ConsumeTraces()
      <autogenerated>:1 +0x78
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind.func1.compareAllSignals.1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:163 +0x554
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind.func1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/integration_test.go:29 +0x1b4
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Goroutine 43 (running) created at:
  testing.(*T).Run()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x5e4
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:219 +0x164
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Goroutine 39 (running) created at:
  testing.(*T).Run()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x5e4
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/integration_test.go:26 +0x180
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40
==================
    testing.go:13[98](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10579479167/job/29312056172#step:7:99): race detected during execution of test

=== FAIL: . TestProcessor (0.08s)
==================
WARNING: DATA RACE
Read at 0x00010284d760 by goroutine 39:
  go.opentelemetry.io/otel/attribute.(*Set).Len()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:80 +0x2c
  go.opentelemetry.io/otel/attribute.(*Iterator).Len()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/iterator.go:66 +0x44
  go.opentelemetry.io/otel/attribute.(*Iterator).ToSlice()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/iterator.go:73 +0x34
  go.opentelemetry.io/otel/attribute.(*Set).ToSlice()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:144 +0xfc
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).geoLocation()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:78 +0x70
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processAttributes()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:95 +0xf8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processLogs()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_logs.go:17 +0x15c
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processLogs-fm()
      <autogenerated>:1 +0x5c
  go.opentelemetry.io/collector/processor/processorhelper.NewLogsProcessor.func1()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/processor@v0.107.1-0.20240827012220-5963d446ca4a/processorhelper/logs.go:48 +0x[100](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10579479167/job/29312056172#step:7:101)
  go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/consumer@v0.107.1-0.20240827012220-5963d446ca4a/logs.go:26 +0x74
  go.opentelemetry.io/collector/consumer.(*baseLogs).ConsumeLogs()
      <autogenerated>:1 +0x28
  go.opentelemetry.io/collector/processor/processorhelper.(*logProcessor).ConsumeLogs()
      <autogenerated>:1 +0x78
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind.func1.compareAllSignals.1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:179 +0x798
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind.func1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/integration_test.go:29 +0x1b4
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Previous write at 0x000[102](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10579479167/job/29312056172#step:7:103)84d760 by goroutine 43:
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).geoLocation()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:78 +0x1f0
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processAttributes()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:95 +0xf8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processLogs()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_logs.go:24 +0x3f8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processLogs-fm()
      <autogenerated>:1 +0x5c
  go.opentelemetry.io/collector/processor/processorhelper.NewLogsProcessor.func1()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/processor@v0.[107](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10579479167/job/29312056172#step:7:108).1-0.20240827012220-5963d446ca4a/processorhelper/logs.go:48 +0x100
  go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/consumer@v0.107.1-0.20240827012220-5963d446ca4a/logs.go:26 +0x74
  go.opentelemetry.io/collector/consumer.(*baseLogs).ConsumeLogs()
      <autogenerated>:1 +0x28
  go.opentelemetry.io/collector/processor/processorhelper.(*logProcessor).ConsumeLogs()
      <autogenerated>:1 +0x78
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor.func3.compareAllSignals.1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:179 +0x798
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor.func3()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:221 +0x1e8
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Goroutine 39 (running) created at:
  testing.(*T).Run()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x5e4
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/integration_test.go:26 +0x180
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Goroutine 43 (finished) created at:
  testing.(*T).Run()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x5e4
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:219 +0x164
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40
==================
==================
WARNING: DATA RACE
Read at 0x00c00030b888 by goroutine 39:
  go.opentelemetry.io/otel/attribute.(*Set).Get()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:96 +0x188
  go.opentelemetry.io/otel/attribute.(*Iterator).Attribute()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/iterator.go:46 +0x174
  go.opentelemetry.io/otel/attribute.(*Iterator).ToSlice()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/iterator.go:80 +0x80
  go.opentelemetry.io/otel/attribute.(*Set).ToSlice()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:144 +0xfc
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).geoLocation()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:78 +0x70
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processAttributes()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:95 +0xf8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processLogs()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_logs.go:17 +0x15c
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processLogs-fm()
      <autogenerated>:1 +0x5c
  go.opentelemetry.io/collector/processor/processorhelper.NewLogsProcessor.func1()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/processor@v0.107.1-0.202408270[122](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10579479167/job/29312056172#step:7:123)20-5963d446ca4a/processorhelper/logs.go:48 +0x100
  go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/consumer@v0.107.1-0.20240827012220-5963d446ca4a/logs.go:26 +0x74
  go.opentelemetry.io/collector/consumer.(*baseLogs).ConsumeLogs()
      <autogenerated>:1 +0x28
  go.opentelemetry.io/collector/processor/processorhelper.(*logProcessor).ConsumeLogs()
      <autogenerated>:1 +0x78
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind.func1.compareAllSignals.1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:179 +0x798
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind.func1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/integration_test.go:29 +0x1b4
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Previous write at 0x00c00030b888 by goroutine 43:
  reflect.typedmemmove()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/runtime/mbarrier.go:203 +0x0
  reflect.packEface()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/reflect/value.go:135 +0xa4
  reflect.valueInterface()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/reflect/value.go:1526 +0x148
  reflect.Value.Interface()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/reflect/value.go:1496 +0x174
  go.opentelemetry.io/otel/attribute.computeDistinctReflect()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:401 +0x180
  go.opentelemetry.io/otel/attribute.computeDistinct()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:338 +0x4c
  go.opentelemetry.io/otel/attribute.NewSetWithFiltered()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:239 +0x364
  go.opentelemetry.io/otel/attribute.NewSet()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/otel@v1.28.0/attribute/set.go:184 +0x1d8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).geoLocation()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:78 +0x70
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processAttributes()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor.go:95 +0xf8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processLogs()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_logs.go:24 +0x3f8
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.(*geoIPProcessor).processLogs-fm()
      <autogenerated>:1 +0x5c
  go.opentelemetry.io/collector/processor/processorhelper.NewLogsProcessor.func1()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/processor@v0.107.1-0.20240827012220-5963d446ca4a/processorhelper/logs.go:48 +0x100
  go.opentelemetry.io/collector/consumer.ConsumeLogsFunc.ConsumeLogs()
      /Users/runner/go/pkg/mod/go.opentelemetry.io/collector/consumer@v0.107.1-0.20240827012220-5963d446ca4a/logs.go:26 +0x74
  go.opentelemetry.io/collector/consumer.(*baseLogs).ConsumeLogs()
      <autogenerated>:1 +0x28
  go.opentelemetry.io/collector/processor/processorhelper.(*logProcessor).ConsumeLogs()
      <autogenerated>:1 +0x78
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor.func3.compareAllSignals.1()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:179 +0x798
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor.func3()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:221 +0x1e8
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Goroutine 39 (running) created at:
  testing.(*T).Run()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x5e4
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessorWithMaxMind()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/integration_test.go:26 +0x180
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40

Goroutine 43 (finished) created at:
  testing.(*T).Run()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x5e4
  github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor.TestProcessor()
      /Users/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/processor/geoipprocessor/geoip_processor_test.go:219 +0x164
  testing.tRunner()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1689 +0x180
  testing.(*T).Run.gowrap1()
      /Users/runner/hostedtoolcache/go/1.22.6/arm64/src/testing/testing.go:1742 +0x40
==================

=== FAIL: . TestProcessorWithMaxMind/maxmind_default_source.address_attribute (0.06s)
    testing.go:1398: race detected during execution of test

=== FAIL: . TestProcessorWithMaxMind (0.12s)

=== Errors
ld: warning: '/private/var/folders/4d/0gnh84wj53j7wyk695q0tc_80000gn/T/go-link-[123](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/10579479167/job/29312056172#step:7:124)2188252/000020.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
@crobert-1 crobert-1 added the needs triage New item requiring triage label Aug 27, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@rogercoll
Copy link
Contributor

I think the issue was when using the empty attribute.Set structure, should be fixed in #34903

@crobert-1
Copy link
Member Author

Removing needs triage as a code owner has posted a PR resolving this issue.

@crobert-1 crobert-1 added bug Something isn't working and removed needs triage New item requiring triage labels Aug 28, 2024
andrzej-stencel pushed a commit that referenced this issue Sep 5, 2024
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

Data race condition when using the internal empty `attribute.Set`
concurrently. Code changed to prevent using the internal attribute.Set
instance.


**Link to tracking Issue:** <Issue number if applicable>
#34882

**Testing:** <Describe what testing was performed and which tests were
added.>
Same tests, race condition failures should be fixed. 

**Documentation:** <Describe the documentation added.>
@rogercoll
Copy link
Contributor

I reckon we can close it, fix merged: #34903 (comment)

f7o pushed a commit to f7o/opentelemetry-collector-contrib that referenced this issue Sep 12, 2024
…#34903)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

Data race condition when using the internal empty `attribute.Set`
concurrently. Code changed to prevent using the internal attribute.Set
instance.


**Link to tracking Issue:** <Issue number if applicable>
open-telemetry#34882

**Testing:** <Describe what testing was performed and which tests were
added.>
Same tests, race condition failures should be fixed. 

**Documentation:** <Describe the documentation added.>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working processor/geoip
Projects
None yet
Development

No branches or pull requests

2 participants