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 TestDMLCapturePlanBaseline #42333

Closed
Tracked by #41316
hawkingrei opened this issue Mar 16, 2023 · 0 comments · Fixed by #42943
Closed
Tracked by #41316

DATA RACE TestDMLCapturePlanBaseline #42333

hawkingrei opened this issue Mar 16, 2023 · 0 comments · Fixed by #42943
Assignees
Labels

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 0x00c00684dcb0 by goroutine 45598:

  runtime.mapassign_faststr()

      GOROOT/src/runtime/map_faststr.go:203 +0x0

  github.com/pingcap/tidb/sessionctx/variable.(*SysVar).SetSessionFromHook()

      sessionctx/variable/variable.go:225 +0x16c

  github.com/pingcap/tidb/sessionctx/variable.(*SessionVars).SetSystemVarWithRelaxedValidation()

      sessionctx/variable/session.go:2352 +0x17d

  github.com/pingcap/tidb/session.(*session).loadCommonGlobalVariablesIfNeeded()

      session/session.go:3662 +0x2db

  github.com/pingcap/tidb/session.(*session).ExecuteStmt()

      session/session.go:2093 +0x16b

  github.com/pingcap/tidb/session.(*session).ExecuteInternal()

      session/session.go:1628 +0x365

  github.com/pingcap/tidb/bindinfo.(*BindHandle).CreateBindRecord()

      bindinfo/handle.go:224 +0x298

  github.com/pingcap/tidb/bindinfo.(*BindHandle).CaptureBaselines()

      bindinfo/handle.go:945 +0xd47

  github.com/pingcap/tidb/domain.(*Domain).globalBindHandleWorkerLoop.func1()

      domain/domain.go:1640 +0x4f9

  github.com/pingcap/tidb/util.(*WaitGroupEnhancedWrapper).Run.func1()

      util/wait_group_wrapper.go:96 +0xde


Previous read at 0x00c00684dcb0 by goroutine 140:

  runtime.mapaccess1_faststr()

      GOROOT/src/runtime/map_faststr.go:13 +0x0

  github.com/pingcap/tidb/sessionctx/variable.(*SessionVars).GetCharsetInfo()

      sessionctx/variable/session.go:1990 +0xa4c

  github.com/pingcap/tidb/bindinfo.(*BindHandle).CaptureBaselines()

      bindinfo/handle.go:935 +0x9ab

  github.com/pingcap/tidb/executor.(*SQLBindExec).captureBindings()

      executor/bind.go:167 +0x64

  github.com/pingcap/tidb/executor.(*SQLBindExec).Next()

      executor/bind.go:59 +0x153

  github.com/pingcap/tidb/executor.Next()

      executor/executor.go:326 +0x375

  github.com/pingcap/tidb/executor.(*ExecStmt).next()

      executor/adapter.go:1212 +0x9d

  github.com/pingcap/tidb/executor.(*ExecStmt).handleNoDelayExecutor()

      executor/adapter.go:957 +0x57c

  github.com/pingcap/tidb/executor.(*ExecStmt).handleNoDelay()

      executor/adapter.go:782 +0x404

  github.com/pingcap/tidb/executor.(*ExecStmt).Exec()

      executor/adapter.go:577 +0x148d

  github.com/pingcap/tidb/session.runStmt()

      session/session.go:2333 +0x701

  github.com/pingcap/tidb/session.(*session).ExecuteStmt()

      session/session.go:2190 +0x12e6

  github.com/pingcap/tidb/testkit.(*TestKit).ExecWithContext()

      testkit/testkit.go:323 +0x791

  github.com/pingcap/tidb/testkit.(*TestKit).MustExecWithContext()

      testkit/testkit.go:132 +0xb7

  github.com/pingcap/tidb/testkit.(*TestKit).MustExec()

      testkit/testkit.go:127 +0xf7

  github.com/pingcap/tidb/bindinfo_test.TestDMLCapturePlanBaseline()

      bindinfo/capture_test.go:80 +0x91c

  github.com/pingcap/tidb/session.runStmt()

      session/session.go:2333 +0x701

  github.com/pingcap/tidb/session.(*session).ExecuteStmt()

      session/session.go:2190 +0x12e6

  github.com/pingcap/tidb/testkit.(*TestKit).ExecWithContext()

      testkit/testkit.go:323 +0x791

  github.com/pingcap/tidb/testkit.(*TestKit).MustExecWithContext()

      testkit/testkit.go:132 +0xb7

  github.com/pingcap/tidb/testkit.(*TestKit).MustExec()

      testkit/testkit.go:127 +0xf7

  github.com/pingcap/tidb/bindinfo_test.TestDMLCapturePlanBaseline()

      bindinfo/capture_test.go:41 +0xbd

  github.com/pingcap/tidb/domain.(*Domain).rebuildSysVarCache()

      domain/sysvar_cache.go:146 +0x7c4

  github.com/pingcap/tidb/domain.(*Domain).LoadSysVarCacheLoop()

      domain/domain.go:1470 +0xb9

  github.com/pingcap/tidb/session.BootstrapSession()

      session/session.go:3314 +0x7cc

  github.com/pingcap/tidb/domain.(*Domain).GetSessionCache()

      domain/sysvar_cache.go:62 +0x71

  github.com/pingcap/tidb/session.(*session).loadCommonGlobalVariablesIfNeeded()

      session/session.go:3656 +0x11e

  github.com/pingcap/tidb/session.(*session).ExecuteStmt()

      session/session.go:2093 +0x16b

  github.com/pingcap/tidb/session.(*session).ExecuteInternal()

      session/session.go:1628 +0x365

  github.com/pingcap/tidb/domain.(*Domain).LoadPrivilegeLoop()

      domain/domain.go:1414 +0x143

  github.com/pingcap/tidb/session.BootstrapSession()

      session/session.go:3307 +0x76c

  github.com/pingcap/tidb/testkit.bootstrap()

      testkit/mockstore.go:85 +0x84

  github.com/pingcap/tidb/testkit.CreateMockStoreAndDomain()

      testkit/mockstore.go:70 +0xd0

  github.com/pingcap/tidb/bindinfo_test.TestDMLCapturePlanBaseline()

      bindinfo/capture_test.go:36 +0x58

  testing.tRunner()

      GOROOT/src/testing/testing.go:1576 +0x216

  testing.(*T).Run.func1()

      GOROOT/src/testing/testing.go:1629 +0x47


Goroutine 45598 (running) created at:

  github.com/pingcap/tidb/util.(*WaitGroupEnhancedWrapper).Run()

      util/wait_group_wrapper.go:91 +0x15a

  github.com/pingcap/tidb/domain.(*Domain).globalBindHandleWorkerLoop()

      domain/domain.go:1615 +0x124

  github.com/pingcap/tidb/domain.(*Domain).LoadBindInfoLoop()

      domain/domain.go:1609 +0x231

  github.com/pingcap/tidb/session.BootstrapSession()

      session/session.go:3301 +0x6c8

  github.com/pingcap/tidb/testkit.bootstrap()

      testkit/mockstore.go:85 +0x84

  github.com/pingcap/tidb/testkit.CreateMockStoreAndDomain()

      testkit/mockstore.go:70 +0xd0

  github.com/pingcap/tidb/bindinfo_test.TestDMLCapturePlanBaseline()

      bindinfo/capture_test.go:36 +0x58

  testing.tRunner()

      GOROOT/src/testing/testing.go:1576 +0x216

  testing.(*T).Run.func1()

      GOROOT/src/testing/testing.go:1629 +0x47


Goroutine 140 (running) created at:

  testing.(*T).Run()

      GOROOT/src/testing/testing.go:1629 +0x805

  testing.runTests.func1()

      GOROOT/src/testing/testing.go:2036 +0x8d

  testing.tRunner()

      GOROOT/src/testing/testing.go:1576 +0x216

  testing.runTests()

      GOROOT/src/testing/testing.go:2034 +0x87c

  testing.(*M).Run()

      GOROOT/src/testing/testing.go:1906 +0xb44

  go.uber.org/goleak.VerifyTestMain()

      external/org_uber_go_goleak/testmain.go:53 +0x70

  github.com/pingcap/tidb/bindinfo_test.TestMain()

      bindinfo/main_test.go:32 +0x43c

  main.main()

      bazel-out/k8-fastbuild/bin/bindinfo/bindinfo_test_/testmain.go:274 +0x7ce

==================

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Mar 16, 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.1 may-affects-6.5 labels Apr 11, 2023
@tangenta tangenta added affects-6.5 and 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.1 may-affects-6.5 labels Apr 11, 2023
@jebter jebter added the sig/sql-infra SIG: SQL Infra label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants