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 at the ddl.(*worker).writeDDLSeqNum #44534

Closed
Tracked by #41316
hawkingrei opened this issue Jun 9, 2023 · 1 comment · Fixed by #44536
Closed
Tracked by #41316

DATA RACE at the ddl.(*worker).writeDDLSeqNum #44534

hawkingrei opened this issue Jun 9, 2023 · 1 comment · Fixed by #44536
Assignees
Labels
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 0x00c047d99b98 by goroutine 141714:
  github.com/pingcap/tidb/ddl.(*worker).writeDDLSeqNum()
      ddl/ddl_worker.go:617 +0x88
  github.com/pingcap/tidb/ddl.(*worker).finishDDLJob()
      ddl/ddl_worker.go:609 +0x4bb
  github.com/pingcap/tidb/ddl.(*worker).HandleJobDone()
      ddl/ddl_worker.go:707 +0x49
  github.com/pingcap/tidb/ddl.(*worker).HandleDDLJobTable()
      ddl/ddl_worker.go:761 +0x544
  github.com/pingcap/tidb/ddl.(*ddl).delivery2worker.func1()
      ddl/job_table.go:420 +0xb65
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
      util/wait_group_wrapper.go:154 +0x73
Previous write at 0x00c047d99b98 by goroutine 140756:
  github.com/pingcap/tidb/ddl.(*ddl).Start.func1()
      ddl/ddl.go:758 +0x86
  github.com/pingcap/tidb/owner.(*mockManager).toBeOwner()
      owner/mock.go:82 +0x36e
  github.com/pingcap/tidb/owner.(*mockManager).CampaignOwner.func1()
      owner/mock.go:136 +0x511
Goroutine 141714 (running) created at:
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run()
      util/wait_group_wrapper.go:152 +0xe4
  github.com/pingcap/tidb/ddl.(*ddl).delivery2worker()
      ddl/job_table.go:379 +0x1b7
  github.com/pingcap/tidb/ddl.(*ddl).loadDDLJobAndRun()
      ddl/job_table.go:372 +0x57c
  github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop()
      ddl/job_table.go:301 +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
Goroutine 140756 (running) created at:
  github.com/pingcap/tidb/owner.(*mockManager).CampaignOwner()
      owner/mock.go:118 +0xa6
  github.com/pingcap/tidb/ddl.(*ddl).EnableDDL()
      ddl/ddl.go:802 +0x68
  github.com/pingcap/tidb/ddl.(*ddl).Start()
      ddl/ddl.go:781 +0x9dc
  github.com/pingcap/tidb/domain.(*Domain).Init()
      domain/domain.go:1188 +0x169b
  github.com/pingcap/tidb/session.(*domainMap).Get.func1()
      session/tidb.go:93 +0x676
  github.com/pingcap/tidb/util.RunWithRetry()
      util/misc.go:69 +0x93
  github.com/pingcap/tidb/session.(*domainMap).Get()
      session/tidb.go:79 +0x2d2
  github.com/pingcap/tidb/session.createSessionWithOpt()
      session/session.go:3551 +0x75
  github.com/pingcap/tidb/session.createSession()
      session/session.go:3547 +0x84
  github.com/pingcap/tidb/session.createSessions()
      session/session.go:3532 +0x6e
  github.com/pingcap/tidb/session.BootstrapSession()
      session/session.go:3307 +0x3db
  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/testkit.CreateMockStore()
      testkit/mockstore.go:62 +0x3b1
  github.com/pingcap/tidb/planner/core_test.TestNonPreparedPlanCacheInListChange()
      planner/core/plan_cache_test.go:403 +0x44
  testing.tRunner()
      GOROOT/src/testing/testing.go:1576 +0x216
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1629 +0x47
================== 

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Jun 9, 2023
@ywqzzy
Copy link
Contributor

ywqzzy commented Jun 9, 2023

/assign @ywqzzy

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

Successfully merging a pull request may close this issue.

3 participants