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 the TestIndexChange #43942

Closed
Tracked by #41316
hawkingrei opened this issue May 18, 2023 · 0 comments · Fixed by #43952
Closed
Tracked by #41316

DATA RACE in the TestIndexChange #43942

hawkingrei opened this issue May 18, 2023 · 0 comments · Fixed by #43952
Labels
component/test severity/moderate type/bug The issue is confirmed as a bug.

Comments

@hawkingrei
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

==================
WARNING: DATA RACE
Read at 0x00c049cd7568 by goroutine 264182:
  github.com/pingcap/tidb/ddl_test.TestIndexChange()
      ddl/index_change_test.go:127 +0xd4f
  github.com/pingcap/tidb/domain.(*Domain).rebuildSysVarCache()
      domain/sysvar_cache.go:146 +0x8c4
  github.com/pingcap/tidb/domain.(*Domain).LoadSysVarCacheLoop()
      domain/domain.go:1607 +0xa8
  github.com/pingcap/tidb/session.BootstrapSession()
      session/session.go:3341 +0x6d3
  github.com/pingcap/tidb/domain.(*Domain).GetSessionCache()
      domain/sysvar_cache.go:62 +0x5c
  github.com/pingcap/tidb/session.(*session).loadCommonGlobalVariablesIfNeeded()
      session/session.go:3688 +0x104
  github.com/pingcap/tidb/session.(*session).ExecuteStmt()
      session/session.go:2104 +0x145
  github.com/pingcap/tidb/session.(*session).ExecuteInternal()
      session/session.go:1642 +0x31b
  github.com/pingcap/tidb/domain.(*Domain).LoadPrivilegeLoop()
      domain/domain.go:1551 +0x130
  github.com/pingcap/tidb/session.BootstrapSession()
      session/session.go:3334 +0x684
  github.com/pingcap/tidb/testkit.bootstrap()
      testkit/mockstore.go:85 +0xac
  github.com/pingcap/tidb/testkit.CreateMockStoreAndDomain()
      testkit/mockstore.go:70 +0xe9
  github.com/pingcap/tidb/ddl_test.TestIndexChange()
      ddl/index_change_test.go:37 +0x58
  testing.tRunner()
      GOROOT/src/testing/testing.go:1576 +0x216
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1629 +0x47
Previous write at 0x00c049cd7568 by goroutine 303513:
  github.com/pingcap/tidb/ddl_test.TestIndexChange.func2()
      ddl/index_change_test.go:100 +0xdb
  github.com/pingcap/tidb/ddl/internal/callback.(*TestDDLCallback).OnJobUpdated()
      ddl/internal/callback/callback.go:122 +0x210
  github.com/pingcap/tidb/ddl.(*ddl).delivery2worker.func1()
      ddl/job_table.go:445 +0x1161
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
      util/wait_group_wrapper.go:154 +0x73
Goroutine 264182 (running) created at:
  testing.(*T).Run()
      GOROOT/src/testing/testing.go:1629 +0x805
  testing.runTests.func1()
      GOROOT/src/testing/testing.go:2036 +0x8d
  testing.tRunner()
      GOROOT/src/testing/testing.go:1576 +0x216
  testing.runTests()
      GOROOT/src/testing/testing.go:2034 +0x87c
  testing.(*M).Run()
      GOROOT/src/testing/testing.go:1906 +0xb44
  go.uber.org/goleak.VerifyTestMain()
      external/org_uber_go_goleak/testmain.go:53 +0x70
  github.com/pingcap/tidb/ddl_test.TestMain()
      ddl/main_test.go:73 +0x9bd
  main.main()
      bazel-out/k8-fastbuild/bin/ddl/ddl_test_/testmain.go:1392 +0x5e8
      ddl/job_table.go:297 +0xc70
  github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop-fm()
      <autogenerated>:1 +0x39
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
      util/wait_group_wrapper.go:154 +0x73 

4. What is your TiDB version? (Required)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant