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 found in the domain owner #57199

Closed
3AceShowHand opened this issue Nov 7, 2024 · 0 comments · Fixed by #57200
Closed

data race found in the domain owner #57199

3AceShowHand opened this issue Nov 7, 2024 · 0 comments · Fixed by #57200
Assignees
Labels
affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@3AceShowHand
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

dm unit test failed, and report data race from the domain owner manager

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

run normally

3. What did you see instead (Required)

WARNING: DATA RACE
Read at 0x00c009bf65d8 by goroutine 2545:
  github.com/pingcap/tidb/pkg/owner.(*mockManager).toBeOwner()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/owner/mock.go:91 +0x364
  github.com/pingcap/tidb/pkg/owner.(*mockManager).CampaignOwner.func1()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/owner/mock.go:157 +0x43d

Previous write at 0x00c009bf65d8 by goroutine 448:
  github.com/pingcap/tidb/pkg/owner.(*mockManager).SetListener()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/owner/mock.go:181 +0x39
  github.com/pingcap/tidb/pkg/domain.(*Domain).UpdateTableStatsLoop()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/domain/domain.go:2389 +0x7b4
  github.com/pingcap/tidb/pkg/domain.(*Domain).LoadAndUpdateStatsLoop()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/domain/domain.go:2353 +0x75
  github.com/pingcap/tidb/pkg/session.bootstrapSessionImpl()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/session/session.go:3629 +0x1b57
  github.com/pingcap/tidb/pkg/domain.(*Domain).rebuildSysVarCache()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/domain/sysvar_cache.go:143 +0xa34
  github.com/pingcap/tidb/pkg/sessionctx/variable.init.func215()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/sessionctx/variable/sysvar.go:1129 +0x52
  github.com/pingcap/tidb/pkg/sessionctx/variable.(*SysVar).ValidateWithRelaxedValidation()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/sessionctx/variable/variable.go:377 +0x242
  github.com/pingcap/tidb/pkg/domain.(*Domain).rebuildSysVarCache()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/domain/sysvar_cache.go:142 +0x9c4
  github.com/pingcap/tidb/pkg/sessionctx/variable.parseSchemaCacheSize()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/sessionctx/variable/varsutil.go:638 +0x17c
  github.com/pingcap/tidb/pkg/sessionctx/variable.init.func618()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/sessionctx/variable/sysvar.go:3296 +0x67
  github.com/pingcap/tidb/pkg/domain.(*Domain).rebuildSysVarCache()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/domain/sysvar_cache.go:143 +0xa34
  github.com/pingcap/tidb/pkg/sessionctx/variable.init.func617()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/sessionctx/variable/sysvar.go:3288 +0x52
  github.com/pingcap/tidb/pkg/sessionctx/variable.(*SysVar).ValidateWithRelaxedValidation()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/sessionctx/variable/variable.go:377 +0x242
  github.com/pingcap/tidb/pkg/domain.(*Domain).rebuildSysVarCache()
      /go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20241106150256-0a8a35b8eb2a/pkg/domain/sysvar_cache.go:142 +0x9c4
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x18e
  github.com/pingcap/tidb/pkg/sessionctx/variable.parseByteSize()

4. What is your TiDB version? (Required)

master

@3AceShowHand 3AceShowHand added the type/bug The issue is confirmed as a bug. label Nov 7, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in d0c3c33 Nov 7, 2024
@ti-chi-bot ti-chi-bot bot added the affects-8.5 This bug affects the 8.5.x(LTS) versions. label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants