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

store limit test has data race issue #6369

Closed
binshi-bing opened this issue Apr 23, 2023 · 0 comments · Fixed by #6370
Closed

store limit test has data race issue #6369

binshi-bing opened this issue Apr 23, 2023 · 0 comments · Fixed by #6370
Labels
type/ci The issue is related to CI.

Comments

@binshi-bing
Copy link
Contributor

binshi-bing commented Apr 23, 2023

Flaky Test

Which jobs are failing

CGO_ENABLED=1 go test -timeout=15m -tags deadlock -race -covermode=atomic -coverprofile=covprofile -coverpkg=./... github.com/tikv/pd/pkg/core/storelimit github.com/tikv/pd/pkg/mcs/tso/server github.com/tikv/pd/pkg/schedule/operator github.com/tikv/pd/pkg/storage/kv github.com/tikv/pd/pkg/utils/keyutil github.com/tikv/pd/server/api

==================
WARNING: DATA RACE
Write at 0x00c00001adc8 by goroutine 16:
github.com/tikv/pd/pkg/core/storelimit.TestFeedback.func1()
/home/runner/work/pd/pd/pkg/core/storelimit/limit_test.go:137 +0xa4

Previous read at 0x00c00001adc8 by goroutine 15:
github.com/tikv/pd/pkg/core/storelimit.TestFeedback()
/home/runner/work/pd/pd/pkg/core/storelimit/limit_test.go:188 +0xee4
testing.tRunner()
/opt/hostedtoolcache/go/1.20.1/x64/src/testing/testing.go:1576 +0x216
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.20.1/x64/src/testing/testing.go:1629 +0x47

Goroutine 16 (running) created at:
github.com/tikv/pd/pkg/core/storelimit.TestFeedback()
/home/runner/work/pd/pd/pkg/core/storelimit/limit_test.go:134 +0x525
testing.tRunner()
/opt/hostedtoolcache/go/1.20.1/x64/src/testing/testing.go:1576 +0x216
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.20.1/x64/src/testing/testing.go:1629 +0x47

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

--- FAIL: TestFeedback (1.63s)
testing.go:1446: race detected during execution of test

CI link

https://github.com/tikv/pd/actions/runs/4779473234/jobs/8496585204?pr=6358

Reason for failure (if possible)

a variable, used for test only, is accessed by multiple goroutines and isn't protected.

Anything else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/ci The issue is related to CI.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant