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 TestFastAnalyze #25782

Closed
Tracked by #25899
zhouqiang-cl opened this issue Jun 27, 2021 · 4 comments · Fixed by #29965
Closed
Tracked by #25899

data race in TestFastAnalyze #25782

zhouqiang-cl opened this issue Jun 27, 2021 · 4 comments · Fixed by #29965
Assignees
Labels
component/statistics severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@zhouqiang-cl
Copy link
Contributor

Bug Report

[2021-06-27T06:16:11.915Z] ==================
[2021-06-27T06:16:11.915Z] WARNING: DATA RACE
[2021-06-27T06:16:11.915Z] Write at 0x000007ac5880 by goroutine 724:
[2021-06-27T06:16:11.915Z]   github.com/pingcap/tidb/executor_test.(*testFastAnalyze).TestFastAnalyze()
[2021-06-27T06:16:11.915Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/executor/analyze_test.go:418 +0x3f1
[2021-06-27T06:16:11.915Z]   runtime.call16()
[2021-06-27T06:16:11.915Z]       /usr/local/go/src/runtime/asm_amd64.s:550 +0x3d
[2021-06-27T06:16:11.915Z]   reflect.Value.Call()
[2021-06-27T06:16:11.915Z]       /usr/local/go/src/reflect/value.go:337 +0xd8
[2021-06-27T06:16:11.915Z]   github.com/pingcap/check.(*suiteRunner).forkTest.func1()
[2021-06-27T06:16:11.915Z]       /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:850 +0xb3b
[2021-06-27T06:16:11.915Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()
[2021-06-27T06:16:11.915Z]       /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:739 +0x11d
[2021-06-27T06:16:11.915Z] 
[2021-06-27T06:16:11.915Z] Previous read at 0x000007ac5880 by goroutine 908:
[2021-06-27T06:16:11.915Z]   github.com/pingcap/tidb/executor.(*AnalyzeFastExec).buildStats()
[2021-06-27T06:16:11.915Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/executor/analyze.go:2044 +0x54
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/executor.analyzeFastExec()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/executor/analyze.go:1505 +0x55
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/executor.(*AnalyzeExec).analyzeWorker()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/executor/analyze.go:272 +0x34c
[2021-06-27T06:16:11.916Z] 
[2021-06-27T06:16:11.916Z] Goroutine 724 (running) created at:
[2021-06-27T06:16:11.916Z]   github.com/pingcap/check.(*suiteRunner).forkCall()
[2021-06-27T06:16:11.916Z]       /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:734 +0x4cc
[2021-06-27T06:16:11.916Z]   github.com/pingcap/check.(*suiteRunner).forkTest()
[2021-06-27T06:16:11.916Z]       /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:832 +0x1c4
[2021-06-27T06:16:11.916Z]   github.com/pingcap/check.(*suiteRunner).doRun()
[2021-06-27T06:16:11.916Z]       /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:666 +0x144
[2021-06-27T06:16:11.916Z]   github.com/pingcap/check.(*suiteRunner).asyncRun.func1()
[2021-06-27T06:16:11.916Z]       /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:650 +0x105
[2021-06-27T06:16:11.916Z] 
[2021-06-27T06:16:11.916Z] Goroutine 908 (running) created at:
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/executor.(*AnalyzeExec).Next()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/executor/analyze.go:94 +0x1c4
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/executor.Next()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/executor/executor.go:286 +0x2a8
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/executor.(*ExecStmt).handleNoDelayExecutor()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/executor/adapter.go:589 +0x3bc
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/executor.(*ExecStmt).handleNoDelay()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/executor/adapter.go:470 +0x276
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/executor.(*ExecStmt).Exec()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/executor/adapter.go:419 +0x63a
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/session.runStmt()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/session/session.go:1635 +0x323
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/session.(*session).ExecuteStmt()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/session/session.go:1530 +0xc37
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/util/testkit.(*TestKit).Exec()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:170 +0x2fc
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/util/testkit.(*TestKit).MustExec()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:216 +0x96
[2021-06-27T06:16:11.916Z]   github.com/pingcap/tidb/executor_test.(*testSuite1).TestAnalyzeParameters()
[2021-06-27T06:16:11.916Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/executor/analyze_test.go:181 +0x2e9
[2021-06-27T06:16:11.916Z]   runtime.call16()
[2021-06-27T06:16:11.916Z]       /usr/local/go/src/runtime/asm_amd64.s:550 +0x3d
[2021-06-27T06:16:11.916Z]   reflect.Value.Call()
[2021-06-27T06:16:11.916Z]       /usr/local/go/src/reflect/value.go:337 +0xd8
[2021-06-27T06:16:11.916Z]   github.com/pingcap/check.(*suiteRunner).forkTest.func1()
[2021-06-27T06:16:11.916Z]       /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:850 +0xb3b
[2021-06-27T06:16:11.916Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()
[2021-06-27T06:16:11.916Z]       /nfs/cache/mod/github.com/pingcap/check@v0.0.0-20200212061837-5e12011dc712/check.go:739 +0x11d
[2021-06-27T06:16:11.916Z] ==================

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

in ci https://ci.pingcap.net/blue/rest/organizations/jenkins/pipelines/tidb-unit-test-nightly/runs/2527/nodes/104/steps/336/log/?start=0

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

master

@lzmhhh123
Copy link
Contributor

/cc @winoros

@bb7133
Copy link
Member

bb7133 commented Sep 26, 2021

@github-actions
Copy link

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
component/statistics severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants