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 ReuseChunkPool #46282

Open
Tracked by #41316
hawkingrei opened this issue Aug 21, 2023 · 1 comment
Open
Tracked by #41316

DATA RACE in the ReuseChunkPool #46282

hawkingrei opened this issue Aug 21, 2023 · 1 comment
Labels
severity/moderate 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 0x00c0086f71f0 by goroutine 49824:
  github.com/pingcap/tidb/sessionctx/variable.(*SessionVars).SetAlloc()
      sessionctx/variable/session.go:1608 +0x8d
  github.com/pingcap/tidb/testkit.(*TestKit).ExecWithContext()
      testkit/testkit.go:332 +0x2b2
  github.com/pingcap/tidb/testkit.(*TestKit).MustExecWithContext()
      testkit/testkit.go:132 +0xab
  github.com/pingcap/tidb/testkit.(*TestKit).MustExec()
      testkit/testkit.go:127 +0x10d
  github.com/pingcap/tidb/ddl/ingest_test.injectMockBackendMgr.func1()
      ddl/ingest/integration_test.go:45 +0x4a
  github.com/pingcap/tidb/ddl/ingest.(*MockBackendCtxMgr).Register()
      ddl/ingest/mock.go:55 +0x1c1
  github.com/pingcap/tidb/ddl.pickBackfillType()
      ddl/index.go:744 +0x552
  github.com/pingcap/tidb/ddl.(*worker).onCreateIndex()
      ddl/index.go:629 +0xe85
  github.com/pingcap/tidb/ddl.(*worker).runDDLJob()
      ddl/ddl_worker.go:1054 +0xb7e
  github.com/pingcap/tidb/ddl.(*worker).HandleDDLJobTable()
      ddl/ddl_worker.go:775 +0x7f6
  github.com/pingcap/tidb/ddl.(*ddl).delivery2worker.func1()
      ddl/job_table.go:414 +0xd58
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
      util/wait_group_wrapper.go:154 +0x84
Previous write at 0x00c0086f71f0 by goroutine 49818:
  github.com/pingcap/tidb/sessionctx/variable.(*SessionVars).ClearAlloc()
      sessionctx/variable/session.go:1624 +0x14a
  github.com/pingcap/tidb/testkit.(*TestKit).ExecWithContext.func1()
      testkit/testkit.go:318 +0x4e
  runtime.deferreturn()
      GOROOT/src/runtime/panic.go:477 +0x30
  github.com/pingcap/tidb/testkit.(*TestKit).MustExecWithContext()
      testkit/testkit.go:132 +0xab
  github.com/pingcap/tidb/testkit.(*TestKit).MustExec()
      testkit/testkit.go:127 +0x10d
  github.com/pingcap/tidb/ddl/ingest_test.injectMockBackendMgr.func1()
      ddl/ingest/integration_test.go:46 +0x67
  github.com/pingcap/tidb/ddl/ingest.(*MockBackendCtxMgr).Register()
      ddl/ingest/mock.go:55 +0x1c1
  github.com/pingcap/tidb/ddl.pickBackfillType()
      ddl/index.go:744 +0x552
  github.com/pingcap/tidb/ddl.(*worker).onCreateIndex()
      ddl/index.go:629 +0xe85
  github.com/pingcap/tidb/ddl.(*worker).runDDLJob()
      ddl/ddl_worker.go:1054 +0xb7e
  github.com/pingcap/tidb/ddl.(*worker).HandleDDLJobTable()
      ddl/ddl_worker.go:775 +0x7f6
  github.com/pingcap/tidb/ddl.(*ddl).delivery2worker.func1()
      ddl/job_table.go:414 +0xd58
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
      util/wait_group_wrapper.go:154 +0x84
Goroutine 49824 (running) created at:
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run()
      util/wait_group_wrapper.go:152 +0xf0
  github.com/pingcap/tidb/ddl.(*ddl).delivery2worker()
      ddl/job_table.go:373 +0x1c5
  github.com/pingcap/tidb/ddl.(*ddl).loadDDLJobAndRun()
      ddl/job_table.go:366 +0x50d
  github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop()
      ddl/job_table.go:302 +0xb5a
  github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop-fm()
      <autogenerated>:1 +0x33
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
      util/wait_group_wrapper.go:154 +0x84
Goroutine 49818 (running) created at:
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run()
      util/wait_group_wrapper.go:152 +0xf0
  github.com/pingcap/tidb/ddl.(*ddl).delivery2worker()
      ddl/job_table.go:373 +0x1c5
  github.com/pingcap/tidb/ddl.(*ddl).loadDDLJobAndRun()
      ddl/job_table.go:366 +0x50d
  github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop()
      ddl/job_table.go:302 +0xb5a
  github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop-fm()
      <autogenerated>:1 +0x33
  github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
      util/wait_group

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
severity/moderate 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.

1 participant