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 TestProxyProtocolWithIpNoFallbackable #51790

Closed
Tracked by #41316
hawkingrei opened this issue Mar 14, 2024 · 1 comment · Fixed by #51791
Closed
Tracked by #41316

DATA RACE in the TestProxyProtocolWithIpNoFallbackable #51790

hawkingrei opened this issue Mar 14, 2024 · 1 comment · Fixed by #51791
Labels
component/test 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
Read at 0x00c00936e380 by goroutine 290:
  github.com/pingcap/tidb/pkg/server.(*Server).Listener()
      pkg/server/server.go:159 +0x464
  pkg/server/tests/commontest/commontest_test.TestProxyProtocolWithIpNoFallbackable()
      pkg/server/tests/commontest/tidb_test.go:2974 +0x475
  github.com/pingcap/tidb/pkg/domain.(*Domain).rebuildSysVarCache()
      pkg/domain/sysvar_cache.go:146 +0x904
  github.com/pingcap/tidb/pkg/domain.(*Domain).LoadSysVarCacheLoop()
      pkg/domain/domain.go:1730 +0x93
  github.com/pingcap/tidb/pkg/session.bootstrapSessionImpl()
      pkg/session/session.go:3383 +0x844
  github.com/pingcap/tidb/pkg/domain.(*Domain).GetSessionCache()
      pkg/domain/sysvar_cache.go:62 +0x50
  github.com/pingcap/tidb/pkg/session.(*session).loadCommonGlobalVariablesIfNeeded()
      pkg/session/session.go:3751 +0x2ce
  github.com/pingcap/tidb/pkg/session.(*session).ExecuteStmt()
      pkg/session/session.go:2104 +0x184
  github.com/pingcap/tidb/pkg/session.(*session).ExecuteInternal()
      pkg/session/session.go:1619 +0x3b9
  github.com/pingcap/tidb/pkg/domain.(*Domain).LoadPrivilegeLoop()
      pkg/domain/domain.go:1673 +0x108
  github.com/pingcap/tidb/pkg/session.bootstrapSessionImpl()
      pkg/session/session.go:3376 +0x7e4
  github.com/pingcap/tidb/pkg/session.BootstrapSession()
      pkg/session/session.go:3283 +0x22a
  github.com/pingcap/tidb/pkg/server/tests/servertestkit.CreateTidbTestSuiteWithCfg()
      pkg/server/tests/servertestkit/testkit.go:69 +0x1b5
  github.com/pingcap/tidb/pkg/server/tests/servertestkit.CreateTidbTestSuite()
      pkg/server/tests/servertestkit/testkit.go:57 +0x1fa
  pkg/server/tests/commontest/commontest_test.TestProxyProtocolWithIpNoFallbackable()
      pkg/server/tests/commontest/tidb_test.go:2959 +0x231
  testing.tRunner()
      GOROOT/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1648 +0x44
Previous write at 0x00c00936e380 by goroutine 37546:
  github.com/pingcap/tidb/pkg/server.(*Server).initTiDBListener()
      pkg/server/server.go:343 +0xbde
  github.com/pingcap/tidb/pkg/server.(*Server).Run()
      pkg/server/server.go:448 +0x4a7
  pkg/server/tests/commontest/commontest_test.TestProxyProtocolWithIpNoFallbackable.func1()
      pkg/server/tests/commontest/tidb_test.go:2966 +0x35
Goroutine 290 (running) created at:
  testing.(*T).Run()
      GOROOT/src/testing/testing.go:1648 +0x845
  testing.runTests.func1()
      GOROOT/src/testing/testing.go:2054 +0x84
  testing.tRunner()
      GOROOT/src/testing/testing.go:1595 +0x261
  testing.runTests()
      GOROOT/src/testing/testing.go:2052 +0x8ad
  testing.(*M).Run()
      GOROOT/src/testing/testing.go:1925 +0xcd7
  go.uber.org/goleak.VerifyTestMain()
      external/org_uber_go_goleak/testmain.go:53 +0x64
  pkg/server/tests/commontest/commontest_test.TestMain()
      pkg/server/tests/commontest/main_test.go:74 +0x100d
  main.main()
      bazel-out/k8-fastbuild/bin/pkg/server/tests/commontest/commontest_test_/testmain.go:217 +0x5d1
Goroutine 37546 (running) created at:
  pkg/server/tests/commontest/commontest_test.TestProxyProtocolWithIpNoFallbackable()
      pkg/server/tests/commontest/tidb_test.go:2965 +0x3d7
  github.com/pingcap/tidb/pkg/domain.(*Domain).rebuildSysVarCache()
      pkg/domain/sysvar_cache.go:146 +0x904
  github.com/pingcap/tidb/pkg/domain.(*Domain).LoadSysVarCacheLoop()
      pkg/domain/domain.go:1730 +0x93
  github.com/pingcap/tidb/pkg/session.bootstrapSessionImpl()
      pkg/session/session.go:3383 +0x844
  github.com/pingcap/tidb/pkg/domain.(*Domain).GetSessionCache()
      pkg/domain/sysvar_cache.go:62 +0x50
  github.com/pingcap/tidb/pkg/session.(*session).loadCommonGlobalVariablesIfNeeded()
      pkg/session/session.go:3751 +0x2ce
  github.com/pingcap/tidb/pkg/session.(*session).ExecuteStmt()
      pkg/session/session.go:2104 +0x184
  github.com/pingcap/tidb/pkg/session.(*session).ExecuteInternal()
      pkg/session/session.go:1619 +0x3b9
  github.com/pingcap/tidb/pkg/domain.(*Domain).LoadPrivilegeLoop()
      pkg/domain/domain.go:1673 +0x108
  github.com/pingcap/tidb/pkg/session.bootstrapSessionImpl()
      pkg/session/session.go:3376 +0x7e4
  github.com/pingcap/tidb/pkg/session.BootstrapSession()
      pkg/session/session.go:3283 +0x22a
  github.com/pingcap/tidb/pkg/server/tests/servertestkit.CreateTidbTestSuiteWithCfg()
      pkg/server/tests/servertestkit/testkit.go:69 +0x1b5
  github.com/pingcap/tidb/pkg/server/tests/servertestkit.CreateTidbTestSuite()
      pkg/server/tests/servertestkit/testkit.go:57 +0x1fa
  pkg/server/tests/commontest/commontest_test.TestProxyProtocolWithIpNoFallbackable()
      pkg/server/tests/commontest/tidb_test.go:2959 +0x231
  testing.tRunner()
      GOROOT/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1648 +0x44
================== 

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test 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.

2 participants