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 domain.(*Domain).SetDDL() #36766

Closed
hawkingrei opened this issue Aug 1, 2022 · 0 comments · Fixed by #36768
Closed

DATA RACE in the domain.(*Domain).SetDDL() #36766

hawkingrei opened this issue Aug 1, 2022 · 0 comments · Fixed by #36768
Assignees
Labels
component/test severity/minor sig/sql-infra SIG: SQL Infra 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)

 WARNING: DATA RACE
Write at 0x00c005ab0a38 by goroutine 81:
  github.com/pingcap/tidb/domain.(*Domain).SetDDL()
      /go/tidb/domain/domain.go:381 +0x2a6
  github.com/pingcap/tidb/ddl_test.TestAnonymousIndex()
      /go/tidb/ddl/index_modify_test.go:1069 +0x299
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /usr/local/go/src/testing/testing.go:1486 +0x47
Previous read at 0x00c005ab0a38 by goroutine 180:
  github.com/pingcap/tidb/domain.(*Domain).loadSchemaInLoop()
      /go/tidb/domain/domain.go:611 +0x10c
  github.com/pingcap/tidb/domain.(*Domain).Init.func4()
      /go/tidb/domain/domain.go:887 +0x64
Goroutine 81 (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
  go.uber.org/goleak.VerifyTestMain()
      /home/prow/go/pkg/mod/go.uber.org/[email protected]/testmain.go:53 +0x59
  github.com/pingcap/tidb/ddl_test.TestMain()
      /go/tidb/ddl/main_test.go:68 +0x5f9
  main.main()
      _testmain.go:1345 +0x3f7
Goroutine 180 (running) created at:
  github.com/pingcap/tidb/domain.(*Domain).Init()
      /go/tidb/domain/domain.go:887 +0x1294
  github.com/pingcap/tidb/session.(*domainMap).Get.func1()
      /go/tidb/session/tidb.go:85 +0x664
  github.com/pingcap/tidb/util.RunWithRetry()
      /go/tidb/util/misc.go:69 +0x93
  github.com/pingcap/tidb/session.(*domainMap).Get()
      /go/tidb/session/tidb.go:73 +0x319
  github.com/pingcap/tidb/session.createSessionWithOpt()
      /go/tidb/session/session.go:2821 +0x75
  github.com/pingcap/tidb/session.createSession()
      /go/tidb/session/session.go:2817 +0x84
  github.com/pingcap/tidb/session.createSessions()
      /go/tidb/session/session.go:2806 +0x6e
  github.com/pingcap/tidb/session.BootstrapSession()
      /go/tidb/session/session.go:2685 +0x317
  github.com/pingcap/tidb/testkit.bootstrap()
      /go/tidb/testkit/mockstore.go:71 +0x8c
  github.com/pingcap/tidb/testkit.CreateMockStoreAndDomainWithSchemaLease()
      /go/tidb/testkit/mockstore.go:94 +0xd8
  github.com/pingcap/tidb/ddl_test.TestAnonymousIndex()
      /go/tidb/ddl/index_modify_test.go:1065 +0x5d
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /usr/local/go/src/testing/testing.go:1486 +0x47 

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

3. What did you see instead (Required)

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/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants