Skip to content

Occasional test failure in localblocks processor #5086

@zalegrala

Description

@zalegrala

This shows up occasionally in CI, and works on a retry of the tests. It would be nice to resolve this occasional failure.

❯ go test -v -race -cover ./modules/generator/processor/localblocks/ -count=100 -failfast -run="TestProcessorDoesNotRace"
=== RUN   TestProcessorDoesNotRace
--- PASS: TestProcessorDoesNotRace (6.24s)
=== RUN   TestProcessorDoesNotRace
--- PASS: TestProcessorDoesNotRace (6.34s)
=== RUN   TestProcessorDoesNotRace
--- PASS: TestProcessorDoesNotRace (7.79s)
=== RUN   TestProcessorDoesNotRace
--- PASS: TestProcessorDoesNotRace (7.61s)
=== RUN   TestProcessorDoesNotRace
--- PASS: TestProcessorDoesNotRace (8.26s)
=== RUN   TestProcessorDoesNotRace
--- PASS: TestProcessorDoesNotRace (7.81s)
=== RUN   TestProcessorDoesNotRace
==================
WARNING: DATA RACE
Write at 0x00c00a276f08 by goroutine 8260:
  runtime.racewrite()
      <autogenerated>:1 +0x1e
  github.com/grafana/tempo/modules/generator/processor/localblocks.TestProcessorDoesNotRace()
      /home/zach/go/src/github.com/grafana/tempo/modules/generator/processor/localblocks/processor_test.go:203 +0x1631
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:1792 +0x225
  testing.(*T).Run.gowrap1()
      /usr/lib/go/src/testing/testing.go:1851 +0x44

Previous read at 0x00c00a276f08 by goroutine 8269:
  runtime.raceread()
      <autogenerated>:1 +0x1e
  github.com/grafana/tempo/modules/generator/processor/localblocks.TestProcessorDoesNotRace.func1()
      /home/zach/go/src/github.com/grafana/tempo/modules/generator/processor/localblocks/processor_test.go:127 +0x44
  github.com/grafana/tempo/modules/generator/processor/localblocks.TestProcessorDoesNotRace.gowrap6()
      /home/zach/go/src/github.com/grafana/tempo/modules/generator/processor/localblocks/processor_test.go:171 +0x41

Goroutine 8260 (running) created at:
  testing.(*T).Run()
      /usr/lib/go/src/testing/testing.go:1851 +0x8f2
  testing.runTests.func1()
      /usr/lib/go/src/testing/testing.go:2279 +0x85
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:1792 +0x225
  testing.runTests()
      /usr/lib/go/src/testing/testing.go:2277 +0x96c
  testing.(*M).Run()
      /usr/lib/go/src/testing/testing.go:2142 +0xeea
  main.main()
      _testmain.go:63 +0x164

Goroutine 8269 (running) created at:
  github.com/grafana/tempo/modules/generator/processor/localblocks.TestProcessorDoesNotRace()
      /home/zach/go/src/github.com/grafana/tempo/modules/generator/processor/localblocks/processor_test.go:171 +0xff2
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:1792 +0x225
  testing.(*T).Run.gowrap1()
      /usr/lib/go/src/testing/testing.go:1851 +0x44
==================
    testing.go:1490: race detected during execution of test
--- FAIL: TestProcessorDoesNotRace (7.86s)
FAIL
coverage: 58.0% of statements
FAIL	github.com/grafana/tempo/modules/generator/processor/localblocks	52.080s
FAIL
zsh: exit 1     go test -v -race -cover ./modules/generator/processor/localblocks/ -count=100

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority MedkeepaliveLabel to exempt Issues / PRs from stale workflow

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions