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 GlobalConfig #30345

Closed
hawkingrei opened this issue Dec 2, 2021 · 2 comments · Fixed by #30346
Closed

data race in the GlobalConfig #30345

hawkingrei opened this issue Dec 2, 2021 · 2 comments · Fixed by #30346
Assignees
Labels
severity/major 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!

 WARNING: DATA RACE
Write at 0x00c0095f6840 by goroutine 192:
  github.com/pingcap/tidb/sessionctx/variable.glob..func226()
      /go/tidb/sessionctx/variable/sysvar.go:1621 +0xa4
  github.com/pingcap/tidb/sessionctx/variable.(*SysVar).SetSessionFromHook()
      /go/tidb/sessionctx/variable/sysvar.go:199 +0xaf
  github.com/pingcap/tidb/sessionctx/variable.(*SessionVars).SetSystemVar()
      /go/tidb/sessionctx/variable/session.go:1588 +0x59
  github.com/pingcap/tidb/executor.loadVariables()
      /go/tidb/executor/plan_replayer.go:544 +0x70d
  github.com/pingcap/tidb/executor.(*PlanReplayerLoadInfo).Update()
      /go/tidb/executor/plan_replayer.go:618 +0x137
  github.com/pingcap/tidb/server.(*clientConn).handlePlanReplayerLoad()
      /go/tidb/server/conn.go:1742 +0xd7
  github.com/pingcap/tidb/server.(*clientConn).handleQuerySpecial()
      /go/tidb/server/conn.go:2024 +0x6cd
  github.com/pingcap/tidb/server.(*clientConn).handleStmt()
      /go/tidb/server/conn.go:1978 +0x5a8
  github.com/pingcap/tidb/server.(*clientConn).handleQuery()
      /go/tidb/server/conn.go:1819 +0x97c
  github.com/pingcap/tidb/server.(*clientConn).dispatch()
      /go/tidb/server/conn.go:1324 +0x1228
  github.com/pingcap/tidb/server.(*clientConn).Run()
      /go/tidb/server/conn.go:1079 +0x313
  github.com/pingcap/tidb/server.(*Server).onConn()
      /go/tidb/server/server.go:548 +0x14fc
  github.com/pingcap/tidb/server.(*Server).startNetworkListener·dwrap·35()
      /go/tidb/server/server.go:451 +0x47
Previous read at 0x00c0095f6840 by goroutine 132:
  github.com/pingcap/tidb/executor.(*ExecStmt).LogSlowQuery()
      /go/tidb/executor/adapter.go:942 +0x184
  github.com/pingcap/tidb/executor.(*ExecStmt).FinishExecuteStmt()
      /go/tidb/executor/adapter.go:897 +0x5cd
  github.com/pingcap/tidb/session.runStmt()
      /go/tidb/session/session.go:1717 +0x8c8
  github.com/pingcap/tidb/session.(*session).ExecuteStmt()
      /go/tidb/session/session.go:1582 +0xd93
  github.com/pingcap/tidb/session.(*session).ExecuteInternal()
      /go/tidb/session/session.go:1295 +0x4c4
  github.com/pingcap/tidb/ddl/util.RemoveFromGCDeleteRange()
      /go/tidb/ddl/util/util.go:117 +0x163
  github.com/pingcap/tidb/ddl/util.CompleteDeleteRange()
      /go/tidb/ddl/util/util.go:112 +0x1a9
  github.com/pingcap/tidb/ddl.(*delRange).doTask()
      /go/tidb/ddl/delete_range.go:233 +0x4d3
  github.com/pingcap/tidb/ddl.(*delRange).doDelRangeWork()
      /go/tidb/ddl/delete_range.go:186 +0x66e
  github.com/pingcap/tidb/ddl.(*delRange).startEmulator()
      /go/tidb/ddl/delete_range.go:150 +0x1c4
  github.com/pingcap/tidb/ddl.(*delRange).start·dwrap·31()
      /go/tidb/ddl/delete_range.go:126 +0x39 

1. Minimal reproduce step (Required)

make race

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Dec 2, 2021
@hawkingrei
Copy link
Member Author

/assign

@github-actions
Copy link

github-actions bot commented Dec 3, 2021

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

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

Successfully merging a pull request may close this issue.

2 participants