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 importintotest #45655

Closed
Tracked by #41316
hawkingrei opened this issue Jul 28, 2023 · 1 comment · Fixed by #45657
Closed
Tracked by #41316

DATA RACE in the importintotest #45655

hawkingrei opened this issue Jul 28, 2023 · 1 comment · Fixed by #45657
Labels
component/test severity/moderate 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

Read at 0x00c00191e690 by goroutine 1001977:

  github.com/pingcap/tidb/util/chunk.(*allocator).Reset()

      util/chunk/alloc.go:121 +0x4c

  github.com/pingcap/tidb/testkit.(*TestKit).MustQuery.func1()

      testkit/testkit.go:146 +0x67

  runtime.deferCallSave()

      GOROOT/src/runtime/panic.go:796 +0x87

  testing.(*T).FailNow()

      <autogenerated>:1 +0x37

  github.com/stretchr/testify/require.NoError()

      external/com_github_stretchr_testify/require/require.go:1360 +0xc7

  github.com/stretchr/testify/require.(*Assertions).NoError()

      external/com_github_stretchr_testify/require/require_forward.go:1075 +0xae

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

      testkit/testkit.go:172 +0x1cb

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

      testkit/testkit.go:149 +0x107

  tests/realtikvtest/importintotest/importintotest_test.(*mockGCSSuite).TestShowDetachedJob()

      tests/realtikvtest/importintotest/job_test.go:306 +0x1108

  runtime.call16()

      src/runtime/asm_amd64.s:728 +0x48

  reflect.Value.Call()

      GOROOT/src/reflect/value.go:370 +0xc7

  github.com/stretchr/testify/suite.Run.func1()

      external/com_github_stretchr_testify/suite/suite.go:197 +0x70d

  testing.tRunner()

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

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

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


Previous write at 0x00c00191e690 by goroutine 1014984:

  github.com/pingcap/tidb/util/chunk.(*allocator).Reset()

      util/chunk/alloc.go:128 +0x364

  github.com/pingcap/tidb/testkit.(*TestKit).MustQuery.func1()

      testkit/testkit.go:146 +0x67

  runtime.deferreturn()

      GOROOT/src/runtime/panic.go:476 +0x32

  tests/realtikvtest/importintotest/importintotest_test.(*mockGCSSuite).TestShowDetachedJob.func1()

      tests/realtikvtest/importintotest/job_test.go:296 +0xda

  github.com/stretchr/testify/assert.Eventually.func1()

      external/com_github_stretchr_testify/assert/assertions.go:1852 +0x39


Goroutine 1001977 (running) created at:

  testing.(*T).Run()

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

  github.com/stretchr/testify/suite.runTests()

      external/com_github_stretchr_testify/suite/suite.go:242 +0x19c

  github.com/stretchr/testify/suite.Run()

      external/com_github_stretchr_testify/suite/suite.go:215 +0x9b2

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

      testkit/testkit.go:340 +0x8ae

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

      testkit/testkit.go:132 +0xb7

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

      testkit/testkit.go:127 +0x138

  github.com/pingcap/tidb/tests/realtikvtest.CreateMockStoreAndDomainAndSetup()

      tests/realtikvtest/testkit.go:122 +0x34e

  github.com/pingcap/tidb/sessionctx/variable.glob..func185()

      sessionctx/variable/sysvar.go:954 +0x5e

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

      sessionctx/variable/variable.go:361 +0x1c7

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

      domain/sysvar_cache.go:146 +0x8c4

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

      domain/domain.go:1907 +0xa8

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

      session/session.go:3392 +0x6e4

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

      domain/sysvar_cache.go:62 +0x5c

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

      session/session.go:3763 +0x104

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

      session/session.go:2155 +0x145

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

      session/session.go:1669 +0x31b

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

      domain/domain.go:1850 +0x130

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

      session/session.go:3385 +0x687

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

      session/session.go:3306 +0x1ed

  github.com/pingcap/tidb/tests/realtikvtest.CreateMockStoreAndDomainAndSetup()

      tests/realtikvtest/testkit.go:116 +0x1d1

  github.com/pingcap/tidb/tests/realtikvtest.CreateMockStoreAndSetup()

      tests/realtikvtest/testkit.go:91 +0x226

  tests/realtikvtest/importintotest/importintotest_test.(*mockGCSSuite).SetupSuite()

      tests/realtikvtest/importintotest/util_test.go:62 +0x20e

  github.com/stretchr/testify/suite.Run()

      external/com_github_stretchr_testify/suite/suite.go:154 +0x5d7

  tests/realtikvtest/importintotest/importintotest_test.TestLoadRemote()

      tests/realtikvtest/importintotest/util_test.go:48 +0x9b

  testing.tRunner()

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

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

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


Goroutine 1014984 (finished) created at:

  github.com/stretchr/testify/assert.Eventually()

      external/com_github_stretchr_testify/assert/assertions.go:1852 +0x3a5

  github.com/stretchr/testify/assert.(*Assertions).Eventually()

      external/com_github_stretchr_testify/assert/assertion_forward.go:322 +0xc4

  tests/realtikvtest/importintotest/importintotest_test.(*mockGCSSuite).TestShowDetachedJob()

      tests/realtikvtest/importintotest/job_test.go:295 +0xcb4

  runtime.call16()

      src/runtime/asm_amd64.s:728 +0x48

  reflect.Value.Call()

      GOROOT/src/reflect/value.go:370 +0xc7

  github.com/stretchr/testify/suite.Run.func1()

      external/com_github_stretchr_testify/suite/suite.go:197 +0x70d

  testing.tRunner()

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

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

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

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

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

WARNING: DATA RACE

Read at 0x00c00c1d0198 by goroutine 1001977:

  github.com/pingcap/tidb/util/chunk.(*allocator).Reset()

      util/chunk/alloc.go:132 +0x46a

  github.com/pingcap/tidb/testkit.(*TestKit).MustQuery.func1()

      testkit/testkit.go:146 +0x67

  runtime.deferCallSave()

      GOROOT/src/runtime/panic.go:796 +0x87

  testing.(*T).FailNow()

      <autogenerated>:1 +0x37

  github.com/stretchr/testify/require.NoError()

      external/com_github_stretchr_testify/require/require.go:1360 +0xc7

  github.com/stretchr/testify/require.(*Assertions).NoError()

      external/com_github_stretchr_testify/require/require_forward.go:1075 +0xae

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

      testkit/testkit.go:172 +0x1cb

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

      testkit/testkit.go:149 +0x107

  tests/realtikvtest/importintotest/importintotest_test.(*mockGCSSuite).TestShowDetachedJob()

      tests/realtikvtest/importintotest/job_test.go:306 +0x1108

  runtime.call16()

      src/runtime/asm_amd64.s:728 +0x48

  reflect.Value.Call()

      GOROOT/src/reflect/value.go:370 +0xc7

  github.com/stretchr/testify/suite.Run.func1()

      external/com_github_stretchr_testify/suite/suite.go:197 +0x70d

  testing.tRunner()

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

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

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


Previous write at 0x00c00c1d0198 by goroutine 1014984:

  github.com/pingcap/tidb/util/chunk.(*allocator).Reset()

      util/chunk/alloc.go:139 +0x3e4

  github.com/pingcap/tidb/testkit.(*TestKit).MustQuery.func1()

      testkit/testkit.go:146 +0x67

  runtime.deferreturn()

      GOROOT/src/runtime/panic.go:476 +0x32

  tests/realtikvtest/importintotest/importintotest_test.(*mockGCSSuite).TestShowDetachedJob.func1()

      tests/realtikvtest/importintotest/job_test.go:296 +0xda

  github.com/stretchr/testify/assert.Eventually.func1()

      external/com_github_stretchr_testify/assert/assertions.go:1852 +0x39


Goroutine 1001977 (running) created at:

  testing.(*T).Run()

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

  github.com/stretchr/testify/suite.runTests()

      external/com_github_stretchr_testify/suite/suite.go:242 +0x19c

  github.com/stretchr/testify/suite.Run()

      external/com_github_stretchr_testify/suite/suite.go:215 +0x9b2

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

      testkit/testkit.go:340 +0x8ae

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

      testkit/testkit.go:132 +0xb7

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

      testkit/testkit.go:127 +0x138

  github.com/pingcap/tidb/tests/realtikvtest.CreateMockStoreAndDomainAndSetup()

      tests/realtikvtest/testkit.go:122 +0x34e

  github.com/pingcap/tidb/sessionctx/variable.glob..func185()

      sessionctx/variable/sysvar.go:954 +0x5e

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

      sessionctx/variable/variable.go:361 +0x1c7

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

      domain/sysvar_cache.go:146 +0x8c4

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

      domain/domain.go:1907 +0xa8

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

      session/session.go:3392 +0x6e4

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

      domain/sysvar_cache.go:62 +0x5c

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

      session/session.go:3763 +0x104

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

      session/session.go:2155 +0x145

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

      session/session.go:1669 +0x31b

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

      domain/domain.go:1850 +0x130

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

      session/session.go:3385 +0x687

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

      session/session.go:3306 +0x1ed

  github.com/pingcap/tidb/tests/realtikvtest.CreateMockStoreAndDomainAndSetup()

      tests/realtikvtest/testkit.go:116 +0x1d1

  github.com/pingcap/tidb/tests/realtikvtest.CreateMockStoreAndSetup()

      tests/realtikvtest/testkit.go:91 +0x226

  tests/realtikvtest/importintotest/importintotest_test.(*mockGCSSuite).SetupSuite()

      tests/realtikvtest/importintotest/util_test.go:62 +0x20e

  github.com/stretchr/testify/suite.Run()

      external/com_github_stretchr_testify/suite/suite.go:154 +0x5d7

  tests/realtikvtest/importintotest/importintotest_test.TestLoadRemote()

      tests/realtikvtest/importintotest/util_test.go:48 +0x9b

  testing.tRunner()

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

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

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


Goroutine 1014984 (finished) created at:

  github.com/stretchr/testify/assert.Eventually()

      external/com_github_stretchr_testify/assert/assertions.go:1852 +0x3a5

  github.com/stretchr/testify/assert.(*Assertions).Eventually()

      external/com_github_stretchr_testify/assert/assertion_forward.go:322 +0xc4

  tests/realtikvtest/importintotest/importintotest_test.(*mockGCSSuite).TestShowDetachedJob()

      tests/realtikvtest/importintotest/job_test.go:295 +0xcb4

  runtime.call16()

      src/runtime/asm_amd64.s:728 +0x48

  reflect.Value.Call()

      GOROOT/src/reflect/value.go:370 +0xc7

  github.com/stretchr/testify/suite.Run.func1()

      external/com_github_stretchr_testify/suite/suite.go:197 +0x70d

  testing.tRunner()

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

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

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

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

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants