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 TestConfigForward #8654

Closed
rleungx opened this issue Sep 24, 2024 · 0 comments · Fixed by #8655
Closed

Data race in TestConfigForward #8654

rleungx opened this issue Sep 24, 2024 · 0 comments · Fixed by #8655
Labels
type/ci The issue is related to CI.

Comments

@rleungx
Copy link
Member

rleungx commented Sep 24, 2024

Flaky Test

Which jobs are failing

==================
WARNING: DATA RACE
Write at 0x00c001cddb88 by goroutine 32832:
  github.com/tikv/pd/tests/integrations/mcs/scheduling_test.(*apiTestSuite).checkConfigForward()
      /home/runner/work/pd/pd/tests/integrations/mcs/scheduling/api_test.go:[437](https://github.com/tikv/pd/actions/runs/11007523642/job/30563564848?pr=8632#step:4:438) +0x74c
  github.com/tikv/pd/tests/integrations/mcs/scheduling_test.(*apiTestSuite).checkConfigForward-fm()
      <autogenerated>:1 +0x3d
  github.com/tikv/pd/tests.(*SchedulingTestEnvironment).RunTestInAPIMode()
      /home/runner/work/pd/pd/tests/testutil.go:371 +0x31c
  github.com/pingcap/failpoint.parseTerm()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/terms.go:149 +0x364
  github.com/pingcap/failpoint.parse()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/terms.go:126 +0xa5
  github.com/pingcap/failpoint.newTerms()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/terms.go:98 +0x3e
  github.com/pingcap/failpoint.(*Failpoint).Enable()
      /home/runner/go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:247 +0x186
  github.com/stretchr/testify/suite.Run()
      /home/runner/go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:220 +0xa4e
  github.com/pingcap/failpoint.parse()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/terms.go:126 +0xa5
  github.com/pingcap/failpoint.newTerms()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/terms.go:98 +0x3e
  github.com/pingcap/failpoint.(*Failpoint).Enable()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/failpoint.go:54 +0x3e
  github.com/pingcap/failpoint.(*Failpoints).Enable()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/failpoints.go:105 +0x296
  github.com/pingcap/failpoint.Enable()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/failpoints.go:222 +0x94
  github.com/tikv/pd/tests/integrations/mcs/scheduling_test.(*apiTestSuite).SetupSuite()
      /home/runner/work/pd/pd/tests/integrations/mcs/scheduling/api_test.go:44 +0x95
  github.com/pingcap/failpoint.parseTerm()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/terms.go:149 +0x364
  github.com/pingcap/failpoint.parse()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/terms.go:126 +0xa5
  github.com/pingcap/failpoint.newTerms()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/terms.go:98 +0x3e
  github.com/pingcap/failpoint.(*Failpoint).Enable()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/failpoint.go:54 +0x3e
  github.com/pingcap/failpoint.(*Failpoints).Enable()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/failpoints.go:105 +0x296
  github.com/pingcap/failpoint.Enable()
      /home/runner/go/pkg/mod/github.com/pingcap/[email protected]/failpoints.go:222 +0x59
  github.com/tikv/pd/tests/integrations/mcs/scheduling_test.(*apiTestSuite).SetupSuite()
      /home/runner/work/pd/pd/tests/integrations/mcs/scheduling/api_test.go:43 +0x5a
  github.com/stretchr/testify/suite.Run()
      /home/runner/go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:157 +0x63e
  github.com/tikv/pd/tests/integrations/mcs/scheduling_test.TestAPI()
      /home/runner/work/pd/pd/tests/integrations/mcs/scheduling/api_test.go:38 +0x3c
  testing.tRunner()
      /opt/hostedtoolcache/go/1.21.13/x64/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.21.13/x64/src/testing/testing.go:1648 +0x44

Goroutine 7247 (running) created at:
  github.com/tikv/pd/pkg/schedule/schedulers.(*Controller).AddScheduler()
      /home/runner/work/pd/pd/pkg/schedule/schedulers/scheduler_controller.go:215 +0x42b
  github.com/tikv/pd/pkg/schedule.(*Coordinator).InitSchedulers()
      /home/runner/work/pd/pd/pkg/schedule/coordinator.go:300 +0x1aab
  github.com/tikv/pd/pkg/schedule.(*Coordinator).Run()
      /home/runner/work/pd/pd/pkg/schedule/coordinator.go:237 +0x3e4
  github.com/tikv/pd/pkg/schedule.(*Coordinator).RunUntilStop()
      /home/runner/work/pd/pd/pkg/schedule/coordinator.go:208 +0x91
  github.com/tikv/pd/pkg/mcs/scheduling/server.(*Cluster).runCoordinator()
      /home/runner/work/pd/pd/pkg/mcs/scheduling/server/cluster.go:497 +0x24a
  github.com/tikv/pd/pkg/mcs/scheduling/server.(*Cluster).StartBackgroundJobs.func3()
      /home/runner/work/pd/pd/pkg/mcs/scheduling/server/cluster.go:553 +0x33
==================

CI link

https://github.com/tikv/pd/actions/runs/11007523642/job/30563564848?pr=8632

Reason for failure (if possible)

Anything else

@rleungx rleungx added the type/ci The issue is related to CI. label Sep 24, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 14b3b9d Sep 24, 2024
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