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 worker.mergeWarningsIntoJob #40940

Closed
hawkingrei opened this issue Feb 1, 2023 · 1 comment
Closed

DATA RACE in the worker.mergeWarningsIntoJob #40940

hawkingrei opened this issue Feb 1, 2023 · 1 comment
Labels
severity/major 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)

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

3. What did you see instead (Required)

 WARNING: DATA RACE
Write at 0x00c00e237cc0 by goroutine 189474:
  github.com/pingcap/tidb/parser/model.(*Job).SetWarnings()
      parser/model/ddl.go:598 +0x231
  github.com/pingcap/tidb/ddl.(*worker).mergeWarningsIntoJob()
      ddl/reorg.go:283 +0x137
  github.com/pingcap/tidb/ddl.(*worker).runReorgJob()
      ddl/reorg.go:264 +0xd10
  github.com/pingcap/tidb/ddl.runReorgJobAndHandleErr()
      ddl/index.go:925 +0x687
  github.com/pingcap/tidb/ddl.doReorgWorkForCreateIndex()
      ddl/index.go:859 +0xbe8
  github.com/pingcap/tidb/ddl.(*worker).onCreateIndex()
      ddl/index.go:670 +0x11ad
  github.com/pingcap/tidb/ddl.(*worker).runDDLJob()
      ddl/ddl_worker.go:1011 +0x7f5
  github.com/pingcap/tidb/ddl.(*worker).HandleDDLJobTable()
      ddl/ddl_worker.go:763 +0x67c
  github.com/pingcap/tidb/ddl.(*ddl).delivery2worker.func1()
      ddl/job_table.go:271 +0xb45
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
      util/wait_group_wrapper.go:154 +0x73
Previous read at 0x00c00e237cc0 by goroutine 189486:
  github.com/pingcap/tidb/parser/model.(*Job).String()
      parser/model/ddl.go:672 +0x4b1
  github.com/pingcap/tidb/ddl.(*worker).addPhysicalTableIndex()
      ddl/index.go:1721 +0x356
  github.com/pingcap/tidb/ddl.(*worker).addTableIndex()
      ddl/index.go:1735 +0x411
  github.com/pingcap/tidb/ddl.runReorgJobAndHandleErr.func1()
      ddl/index.go:930 +0x131
  github.com/pingcap/tidb/ddl.(*worker).runReorgJob.func1()
      ddl/reorg.go:211 +0x92
Goroutine 189474 (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:230 +0x1b7
  github.com/pingcap/tidb/ddl.(*ddl).loadDDLJobAndRun()
      ddl/job_table.go:223 +0x57c
  github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop()
      ddl/job_table.go:196 +0xad1
  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 189486 (running) created at:
  github.com/pingcap/tidb/ddl.(*worker).runReorgJob()
      ddl/reorg.go:209 +0x579
  github.com/pingcap/tidb/ddl.runReorgJobAndHandleErr()
      ddl/index.go:925 +0x687
  github.com/pingcap/tidb/ddl.doReorgWorkForCreateIndex()
      ddl/index.go:859 +0xbe8
  github.com/pingcap/tidb/ddl.(*worker).onCreateIndex()
      ddl/index.go:670 +0x11ad
  github.com/pingcap/tidb/ddl.(*worker).runDDLJob()
      ddl/ddl_worker.go:1011 +0x7f5
  github.com/pingcap/tidb/ddl.(*worker).HandleDDLJobTable()
      ddl/ddl_worker.go:763 +0x67c
  github.com/pingcap/tidb/ddl.(*ddl).delivery2worker.func1()
      ddl/job_table.go:271 +0xb45
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
      util/wait_group_wrapper.go:154 +0x73 

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Feb 1, 2023
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 may-affects-6.5 labels Feb 1, 2023
@ChenPeng2013 ChenPeng2013 removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 may-affects-6.5 labels Feb 1, 2023
@hawkingrei
Copy link
Member Author

the same as #40751

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants