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 table/tables/tables_test.go #25691

Closed
Tracked by #25899
zhouqiang-cl opened this issue Jun 23, 2021 · 6 comments · Fixed by #26463
Closed
Tracked by #25899

data race in table/tables/tables_test.go #25691

zhouqiang-cl opened this issue Jun 23, 2021 · 6 comments · Fixed by #26463
Assignees
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. component/test severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@zhouqiang-cl
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

[2021-06-22T16:16:35.066Z] WARNING: DATA RACE
[2021-06-22T16:16:35.066Z] Write at 0x00c004ee6600 by goroutine 98:
[2021-06-22T16:16:35.066Z]   github.com/pingcap/tidb/table/tables_test.(*testSuite).TestTableFromMeta()
[2021-06-22T16:16:35.066Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/table/tables/tables_test.go:409 +0x7de
[2021-06-22T16:16:35.066Z]   runtime.call16()
[2021-06-22T16:16:35.066Z]       /usr/local/go/src/runtime/asm_amd64.s:550 +0x3d
[2021-06-22T16:16:35.066Z]   reflect.Value.Call()
[2021-06-22T16:16:35.066Z]       /usr/local/go/src/reflect/value.go:337 +0xd8
[2021-06-22T16:16:35.066Z]   github.com/pingcap/check.(*suiteRunner).forkTest.func1()
[2021-06-22T16:16:35.066Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:850 +0xb3b
[2021-06-22T16:16:35.067Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()
[2021-06-22T16:16:35.067Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:739 +0x11d
[2021-06-22T16:16:35.067Z] 
[2021-06-22T16:16:35.067Z] Previous read at 0x00c004ee6600 by goroutine 104:
[2021-06-22T16:16:35.067Z]   github.com/pingcap/tidb/statistics.PseudoTable()
[2021-06-22T16:16:35.067Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/statistics/table.go:683 +0x2c6
[2021-06-22T16:16:35.067Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).GetPartitionStats()
[2021-06-22T16:16:35.067Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/statistics/handle/handle.go:519 +0x159
[2021-06-22T16:16:35.067Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).GetTableStats()
[2021-06-22T16:16:35.067Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/statistics/handle/handle.go:511 +0xe12
[2021-06-22T16:16:35.067Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).HandleAutoAnalyze()
[2021-06-22T16:16:35.067Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/statistics/handle/update.go:944 +0xde3
[2021-06-22T16:16:35.067Z]   github.com/pingcap/tidb/domain.(*Domain).autoAnalyzeWorker()
[2021-06-22T16:16:35.067Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/domain/domain.go:1333 +0x2ea
[2021-06-22T16:16:35.067Z] 
[2021-06-22T16:16:35.067Z] Goroutine 98 (running) created at:
[2021-06-22T16:16:35.067Z]   github.com/pingcap/check.(*suiteRunner).forkCall()
[2021-06-22T16:16:35.067Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:734 +0x4cc
[2021-06-22T16:16:35.067Z]   github.com/pingcap/check.(*suiteRunner).forkTest()
[2021-06-22T16:16:35.067Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:832 +0x1c4
[2021-06-22T16:16:35.067Z]   github.com/pingcap/check.(*suiteRunner).doRun()
[2021-06-22T16:16:35.067Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:666 +0x144
[2021-06-22T16:16:35.067Z]   github.com/pingcap/check.(*suiteRunner).run()
[2021-06-22T16:16:35.067Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:696 +0x144
[2021-06-22T16:16:35.067Z]   github.com/pingcap/check.Run()
[2021-06-22T16:16:35.067Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/run.go:150 +0x5a
[2021-06-22T16:16:35.067Z]   github.com/pingcap/check.RunAll()
[2021-06-22T16:16:35.067Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/run.go:113 +0xff6
[2021-06-22T16:16:35.067Z]   github.com/pingcap/check.TestingT()
[2021-06-22T16:16:35.067Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/run.go:99 +0x756
[2021-06-22T16:16:35.067Z]   github.com/pingcap/tidb/table/tables_test.TestT()
[2021-06-22T16:16:35.067Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/table/tables/tables_test.go:49 +0x4f
[2021-06-22T16:16:35.067Z]   testing.tRunner()
[2021-06-22T16:16:35.067Z]       /usr/local/go/src/testing/testing.go:1193 +0x202
[2021-06-22T16:16:35.067Z] 
[2021-06-22T16:16:35.067Z] Goroutine 104 (running) created at:
[2021-06-22T16:16:35.067Z]   github.com/pingcap/tidb/domain.(*Domain).UpdateTableStatsLoop()
[2021-06-22T16:16:35.067Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/domain/domain.go:1167 +0x350
[2021-06-22T16:16:35.067Z]   github.com/pingcap/tidb/session.BootstrapSession()
[2021-06-22T16:16:35.067Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/session/session.go:2488 +0x653
[2021-06-22T16:16:35.067Z]   github.com/pingcap/tidb/table/tables_test.(*testSuite).SetUpSuite()
[2021-06-22T16:16:35.067Z]       /home/jenkins/agent/workspace/tidb-unit-test-nightly/go/src/github.com/pingcap/tidb/table/tables/tables_test.go:65 +0x15c
[2021-06-22T16:16:35.067Z]   runtime.call16()
[2021-06-22T16:16:35.067Z]       /usr/local/go/src/runtime/asm_amd64.s:550 +0x3d
[2021-06-22T16:16:35.067Z]   reflect.Value.Call()
[2021-06-22T16:16:35.067Z]       /usr/local/go/src/reflect/value.go:337 +0xd8
[2021-06-22T16:16:35.067Z]   github.com/pingcap/check.(*suiteRunner).runFixture.func1()
[2021-06-22T16:16:35.067Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:799 +0x1d0
[2021-06-22T16:16:35.067Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()
[2021-06-22T16:16:35.067Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:739 +0x11d
[2021-06-22T16:16:35.067Z] ==================

1. Minimal reproduce step (Required)

in ci https://ci.pingcap.net/blue/rest/organizations/jenkins/pipelines/tidb-unit-test-nightly/runs/1750/nodes/116/steps/415/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

@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

@tisonkun
Copy link
Contributor

It seems another instance re-occurs.

[2021-07-26T08:42:06.284Z] ==================
[2021-07-26T08:42:06.284Z] WARNING: DATA RACE
[2021-07-26T08:42:06.284Z] Read at 0x00c00d55cfa8 by goroutine 106:
[2021-07-26T08:42:06.284Z]   github.com/pingcap/parser/types.(*FieldType).EvalType()
[2021-07-26T08:42:06.284Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/types/field_type.go:96 +0x44
[2021-07-26T08:42:06.284Z]   github.com/pingcap/tidb/statistics.NewHistogram()
[2021-07-26T08:42:06.284Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/histogram.go:96 +0x80
[2021-07-26T08:42:06.284Z]   github.com/pingcap/tidb/statistics.PseudoTable()
[2021-07-26T08:42:06.284Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/table.go:688 +0x34c
[2021-07-26T08:42:06.284Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).GetPartitionStats()
[2021-07-26T08:42:06.284Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/handle.go:514 +0x159
[2021-07-26T08:42:06.284Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).GetTableStats()
[2021-07-26T08:42:06.284Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/handle.go:506 +0xe12
[2021-07-26T08:42:06.284Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).HandleAutoAnalyze()
[2021-07-26T08:42:06.284Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/update.go:947 +0xde3
[2021-07-26T08:42:06.284Z]   github.com/pingcap/tidb/domain.(*Domain).autoAnalyzeWorker()
[2021-07-26T08:42:06.285Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:1333 +0x2ea
[2021-07-26T08:42:06.285Z] 
[2021-07-26T08:42:06.285Z] Previous write at 0x00c00d55cfa8 by goroutine 124:
[2021-07-26T08:42:06.285Z]   [failed to restore the stack]
[2021-07-26T08:42:06.285Z] 
[2021-07-26T08:42:06.285Z] Goroutine 106 (running) created at:
[2021-07-26T08:42:06.285Z]   github.com/pingcap/tidb/domain.(*Domain).UpdateTableStatsLoop()
[2021-07-26T08:42:06.285Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:1167 +0x350
[2021-07-26T08:42:06.285Z]   github.com/pingcap/tidb/session.BootstrapSession()
[2021-07-26T08:42:06.285Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/session/session.go:2616 +0x653
[2021-07-26T08:42:06.285Z]   github.com/pingcap/tidb/table/tables_test.(*testSuite).SetUpSuite()
[2021-07-26T08:42:06.285Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/table/tables/tables_test.go:65 +0x15c
[2021-07-26T08:42:06.285Z]   runtime.call16()
[2021-07-26T08:42:06.285Z]       /usr/local/go/src/runtime/asm_amd64.s:550 +0x3d
[2021-07-26T08:42:06.285Z]   reflect.Value.Call()
[2021-07-26T08:42:06.285Z]       /usr/local/go/src/reflect/value.go:337 +0xd8
[2021-07-26T08:42:06.285Z]   github.com/pingcap/check.(*suiteRunner).runFixture.func1()
[2021-07-26T08:42:06.285Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:799 +0x1d0
[2021-07-26T08:42:06.285Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()
[2021-07-26T08:42:06.285Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:739 +0x11d
[2021-07-26T08:42:06.285Z] 
[2021-07-26T08:42:06.285Z] Goroutine 124 (finished) created at:
[2021-07-26T08:42:06.285Z]   github.com/pingcap/tidb/executor.(*ProjectionExec).prepare()
[2021-07-26T08:42:06.285Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/projection.go:271 +0xd04
[2021-07-26T08:42:06.285Z]   github.com/pingcap/tidb/executor.(*ProjectionExec).parallelExecute()
[2021-07-26T08:42:06.285Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/projection.go:208 +0x5cb
[2021-07-26T08:42:06.285Z]   github.com/pingcap/tidb/executor.(*ProjectionExec).Next()
[2021-07-26T08:42:06.286Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/projection.go:181 +0x10d
[2021-07-26T08:42:06.286Z]   github.com/pingcap/tidb/executor.Next()
[2021-07-26T08:42:06.286Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/executor.go:285 +0x2a8
[2021-07-26T08:42:06.286Z]   github.com/pingcap/tidb/executor.(*recordSet).Next()
[2021-07-26T08:42:06.286Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/adapter.go:145 +0x115
[2021-07-26T08:42:06.286Z]   github.com/pingcap/tidb/session.(*execStmtResult).Next()
[2021-07-26T08:42:06.286Z]       <autogenerated>:1 +0x84
[2021-07-26T08:42:06.286Z]   github.com/pingcap/tidb/session.GetRows4Test()
[2021-07-26T08:42:06.286Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/session/tidb.go:307 +0x35e
[2021-07-26T08:42:06.286Z]   github.com/pingcap/tidb/session.ResultSetToStringSlice()
[2021-07-26T08:42:06.286Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/session/tidb.go:325 +0xba
[2021-07-26T08:42:06.286Z]   github.com/pingcap/tidb/util/testkit.(*TestKit).ResultSetToResultWithCtx()
[2021-07-26T08:42:06.286Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:389 +0xad
[2021-07-26T08:42:06.286Z]   github.com/pingcap/tidb/util/testkit.(*TestKit).ResultSetToResult()
[2021-07-26T08:42:06.286Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:384 +0x566
[2021-07-26T08:42:06.286Z]   github.com/pingcap/tidb/util/testkit.(*TestKit).MustQuery()
[2021-07-26T08:42:06.286Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:327 +0x571
[2021-07-26T08:42:06.286Z]   github.com/pingcap/tidb/table/tables_test.(*testSuite).TestViewColumns()
[2021-07-26T08:42:06.286Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/table/tables/tables_test.go:740 +0x7b3
[2021-07-26T08:42:06.286Z]   runtime.call16()
[2021-07-26T08:42:06.286Z]       /usr/local/go/src/runtime/asm_amd64.s:550 +0x3d
[2021-07-26T08:42:06.286Z]   reflect.Value.Call()
[2021-07-26T08:42:06.286Z]       /usr/local/go/src/reflect/value.go:337 +0xd8
[2021-07-26T08:42:06.286Z]   github.com/pingcap/check.(*suiteRunner).forkTest.func1()
[2021-07-26T08:42:06.286Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:850 +0xb3b
[2021-07-26T08:42:06.286Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()
[2021-07-26T08:42:06.287Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:739 +0x11d
[2021-07-26T08:42:06.287Z] ==================
[2021-07-26T08:42:06.287Z] ==================
[2021-07-26T08:42:06.287Z] WARNING: DATA RACE
[2021-07-26T08:42:06.287Z] Read at 0x00c00d55d0f0 by goroutine 106:
[2021-07-26T08:42:06.287Z]   github.com/pingcap/parser/types.(*FieldType).Clone()
[2021-07-26T08:42:06.287Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/types/field_type.go:63 +0x3b5
[2021-07-26T08:42:06.287Z]   github.com/pingcap/tidb/statistics.NewHistogram()
[2021-07-26T08:42:06.287Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/histogram.go:100 +0x4d4
[2021-07-26T08:42:06.287Z]   github.com/pingcap/tidb/statistics.PseudoTable()
[2021-07-26T08:42:06.287Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/table.go:688 +0x34c
[2021-07-26T08:42:06.287Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).GetPartitionStats()
[2021-07-26T08:42:06.287Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/handle.go:514 +0x159
[2021-07-26T08:42:06.287Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).GetTableStats()
[2021-07-26T08:42:06.287Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/handle.go:506 +0xe12
[2021-07-26T08:42:06.287Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).HandleAutoAnalyze()
[2021-07-26T08:42:06.287Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/update.go:947 +0xde3
[2021-07-26T08:42:06.287Z]   github.com/pingcap/tidb/domain.(*Domain).autoAnalyzeWorker()
[2021-07-26T08:42:06.287Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:1333 +0x2ea
[2021-07-26T08:42:06.287Z] 
[2021-07-26T08:42:06.287Z] Previous write at 0x00c00d55d0f0 by goroutine 124:
[2021-07-26T08:42:06.287Z]   [failed to restore the stack]
[2021-07-26T08:42:06.287Z] 
[2021-07-26T08:42:06.287Z] Goroutine 106 (running) created at:
[2021-07-26T08:42:06.287Z]   github.com/pingcap/tidb/domain.(*Domain).UpdateTableStatsLoop()
[2021-07-26T08:42:06.287Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:1167 +0x350
[2021-07-26T08:42:06.287Z]   github.com/pingcap/tidb/session.BootstrapSession()
[2021-07-26T08:42:06.287Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/session/session.go:2616 +0x653
[2021-07-26T08:42:06.287Z]   github.com/pingcap/tidb/table/tables_test.(*testSuite).SetUpSuite()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/table/tables/tables_test.go:65 +0x15c
[2021-07-26T08:42:06.288Z]   runtime.call16()
[2021-07-26T08:42:06.288Z]       /usr/local/go/src/runtime/asm_amd64.s:550 +0x3d
[2021-07-26T08:42:06.288Z]   reflect.Value.Call()
[2021-07-26T08:42:06.288Z]       /usr/local/go/src/reflect/value.go:337 +0xd8
[2021-07-26T08:42:06.288Z]   github.com/pingcap/check.(*suiteRunner).runFixture.func1()
[2021-07-26T08:42:06.288Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:799 +0x1d0
[2021-07-26T08:42:06.288Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()
[2021-07-26T08:42:06.288Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:739 +0x11d
[2021-07-26T08:42:06.288Z] 
[2021-07-26T08:42:06.288Z] Goroutine 124 (finished) created at:
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/executor.(*ProjectionExec).prepare()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/projection.go:271 +0xd04
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/executor.(*ProjectionExec).parallelExecute()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/projection.go:208 +0x5cb
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/executor.(*ProjectionExec).Next()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/projection.go:181 +0x10d
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/executor.Next()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/executor.go:285 +0x2a8
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/executor.(*recordSet).Next()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/adapter.go:145 +0x115
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/session.(*execStmtResult).Next()
[2021-07-26T08:42:06.288Z]       <autogenerated>:1 +0x84
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/session.GetRows4Test()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/session/tidb.go:307 +0x35e
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/session.ResultSetToStringSlice()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/session/tidb.go:325 +0xba
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/util/testkit.(*TestKit).ResultSetToResultWithCtx()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:389 +0xad
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/util/testkit.(*TestKit).ResultSetToResult()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:384 +0x566
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/util/testkit.(*TestKit).MustQuery()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:327 +0x571
[2021-07-26T08:42:06.288Z]   github.com/pingcap/tidb/table/tables_test.(*testSuite).TestViewColumns()
[2021-07-26T08:42:06.288Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/table/tables/tables_test.go:740 +0x7b3
[2021-07-26T08:42:06.288Z]   runtime.call16()
[2021-07-26T08:42:06.288Z]       /usr/local/go/src/runtime/asm_amd64.s:550 +0x3d
[2021-07-26T08:42:06.288Z]   reflect.Value.Call()
[2021-07-26T08:42:06.288Z]       /usr/local/go/src/reflect/value.go:337 +0xd8
[2021-07-26T08:42:06.288Z]   github.com/pingcap/check.(*suiteRunner).forkTest.func1()
[2021-07-26T08:42:06.288Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:850 +0xb3b
[2021-07-26T08:42:06.288Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()
[2021-07-26T08:42:06.288Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:739 +0x11d
[2021-07-26T08:42:06.288Z] ==================

https://ci.pingcap.net/blue/rest/organizations/jenkins/pipelines/tidb_ghpr_unit_test/runs/7916/nodes/109/steps/295/log/?start=0

https://ci.pingcap.net/blue/organizations/jenkins/tidb_ghpr_unit_test/detail/tidb_ghpr_unit_test/7916/pipeline

cc @zhouqiang-cl @qw4990

@tisonkun tisonkun reopened this Jul 26, 2021
@qw4990
Copy link
Contributor

qw4990 commented Jul 26, 2021

I guess this issue has the same cause as #26539. Seems like it is caused by some functions related to view like tryFillViewColumnType modifying column types.

@qw4990 qw4990 assigned XuHuaiyu and unassigned qw4990 Jul 26, 2021
@XuHuaiyu XuHuaiyu assigned lzmhhh123 and XuHuaiyu and unassigned XuHuaiyu and lzmhhh123 Jul 27, 2021
@qw4990 qw4990 removed the sig/planner SIG: Planner label Aug 19, 2021
@qw4990 qw4990 added the sig/execution SIG execution label Aug 19, 2021
@unconsolable
Copy link
Contributor

Maybe another occurrence

https://ci.pingcap.net/blue/rest/organizations/jenkins/pipelines/tidb_ghpr_unit_test/runs/9696/nodes/108/log/?start=0

[2021-08-20T05:50:16.151Z] ==================
[2021-08-20T05:50:16.151Z] WARNING: DATA RACE
[2021-08-20T05:50:16.151Z] Read at 0x00c00d5a60a8 by goroutine 117:
[2021-08-20T05:50:16.151Z]   github.com/pingcap/parser/types.(*FieldType).EvalType()
[2021-08-20T05:50:16.151Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/types/field_type.go:96 +0x44
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/statistics.NewHistogram()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/histogram.go:97 +0x80
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/statistics.PseudoTable()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/table.go:703 +0x34c
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).GetPartitionStats()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/handle.go:525 +0x159
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).GetTableStats()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/handle.go:517 +0xe12
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).HandleAutoAnalyze()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/update.go:952 +0xde3
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/domain.(*Domain).autoAnalyzeWorker()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:1350 +0x2ea
[2021-08-20T05:50:16.151Z] 
[2021-08-20T05:50:16.151Z] Previous write at 0x00c00d5a60a8 by goroutine 122:
[2021-08-20T05:50:16.151Z]   [failed to restore the stack]
[2021-08-20T05:50:16.151Z] 
[2021-08-20T05:50:16.151Z] Goroutine 117 (running) created at:
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/domain.(*Domain).UpdateTableStatsLoop()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:1184 +0x350
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/session.BootstrapSession()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/session/session.go:2527 +0x653
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/table/tables_test.(*testSuite).SetUpSuite()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/table/tables/tables_test.go:66 +0x15c
[2021-08-20T05:50:16.151Z]   runtime.call16()
[2021-08-20T05:50:16.151Z]       /usr/local/go/src/runtime/asm_amd64.s:550 +0x3d
[2021-08-20T05:50:16.151Z]   reflect.Value.Call()
[2021-08-20T05:50:16.151Z]       /usr/local/go/src/reflect/value.go:337 +0xd8
[2021-08-20T05:50:16.151Z]   github.com/pingcap/check.(*suiteRunner).runFixture.func1()
[2021-08-20T05:50:16.151Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:799 +0x1d0
[2021-08-20T05:50:16.151Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()
[2021-08-20T05:50:16.151Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:739 +0x11d
[2021-08-20T05:50:16.151Z] ==================
[2021-08-20T05:50:16.151Z] ==================
[2021-08-20T05:50:16.151Z] WARNING: DATA RACE
[2021-08-20T05:50:16.151Z] Read at 0x00c00d6ac1f0 by goroutine 117:
[2021-08-20T05:50:16.151Z]   github.com/pingcap/parser/types.(*FieldType).Clone()
[2021-08-20T05:50:16.151Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/types/field_type.go:63 +0x3b5
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/statistics.NewHistogram()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/histogram.go:101 +0x4d4
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/statistics.PseudoTable()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/table.go:703 +0x34c
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).GetPartitionStats()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/handle.go:525 +0x159
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).GetTableStats()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/handle.go:517 +0xe12
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/statistics/handle.(*Handle).HandleAutoAnalyze()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/statistics/handle/update.go:952 +0xde3
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/domain.(*Domain).autoAnalyzeWorker()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:1350 +0x2ea
[2021-08-20T05:50:16.151Z] 
[2021-08-20T05:50:16.151Z] Previous write at 0x00c00d6ac1f0 by goroutine 122:
[2021-08-20T05:50:16.151Z]   [failed to restore the stack]
[2021-08-20T05:50:16.151Z] 
[2021-08-20T05:50:16.151Z] Goroutine 117 (running) created at:
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/domain.(*Domain).UpdateTableStatsLoop()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/domain/domain.go:1184 +0x350
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/session.BootstrapSession()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/session/session.go:2527 +0x653
[2021-08-20T05:50:16.151Z]   github.com/pingcap/tidb/table/tables_test.(*testSuite).SetUpSuite()
[2021-08-20T05:50:16.151Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/table/tables/tables_test.go:66 +0x15c
[2021-08-20T05:50:16.151Z]   runtime.call16()
[2021-08-20T05:50:16.151Z]       /usr/local/go/src/runtime/asm_amd64.s:550 +0x3d
[2021-08-20T05:50:16.151Z]   reflect.Value.Call()
[2021-08-20T05:50:16.151Z]       /usr/local/go/src/reflect/value.go:337 +0xd8
[2021-08-20T05:50:16.151Z]   github.com/pingcap/check.(*suiteRunner).runFixture.func1()
[2021-08-20T05:50:16.151Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:799 +0x1d0
[2021-08-20T05:50:16.151Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()
[2021-08-20T05:50:16.151Z]       /nfs/cache/mod/github.com/pingcap/[email protected]/check.go:739 +0x11d
[2021-08-20T05:50:16.151Z] ==================

@bb7133
Copy link
Member

bb7133 commented Sep 26, 2021

The stack looks quite similar to #27274, very likely that it can be closed because of #27866.

@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.

@tiancaiamao tiancaiamao added affects-4.0 This bug affects 4.0.x versions. fixes-4.0.16 component/test labels Nov 24, 2021
@XuHuaiyu XuHuaiyu added affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. labels Dec 17, 2021
@zanmato1984 zanmato1984 added sig/sql-infra SIG: SQL Infra and removed sig/execution SIG execution labels Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. component/test severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet