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 TestSetLabelsConcurrentWithGetLabel #45578

Closed
Tracked by #41316
gengliqi opened this issue Jul 26, 2023 · 3 comments · Fixed by #45579
Closed
Tracked by #41316

Data race in TestSetLabelsConcurrentWithGetLabel #45578

gengliqi opened this issue Jul 26, 2023 · 3 comments · Fixed by #45579

Comments

@gengliqi
Copy link
Contributor

Bug Report

WARNING: DATA RACE
Write at 0x00c01a99a6d0 by goroutine 15958:
  github.com/pingcap/tidb/server.TestSetLabelsConcurrentWithGetLabel()
      server/http_handler_test.go:1240 +0x2ce
  github.com/pingcap/tidb/sessionctx/variable.(*SysVar).ValidateWithRelaxedValidation()
      sessionctx/variable/variable.go:361 +0x213
  github.com/pingcap/tidb/domain.(*Domain).rebuildSysVarCache()
      domain/sysvar_cache.go:146 +0x73c
  github.com/pingcap/tidb/domain.(*Domain).LoadSysVarCacheLoop()
      domain/domain.go:1384 +0xb9
  github.com/pingcap/tidb/session.BootstrapSession()
      session/session.go:3312 +0x78c
  github.com/pingcap/tidb/domain.(*Domain).GetSessionCache()
      domain/sysvar_cache.go:62 +0x6a
  github.com/pingcap/tidb/session.(*session).loadCommonGlobalVariablesIfNeeded()
      session/session.go:3578 +0x11e
  github.com/pingcap/tidb/session.(*session).ExecuteStmt()
      session/session.go:2156 +0x2fb
  github.com/pingcap/tidb/session.(*session).ExecuteInternal()
      session/session.go:1702 +0x4eb
  github.com/pingcap/tidb/domain.(*Domain).LoadPrivilegeLoop()
      domain/domain.go:1326 +0x143
  github.com/pingcap/tidb/session.BootstrapSession()
      session/session.go:3305 +0x72c
  github.com/pingcap/tidb/server.(*basicHTTPHandlerTestSuite).startServer()
      server/http_handler_test.go:448 +0x119
  github.com/pingcap/tidb/server.TestSetLabelsConcurrentWithGetLabel()
      server/http_handler_test.go:1205 +0x117
  testing.tRunner()
      GOROOT/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1493 +0x47

Previous read at 0x00c01a99a6d0 by goroutine 31090:
  github.com/pingcap/tidb/config.(*Config).GetTiKVConfig()
      config/config.go:317 +0x134
  github.com/pingcap/tidb/server.TestSetLabelsConcurrentWithGetLabel.func2()
      server/http_handler_test.go:1230 +0x32
@gengliqi gengliqi added the type/bug The issue is confirmed as a bug. label Jul 26, 2023
@gengliqi
Copy link
Contributor Author

/severity minor

@jebter
Copy link

jebter commented Sep 21, 2023

/component test

@jebter
Copy link

jebter commented Sep 21, 2023

/component pd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants