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

[libbeat] Race detected in transport test #12087

Closed
simitt opened this issue May 7, 2019 · 2 comments · Fixed by #12091
Closed

[libbeat] Race detected in transport test #12087

simitt opened this issue May 7, 2019 · 2 comments · Fixed by #12091
Labels
flaky-test Unstable or unreliable test cases.

Comments

@simitt
Copy link
Contributor

simitt commented May 7, 2019

Flaky Test

  • Test Name: Tests using transport_test. Race was detected when running go test -race -tags integration github.com/elastic/beats/libbeat/outputs/transport/transptest
  • Link: transport test
  • Branch: master (happened in a PR, but changes were unrelated)
  • Artifact Link: failure on ci
@simitt simitt added the flaky-test Unstable or unreliable test cases. label May 7, 2019
@urso
Copy link

urso commented May 7, 2019

stacktrace:

==================
WARNING: DATA RACE
Read at 0x00c000104143 by goroutine 8:
  testing.(*common).logDepth()
      /usr/local/go/src/testing/testing.go:621 +0x94
  testing.(*common).Log()
      /usr/local/go/src/testing/testing.go:614 +0x78
  github.com/elastic/beats/libbeat/outputs/transport/transptest.newSOCKS5Proxy.func1()
      /go/src/github.com/elastic/beats/libbeat/outputs/transport/transptest/testing_test.go:57 +0x9f

Previous write at 0x00c000104143 by goroutine 6:
  testing.tRunner.func1()
      /usr/local/go/src/testing/testing.go:856 +0x354
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:869 +0x17f

Goroutine 8 (running) created at:
  github.com/elastic/beats/libbeat/outputs/transport/transptest.newSOCKS5Proxy()
      /go/src/github.com/elastic/beats/libbeat/outputs/transport/transptest/testing_test.go:54 +0x261
  github.com/elastic/beats/libbeat/outputs/transport/transptest.TestTransportReconnectsOnConnect()
      /go/src/github.com/elastic/beats/libbeat/outputs/transport/transptest/testing_test.go:67 +0x6d
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:865 +0x163

Goroutine 6 (finished) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:916 +0x65a
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:1157 +0xa8
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:865 +0x163
  testing.runTests()
      /usr/local/go/src/testing/testing.go:1155 +0x523
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:1072 +0x2eb
  main.main()
      _testmain.go:94 +0x334
==================

@urso
Copy link

urso commented May 7, 2019

Nice one. Logging in testing.T is not thread-safe :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Unstable or unreliable test cases.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants