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

Data race in TestConfigAll #7775

Closed
CabinfeverB opened this issue Jan 30, 2024 · 1 comment
Closed

Data race in TestConfigAll #7775

CabinfeverB opened this issue Jan 30, 2024 · 1 comment
Labels
type/ci The issue is related to CI.

Comments

@CabinfeverB
Copy link
Member

Flaky Test

Which jobs are failing

WARNING: DATA RACE
Write at 0x000007827e28 by goroutine 5728:
github.com/gin-gonic/gin.SetMode()
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/mode.go:70 +0x53
github.com/tikv/pd/pkg/mcs/scheduling/server/apis/v1.NewService.func1()
/home/runner/work/pd/pd/pkg/mcs/scheduling/server/apis/v1/api.go:98 +0x39
sync.(*Once).doSlow()
/opt/hostedtoolcache/go/1.21.6/x64/src/sync/once.go:74 +0xf0
sync.(*Once).Do()
/opt/hostedtoolcache/go/1.21.6/x64/src/sync/once.go:65 +0x44
github.com/tikv/pd/pkg/mcs/scheduling/server/apis/v1.NewService()
/home/runner/work/pd/pd/pkg/mcs/scheduling/server/apis/v1/api.go:95 +0x8b
github.com/tikv/pd/pkg/mcs/scheduling/server/apis/v1.init.0.func1()
/home/runner/work/pd/pd/pkg/mcs/scheduling/server/apis/v1/api.go:65 +0x57
github.com/tikv/pd/pkg/mcs/scheduling/server.(*Server).SetUpRestHandler()
/home/runner/work/pd/pd/pkg/mcs/scheduling/server/server.go:393 +0xd5
github.com/tikv/pd/pkg/mcs/utils.StartGRPCAndHTTPServers()
/home/runner/work/pd/pd/pkg/mcs/utils/util.go:238 +0x6bd
github.com/tikv/pd/pkg/mcs/scheduling/server.(*Server).startServer.func2()
/home/runner/work/pd/pd/pkg/mcs/scheduling/server/server.go:438 +0x6b

Previous read at 0x000007827e28 by goroutine 2532:
github.com/gin-gonic/gin.IsDebugging()
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/debug.go:20 +0x64
github.com/gin-gonic/gin.debugPrintRoute()
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/debug.go:27 +0x6d
github.com/gin-gonic/gin.(*Engine).addRoute()
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:327 +0xc7
github.com/gin-gonic/gin.(*RouterGroup).handle()
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/routergroup.go:89 +0x1d2
github.com/gin-gonic/gin.(*RouterGroup).GET()
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/routergroup.go:117 +0x14f
github.com/pingcap/tidb-dashboard/pkg/apiserver/user.registerRouter()
/home/runner/go/pkg/mod/github.com/pingcap/tidb-dashboard@v0.0.0-20240111062855-41f7c8011953/pkg/apiserver/user/auth.go:249 +0x5c
runtime.call16()
/opt/hostedtoolcache/go/1.21.6/x64/src/runtime/asm_amd64.s:747 +0x42
reflect.Value.Call()
/opt/hostedtoolcache/go/1.21.6/x64/src/reflect/value.go:380 +0xb5
go.uber.org/dig.(*Container).Invoke()
/home/runner/go/pkg/mod/go.uber.org/dig@v1.9.0/dig.go:397 +0x498
go.uber.org/fx.(*App).executeInvokes()
/home/runner/go/pkg/mod/go.uber.org/fx@v1.12.0/app.go:659 +0x2d3
go.uber.org/fx.New()
/home/runner/go/pkg/mod/go.uber.org/fx@v1.12.0/app.go:438 +0x894
github.com/pingcap/tidb-dashboard/pkg/apiserver.(*Service).Start()
/home/runner/go/pkg/mod/github.com/pingcap/tidb-dashboard@v0.0.0-20240111062855-41f7c8011953/pkg/apiserver/apiserver.go:159 +0xaf8
github.com/tikv/pd/pkg/dashboard/adapter.(*Manager).startService()
/home/runner/work/pd/pd/pkg/dashboard/adapter/manager.go:198 +0x116
github.com/tikv/pd/pkg/dashboard/adapter.(*Manager).checkAddress()
/home/runner/work/pd/pd/pkg/dashboard/adapter/manager.go:152 +0x651
github.com/tikv/pd/pkg/dashboard/adapter.(*Manager).serviceLoop()
/home/runner/work/pd/pd/pkg/dashboard/adapter/manager.go:94 +0x2de
github.com/tikv/pd/pkg/dashboard/adapter.(*Manager).Start.func1()
/home/runner/work/pd/pd/pkg/dashboard/adapter/manager.go:66 +0x33

Goroutine 5728 (running) created at:
github.com/tikv/pd/pkg/mcs/scheduling/server.(*Server).startServer()
/home/runner/work/pd/pd/pkg/mcs/scheduling/server/server.go:438 +0x19b0
github.com/tikv/pd/pkg/mcs/scheduling/server.(*Server).Run()
/home/runner/work/pd/pd/pkg/mcs/scheduling/server/server.go:156 +0x1e5
github.com/tikv/pd/tests.NewSchedulingTestServer()
/home/runner/work/pd/pd/tests/testutil.go:139 +0x8e
github.com/tikv/pd/tests.(*TestSchedulingCluster).AddServer()
/home/runner/work/pd/pd/tests/scheduling_cluster.go:70 +0x4f1
github.com/tikv/pd/tests.NewTestSchedulingCluster()
/home/runner/work/pd/pd/tests/scheduling_cluster.go:48 +0x274
github.com/tikv/pd/tests.(*SchedulingTestEnvironment).startCluster()
/home/runner/work/pd/pd/tests/testutil.go:357 +0xa31
github.com/tikv/pd/tests.(*SchedulingTestEnvironment).RunTestInAPIMode()
/home/runner/work/pd/pd/tests/testutil.go:308 +0x2c4
github.com/pingcap/failpoint.parseTerm()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/terms.go:149 +0x364
github.com/pingcap/failpoint.parse()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/terms.go:126 +0xa5
github.com/pingcap/failpoint.newTerms()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/terms.go:98 +0x3e
github.com/pingcap/failpoint.(*Failpoint).Enable()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/failpoint.go:54 +0x3e
github.com/pingcap/failpoint.(*Failpoints).Enable()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/failpoints.go:105 +0x296
github.com/pingcap/failpoint.Enable()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/failpoints.go:225 +0x134
github.com/tikv/pd/tests.(*SchedulingTestEnvironment).RunTestInAPIMode()
/home/runner/work/pd/pd/tests/testutil.go:301 +0x135
github.com/pingcap/failpoint.parseTerm()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/terms.go:149 +0x364
github.com/pingcap/failpoint.parse()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/terms.go:126 +0xa5
github.com/pingcap/failpoint.newTerms()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/terms.go:98 +0x3e
github.com/pingcap/failpoint.(*Failpoint).Enable()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/failpoint.go:54 +0x3e
github.com/pingcap/failpoint.(*Failpoints).Enable()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/failpoints.go:105 +0x296
github.com/pingcap/failpoint.Enable()
/home/runner/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20210918120811-547c13e3eb00/failpoints.go:225 +0xf6
github.com/tikv/pd/tests.(*SchedulingTestEnvironment).RunTestInAPIMode()
/home/runner/work/pd/pd/tests/testutil.go:300 +0xf7
github.com/tikv/pd/tests.(*SchedulingTestEnvironment).RunTestInTwoModes()
/home/runner/work/pd/pd/tests/testutil.go:271 +0x88
github.com/tikv/pd/tests/server/config.(*configTestSuite).TestConfigAll()
/home/runner/work/pd/pd/tests/server/config/config_test.go:104 +0x6f
runtime.call16()
/opt/hostedtoolcache/go/1.21.6/x64/src/runtime/asm_amd64.s:747 +0x42
reflect.Value.Call()
/opt/hostedtoolcache/go/1.21.6/x64/src/reflect/value.go:380 +0xb5
github.com/stretchr/testify/suite.Run.func1()
/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.4/suite/suite.go:197 +0x766
testing.tRunner()
/opt/hostedtoolcache/go/1.21.6/x64/src/testing/testing.go:1595 +0x261
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.21.6/x64/src/testing/testing.go:1648 +0x44

Goroutine 2532 (running) created at:
github.com/tikv/pd/pkg/dashboard/adapter.(*Manager).Start()
/home/runner/work/pd/pd/pkg/dashboard/adapter/manager.go:66 +0x264
github.com/tikv/pd/pkg/dashboard/adapter.(*Manager).Start-fm()
:1 +0x33
github.com/tikv/pd/server.(*Server).startServer()
/home/runner/work/pd/pd/server/server.go:509 +0x3977
fmt.Sscanf()
/opt/hostedtoolcache/go/1.21.6/x64/src/fmt/scan.go:114 +0x184
github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
/home/runner/go/pkg/mod/github.com/syndtr/goleveldb@v1.0.1-0.20190318030020-c3a204f8e965/leveldb/storage/file_storage.go:643 +0x1a
github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
/home/runner/go/pkg/mod/github.com/syndtr/goleveldb@v1.0.1-0.20190318030020-c3a204f8e965/leveldb/storage/file_storage.go:458 +0x3fd
fmt.Fscanf()

CI link

https://github.com/tikv/pd/actions/runs/7706039832/job/21000938623?pr=7774

Reason for failure (if possible)

Anything else

@CabinfeverB CabinfeverB added the type/ci The issue is related to CI. label Jan 30, 2024
@CabinfeverB
Copy link
Member Author

closed by #7484

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

No branches or pull requests

1 participant