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 expensivequery #35979

Closed
hawkingrei opened this issue Jul 6, 2022 · 2 comments
Closed

DATA RACE in the expensivequery #35979

hawkingrei opened this issue Jul 6, 2022 · 2 comments
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!

1. Minimal reproduce step (Required)

[2022-07-06T05:06:18.111Z] ==================
[2022-07-06T05:06:18.111Z] WARNING: DATA RACE
[2022-07-06T05:06:18.111Z] Write at 0x00c000369788 by goroutine 58:
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/sessionctx/variable.(*SessionVars).InitStatementContext()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/sessionctx/variable/session.go:1173 +0x1e4
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/executor.ResetContextOfStmt()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/executor/executor.go:1788 +0x132
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/session.(*session).ExecuteStmt()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/session/session.go:1912 +0x384
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/server/driver_tidb.go:229 +0xd3
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/server.(*clientConn).handleStmt()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/server/conn.go:2022 +0x1d0
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/server.(*clientConn).handleQuery()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/server/conn.go:1876 +0x94f
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/server.(*clientConn).dispatch()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/server/conn.go:1371 +0x11f1
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/server.(*clientConn).Run()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/server/conn.go:1121 +0x2f3
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/server.(*Server).onConn()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/server/server.go:565 +0x1fe4
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/server.(*Server).startNetworkListener.func2()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/server/server.go:454 +0x47
[2022-07-06T05:06:18.111Z] 
[2022-07-06T05:06:18.111Z] Previous read at 0x00c000369788 by goroutine 149:
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/util/expensivequery.(*Handle).Run()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/util/expensivequery/expensivequery.go:70 +0x394
[2022-07-06T05:06:18.111Z]   main.createServer.func1()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/tidb-server/main.go:739 +0x39
[2022-07-06T05:06:18.111Z] 
[2022-07-06T05:06:18.111Z] Goroutine 58 (running) created at:
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/server.(*Server).startNetworkListener()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/server/server.go:454 +0x6f3
[2022-07-06T05:06:18.111Z]   github.com/pingcap/tidb/server.(*Server).Run.func1()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/server/server.go:369 +0x65
[2022-07-06T05:06:18.111Z] 
[2022-07-06T05:06:18.111Z] Goroutine 149 (running) created at:
[2022-07-06T05:06:18.111Z]   main.createServer()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/tidb-server/main.go:739 +0x544
[2022-07-06T05:06:18.111Z]   main.main()
[2022-07-06T05:06:18.111Z]       /home/jenkins/agent/workspace/tidb_ghpr_check_2/go/src/github.com/pingcap/tidb/tidb-server/main.go:205 +0x3e4
[2022-07-06T05:06:18.111Z] ==================

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 Jul 6, 2022
@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.0 may-affects-6.1 labels Jul 6, 2022
@aytrack aytrack 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.0 may-affects-6.1 labels Jul 6, 2022
@tiancaiamao
Copy link
Contributor

I can't reproduce after #35923
Guess it's fixed ... feel free to reopen it if I'm wrong

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

4 participants