Skip to content

TestQueuedRetryPersistentEnabled_shutdown_dataIsRequeued is flaky #8124

@atoulme

Description

@atoulme

See https://github.com/open-telemetry/opentelemetry-collector/actions/runs/5641800307/job/15280483750

WARNING: DATA RACE
Write at 0x00c00008ac70 by goroutine 184:
  runtime.closechan()
      /opt/hostedtoolcache/go/1.20.6/x64/src/runtime/chan.go:357 +0x0
  go.opentelemetry.io/collector/exporter/exporterhelper/internal.(*boundedMemoryQueue).Stop()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/internal/bounded_memory_queue.go:82 +0x6b
  go.opentelemetry.io/collector/exporter/exporterhelper.(*producerConsumerQueueWithCounter).Stop()
      <autogenerated>:1 +0x49
  go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).shutdown()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/queued_retry.go:233 +0x11b
  go.opentelemetry.io/collector/exporter/exporterhelper.newBaseExporter.func2()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/common.go:170 +0x5e
  go.opentelemetry.io/collector/component.ShutdownFunc.Shutdown()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/component/component.go:84 +0xa92
  go.opentelemetry.io/collector/exporter/exporterhelper.TestQueuedRetryPersistentEnabled_shutdown_dataIsRequeued()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/queued_retry_test.go:614 +0xa45
  testing.tRunner()
      /opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1576 +0x216
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1629 +0x47

Previous read at 0x00c00008ac70 by goroutine 185:
  runtime.chansend()
      /opt/hostedtoolcache/go/1.20.6/x64/src/runtime/chan.go:160 +0x0
  go.opentelemetry.io/collector/exporter/exporterhelper/internal.(*boundedMemoryQueue).Produce()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/internal/bounded_memory_queue.go:69 +0x104
  go.opentelemetry.io/collector/exporter/exporterhelper.(*producerConsumerQueueWithCounter).Produce()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/queued_retry_test.go:822 +0x83
  go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).onTemporaryFailure()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/queued_retry.go:173 +0x38d
  go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).onTemporaryFailure-fm()
      <autogenerated>:1 +0x7d
  go.opentelemetry.io/collector/exporter/exporterhelper.(*retrySender).send()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/queued_retry.go:435 +0x1187
  go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).start.func1()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/queued_retry.go:195 +0x64
  go.opentelemetry.io/collector/exporter/exporterhelper/internal.(*boundedMemoryQueue).StartConsumers.func1()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/internal/bounded_memory_queue.go:47 +0x151

Goroutine 184 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1629 +0x805
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:2036 +0x8d
  testing.tRunner()
      /opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1576 +0x216
  testing.runTests()
      /opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:2034 +0x87c
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1906 +0xb44
  main.main()
      _testmain.go:175 +0x2e9

Goroutine 185 (running) created at:
  go.opentelemetry.io/collector/exporter/exporterhelper/internal.(*boundedMemoryQueue).StartConsumers()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/internal/bounded_memory_queue.go:42 +0x67
  go.opentelemetry.io/collector/exporter/exporterhelper.(*queuedRetrySender).start()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/queued_retry.go:194 +0x152
  go.opentelemetry.io/collector/exporter/exporterhelper.newBaseExporter.func1()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/common.go:166 +0xe9
  go.opentelemetry.io/collector/component.StartFunc.Start()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/component/component.go:73 +0x5c1
  go.opentelemetry.io/collector/exporter/exporterhelper.TestQueuedRetryPersistentEnabled_shutdown_dataIsRequeued()
      /home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/queued_retry_test.go:589 +0x520
  testing.tRunner()
      /opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1576 +0x216
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1629 +0x47
==================
--- FAIL: TestQueuedRetryPersistentEnabled_shutdown_dataIsRequeued (1.01s)
    queued_retry_test.go:615: 
        	Error Trace:	/home/runner/work/opentelemetry-collector/opentelemetry-collector/exporter/exporterhelper/queued_retry_test.go:615
        	Error:      	Condition never satisfied
        	Test:       	TestQueuedRetryPersistentEnabled_shutdown_dataIsRequeued
    testing.go:[144](https://github.com/open-telemetry/opentelemetry-collector/actions/runs/5641800307/job/15280483750#step:6:145)6: race detected during execution of test

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions