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

race-detector: data race in tests #4630

Closed
srenatus opened this issue Apr 27, 2022 · 2 comments
Closed

race-detector: data race in tests #4630

srenatus opened this issue Apr 27, 2022 · 2 comments

Comments

@srenatus
Copy link
Contributor

ok  	github.com/open-policy-agent/opa/runtime	0.546s
==================
WARNING: DATA RACE
Read at 0x00c000496030 by goroutine 47:
  github.com/open-policy-agent/opa/logging/test.(*Logger).append()
      /src/logging/test/test.go:94 +0x164
  github.com/open-policy-agent/opa/logging/test.(*Logger).Debug()
      /src/logging/test/test.go:56 +0x64
  github.com/open-policy-agent/opa/download.(*Downloader).loop()
      /src/download/download.go:223 +0x511
  github.com/open-policy-agent/opa/download.(*Downloader).doStart.func1()
      /src/download/download.go:167 +0x58

Previous write at 0x00c000496030 by goroutine 38:
  github.com/open-policy-agent/opa/logging/test.(*Logger).append()
      /src/logging/test/test.go:94 +0x266
  github.com/open-policy-agent/opa/logging/test.(*Logger).Info()
      /src/logging/test/test.go:61 +0x64
  github.com/open-policy-agent/opa/plugins/bundle.(*Plugin).Stop()
      /src/plugins/bundle/plugin.go:139 +0x33d
  github.com/open-policy-agent/opa/plugins.(*Manager).Stop()
      /src/plugins/plugins.go:626 +0x194
  github.com/open-policy-agent/opa/sdk.(*OPA).Stop()
      /src/sdk/opa.go:211 +0x9d
  github.com/open-policy-agent/opa/sdk_test.TestPrintStatements.func2()
      /src/sdk/opa_test.go:837 +0x58
  runtime.deferreturn()
      /usr/local/go/src/runtime/panic.go:436 +0x32
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /usr/local/go/src/testing/testing.go:1486 +0x47

Goroutine 47 (running) created at:
  github.com/open-policy-agent/opa/download.(*Downloader).doStart()
      /src/download/download.go:167 +0x119
  github.com/open-policy-agent/opa/download.(*Downloader).Start.func1()
      /src/download/download.go:158 +0x58

Goroutine 38 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1486 +0x724
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:1839 +0x99
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1439 +0x213
  testing.runTests()
      /usr/local/go/src/testing/testing.go:1837 +0x7e4
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:1719 +0xa71
  main.main()
      _testmain.go:79 +0x2e4
==================
--- FAIL: TestPrintStatements (0.02s)
    testing.go:1[312](https://github.com/open-policy-agent/opa/runs/6192759383?check_suite_focus=true#step:3:312): race detected during execution of test
FAIL
FAIL	github.com/open-policy-agent/opa/sdk	0.495s

This isn't found every time, but it happened more than once.

@stale
Copy link

stale bot commented May 27, 2022

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.

@stale stale bot added the inactive label May 27, 2022
@ashutosh-narkar
Copy link
Member

Lets re-open if we observe this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants