Skip to content

[data race][receiver/tcpcheck] TestScraper_TCPErrorMetrics #38843

Open
@pjanotti

Description

@pjanotti

Component(s)

receiver/tcpcheck

Describe the issue you're reporting

https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/13980145021/job/39143420523

=== FAIL: . TestScraper_TCPErrorMetrics (unknown)
==================
WARNING: DATA RACE
Read at 0x00c00011dbe3 by goroutine 27:
  testing.(*common).logDepth()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1018 +0xcd
  testing.(*common).log()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1011 +0xa4
  testing.(*common).Errorf()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1075 +0x6a
  testing.(*T).Errorf()
      <autogenerated>:1 +0x69
  github.com/stretchr/testify/assert.Fail()
      C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:369 +0x446
  github.com/stretchr/testify/assert.NoError()
      C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1586 +0x146
  github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.(*Server).runTCPServer.func1()
      D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:46 +0x69

Previous write at 0x00c00011dbe3 by goroutine 26:
  testing.tRunner.func1()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1677 +0x8e6
  runtime.deferreturn()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/runtime/panic.go:611 +0x5d
  testing.(*T).Run.gowrap1()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1743 +0x44

Goroutine 27 (running) created at:
  github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.(*Server).runTCPServer()
      D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:44 +0x247
  github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.TestScraper()
      D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:130 +0xe4
  testing.tRunner()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1690 +0x1dd
  testing.(*T).Run.gowrap1()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1743 +0x44

Goroutine 26 (finished) created at:
  testing.(*T).Run()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1743 +0x83c
  testing.runTests.func1()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:2168 +0x85
  testing.tRunner()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1690 +0x1dd
  testing.runTests()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:2166 +0x8be
  testing.(*M).Run()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:2034 +0xf17
  go.uber.org/goleak.VerifyTestMain()
      C:/Users/runneradmin/go/pkg/mod/go.uber.org/[email protected]/testmain.go:53 +0x64
  github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.TestMain()
      D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/generated_package_test.go:12 +0x184
  main.main()
      _testmain.go:61 +0x16d
==================
panic: Fail in goroutine after TestScraper has completed

goroutine 37 [running]:
testing.(*common).Fail(0xc00011dba0)
	C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:953 +0x194
testing.(*common).Errorf(0xc00011dba0, {0x140ecbd6d, 0x3}, {0xc00029b740, 0x1, 0x1})
	C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1076 +0xaf
github.com/stretchr/testify/assert.Fail({0x141022b60, 0xc00011dba0}, {0xc000304060, 0x56}, {0x0, 0x0, 0x0})
	C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:369 +0x447
github.com/stretchr/testify/assert.NoError({0x141022b60, 0xc00011dba0}, {0x141023080, 0xc000190000}, {0x0, 0x0, 0x0})
	C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1[586](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/13980145021/job/39143420523#step:8:587) +0x147
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.(*Server).runTCPServer.func1()
	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:46 +0x6a
created by github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.(*Server).runTCPServer in goroutine 36
	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:44 +0x248

=== FAIL: . TestScraper_TCPErrorMetrics/tcp_error_metrics (unknown)
==================
WARNING: DATA RACE
Read at 0x00c00011dbe3 by goroutine 27:
  testing.(*common).logDepth()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1018 +0xcd
  testing.(*common).log()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1011 +0xa4
  testing.(*common).Errorf()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1075 +0x6a
  testing.(*T).Errorf()
      <autogenerated>:1 +0x69
  github.com/stretchr/testify/assert.Fail()
      C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:369 +0x446
  github.com/stretchr/testify/assert.NoError()
      C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1586 +0x146
  github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.(*Server).runTCPServer.func1()
      D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:46 +0x69

Previous write at 0x00c00011dbe3 by goroutine 26:
  testing.tRunner.func1()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1677 +0x8e6
  runtime.deferreturn()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/runtime/panic.go:[611](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/13980145021/job/39143420523#step:8:612) +0x5d
  testing.(*T).Run.gowrap1()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1743 +0x44

Goroutine 27 (running) created at:
  github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.(*Server).runTCPServer()
      D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:44 +0x247
  github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.TestScraper()
      D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:130 +0xe4
  testing.tRunner()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1690 +0x1dd
  testing.(*T).Run.gowrap1()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1743 +0x44

Goroutine 26 (finished) created at:
  testing.(*T).Run()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1743 +0x83c
  testing.runTests.func1()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:2168 +0x85
  testing.tRunner()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1690 +0x1dd
  testing.runTests()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:2166 +0x8be
  testing.(*M).Run()
      C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:2034 +0xf17
  go.uber.org/goleak.VerifyTestMain()
      C:/Users/runneradmin/go/pkg/mod/go.uber.org/[email protected]/testmain.go:53 +0x64
  github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.TestMain()
      D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/generated_package_test.go:12 +0x184
  main.main()
      _testmain.go:61 +0x16d
==================
panic: Fail in goroutine after TestScraper has completed

goroutine 37 [running]:
testing.(*common).Fail(0xc00011dba0)
	C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:953 +0x194
testing.(*common).Errorf(0xc00011dba0, {0x140ecbd6d, 0x3}, {0xc00029b740, 0x1, 0x1})
	C:/hostedtoolcache/windows/go/1.23.7/x64/src/testing/testing.go:1076 +0xaf
github.com/stretchr/testify/assert.Fail({0x141022b60, 0xc00011dba0}, {0xc000304060, 0x56}, {0x0, 0x0, 0x0})
	C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:369 +0x447
github.com/stretchr/testify/assert.NoError({0x141022b60, 0xc00011dba0}, {0x141023080, 0xc000190000}, {0x0, 0x0, 0x0})
ERROR rerun aborted because previous run had a suspected panic and some test may not have run
make[2]: *** [../../Makefile.Common:101: test] Error 3
	C:/Users/runneradmin/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1586 +0x147
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.(*Server).runTCPServer.func1()
	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:46 +0x6a
created by github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcpcheckreceiver.(*Server).runTCPServer in goroutine 36
	D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/tcpcheckreceiver/scraper_test.go:44 +0x248

DONE 30 tests, 3 failures in 8.074s
make[1]: *** [Makefile:256: receiver/tcpcheckreceiver] Error 2
make[1]: *** Waiting for unfinished jobs....
∅  internal/metadata
✓  . (1.21s)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions