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

datarace in running mysql test #44792

Closed
Tracked by #41316
AilinKid opened this issue Jun 19, 2023 · 1 comment
Closed
Tracked by #41316

datarace in running mysql test #44792

AilinKid opened this issue Jun 19, 2023 · 1 comment
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@AilinKid
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

WARNING: DATA RACE

Read at 0x00000c2b3710 by goroutine 14484:
  github.com/tikv/client-go/v2/internal/client.buildResourceControlInterceptor()
      /go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/client/client_interceptor.go:99 +0xd1
  github.com/tikv/client-go/v2/internal/client.interceptedClient.SendRequest()
      /go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/client/client_interceptor.go:49 +0xca
  github.com/tikv/client-go/v2/internal/client.(*interceptedClient).SendRequest()
      <autogenerated>:1 +0xbd
  github.com/tikv/client-go/v2/internal/client.reqCollapse.SendRequest()
      /go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/client/client_collapse.go:74 +0x130
  github.com/tikv/client-go/v2/internal/client.(*reqCollapse).SendRequest()
      <autogenerated>:1 +0xae
  github.com/tikv/client-go/v2/internal/locate.(*RegionRequestSender).sendReqToRegion()
      /go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/locate/region_request.go:1412 +0x1238
  github.com/tikv/client-go/v2/internal/locate.(*RegionRequestSender).SendReqCtx()
      /go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/locate/region_request.go:1220 +0x1f89
  github.com/tikv/client-go/v2/txnkv/txnsnapshot.(*ClientHelper).SendReqCtx()
      /go/pkg/mod/github.com/tikv/client-go/[email protected]/txnkv/txnsnapshot/client_helper.go:146 +0x373
  github.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleTaskOnce()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/store/copr/coprocessor.go:1205 +0x14cc
  github.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleTask()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/store/copr/coprocessor.go:1110 +0x1e5
  github.com/pingcap/tidb/store/copr.(*copIteratorWorker).run()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/store/copr/coprocessor.go:803 +0x176
  github.com/pingcap/tidb/store/copr.(*copIterator).open.func2()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/store/copr/coprocessor.go:847 +0x58



Previous write at 0x00000c2b3710 by main goroutine:
  github.com/tikv/client-go/v2/tikv.SetResourceControlInterceptor()
      /go/pkg/mod/github.com/tikv/client-go/[email protected]/tikv/kv.go:708 +0x6f8
  main.main()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/tidb-server/main.go:241 +0x6d8
  github.com/pingcap/tidb/sessionctx/variable.(*SysVar).ValidateWithRelaxedValidation()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/sessionctx/variable/variable.go:361 +0x1c7
  github.com/pingcap/tidb/domain.(*Domain).rebuildSysVarCache()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/domain/sysvar_cache.go:146 +0x844
  github.com/pingcap/tidb/domain.(*Domain).LoadSysVarCacheLoop()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/domain/domain.go:1774 +0xa8
  github.com/pingcap/tidb/session.bootstrapSessionImpl()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/session/session.go:3357 +0x6e4
  github.com/pingcap/tidb/domain.(*Domain).GetSessionCache()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/domain/sysvar_cache.go:62 +0x5c
  github.com/pingcap/tidb/session.(*session).loadCommonGlobalVariablesIfNeeded()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/session/session.go:3721 +0x104
  github.com/pingcap/tidb/session.(*session).ExecuteStmt()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/session/session.go:2130 +0x145
  github.com/pingcap/tidb/session.(*session).ExecuteInternal()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/session/session.go:1666 +0x31b
  github.com/pingcap/tidb/domain.(*Domain).LoadPrivilegeLoop()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/domain/domain.go:1717 +0x130
  github.com/pingcap/tidb/session.bootstrapSessionImpl()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/session/session.go:3350 +0x687
  github.com/pingcap/tidb/session.BootstrapSession()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/session/session.go:3271 +0x233
  main.createStoreAndDomain()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/tidb-server/main.go:340 +0x21d
  main.main()
      /home/jenkins/agent/workspace/pingcap/tidb/ghpr_mysql_test/tidb/tidb-server/main.go:239 +0x698

https://do.pingcap.net/jenkins/blue/organizations/jenkins/pingcap%2Ftidb%2Fghpr_mysql_test/detail/ghpr_mysql_test/23851/pipeline/

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

no datarace

3. What did you see instead (Required)

datarace

4. What is your TiDB version? (Required)

master

@AilinKid AilinKid added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra labels Jun 19, 2023
@ti-chi-bot ti-chi-bot bot added 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 may-affects-7.1 labels Jun 20, 2023
@seiya-annie seiya-annie removed 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 may-affects-7.1 labels Jun 20, 2023
@hawkingrei
Copy link
Member

It has been fixed by #44776. If you find this problem again, Please open this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants