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 detected in TestPartitionsTable #15226

Closed
SunRunAway opened this issue Mar 9, 2020 · 4 comments · Fixed by #15245 or #15260
Closed

data race detected in TestPartitionsTable #15226

SunRunAway opened this issue Mar 9, 2020 · 4 comments · Fixed by #15245 or #15260
Labels
component/test severity/minor type/bug The issue is confirmed as a bug.

Comments

@SunRunAway
Copy link
Contributor

SunRunAway commented Mar 9, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
[2020-03-09T07:54:30.935Z] ==================

[2020-03-09T07:54:30.935Z] WARNING: DATA RACE

[2020-03-09T07:54:30.935Z] Write at 0x000005669660 by goroutine 537:

[2020-03-09T07:54:30.935Z]   github.com/pingcap/tidb/executor_test.(*testInfoschemaTableSuite).TestPartitionsTable()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/infoschema_reader_test.go:263 +0x6e

[2020-03-09T07:54:30.935Z]   runtime.call32()

[2020-03-09T07:54:30.935Z]       /usr/local/go/src/runtime/asm_amd64.s:539 +0x3a

[2020-03-09T07:54:30.935Z]   reflect.Value.Call()

[2020-03-09T07:54:30.935Z]       /usr/local/go/src/reflect/value.go:321 +0xd3

[2020-03-09T07:54:30.935Z]   github.com/pingcap/check.(*suiteRunner).forkTest.func1()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/pkg/mod/github.com/pingcap/[email protected]/check.go:850 +0x9aa

[2020-03-09T07:54:30.935Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/pkg/mod/github.com/pingcap/[email protected]/check.go:739 +0x113

[2020-03-09T07:54:30.935Z] 

[2020-03-09T07:54:30.935Z] Previous read at 0x000005669660 by goroutine 572:

[2020-03-09T07:54:30.935Z]   github.com/pingcap/tidb/executor.(*statsCache).get()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/infoschema_reader.go:203 +0xb9

[2020-03-09T07:54:30.935Z]   github.com/pingcap/tidb/executor.(*memtableRetriever).dataForTables()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/infoschema_reader.go:273 +0x7c

[2020-03-09T07:54:30.935Z]   github.com/pingcap/tidb/executor.(*memtableRetriever).retrieve()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/infoschema_reader.go:60 +0x999

[2020-03-09T07:54:30.935Z]   github.com/pingcap/tidb/executor.(*MemTableReaderExec).Next()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/memtable_reader.go:69 +0xc6

[2020-03-09T07:54:30.935Z]   github.com/pingcap/tidb/executor.Next()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/executor.go:213 +0x167

[2020-03-09T07:54:30.935Z]   github.com/pingcap/tidb/executor.(*SelectionExec).Next()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/executor.go:1141 +0x6e5

[2020-03-09T07:54:30.935Z]   github.com/pingcap/tidb/executor.Next()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/executor.go:213 +0x167

[2020-03-09T07:54:30.935Z]   github.com/pingcap/tidb/executor.(*projectionInputFetcher).run()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/projection.go:368 +0x41c

[2020-03-09T07:54:30.935Z] 

[2020-03-09T07:54:30.935Z] Goroutine 537 (running) created at:

[2020-03-09T07:54:30.935Z]   github.com/pingcap/check.(*suiteRunner).forkCall()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/pkg/mod/github.com/pingcap/[email protected]/check.go:734 +0x4a3

[2020-03-09T07:54:30.935Z]   github.com/pingcap/check.(*suiteRunner).forkTest()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/pkg/mod/github.com/pingcap/[email protected]/check.go:832 +0x1b9

[2020-03-09T07:54:30.935Z]   github.com/pingcap/check.(*suiteRunner).doRun()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/pkg/mod/github.com/pingcap/[email protected]/check.go:666 +0x13a

[2020-03-09T07:54:30.935Z]   github.com/pingcap/check.(*suiteRunner).asyncRun.func1()

[2020-03-09T07:54:30.935Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/pkg/mod/github.com/pingcap/[email protected]/check.go:650 +0xf7

[2020-03-09T07:54:30.935Z] 

[2020-03-09T07:54:30.935Z] Goroutine 572 (running) created at:

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/executor.(*ProjectionExec).prepare()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/projection.go:263 +0xd07

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/executor.(*ProjectionExec).parallelExecute()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/projection.go:200 +0x5b7

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/executor.(*ProjectionExec).Next()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/projection.go:173 +0x107

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/executor.Next()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/executor.go:213 +0x167

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/executor.(*recordSet).Next()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/adapter.go:126 +0x110

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/session.GetRows4Test()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/session/tidb.go:330 +0x35a

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/session.ResultSetToStringSlice()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/session/tidb.go:348 +0xb8

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/util/testkit.(*TestKit).ResultSetToResultWithCtx()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:287 +0xa8

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/util/testkit.(*TestKit).MustQuery()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/util/testkit/testkit.go:282 +0x4e4

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/executor_test.(*testSuite1).TestAlterTableComment()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/executor_test.go:2935 +0x1a8

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/executor_test.(*testSuite1).TestAlterTableComment()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/executor_test.go:2934 +0x174

[2020-03-09T07:54:30.936Z]   github.com/pingcap/tidb/executor_test.(*testSuite1).TestAlterTableComment()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/executor/executor_test.go:2933 +0x140

[2020-03-09T07:54:30.936Z]   runtime.call32()

[2020-03-09T07:54:30.936Z]       /usr/local/go/src/runtime/asm_amd64.s:539 +0x3a

[2020-03-09T07:54:30.936Z]   reflect.Value.Call()

[2020-03-09T07:54:30.936Z]       /usr/local/go/src/reflect/value.go:321 +0xd3

[2020-03-09T07:54:30.936Z]   github.com/pingcap/check.(*suiteRunner).forkTest.func1()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/pkg/mod/github.com/pingcap/[email protected]/check.go:850 +0x9aa

[2020-03-09T07:54:30.936Z]   github.com/pingcap/check.(*suiteRunner).forkCall.func1()

[2020-03-09T07:54:30.936Z]       /home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/pkg/mod/github.com/pingcap/[email protected]/check.go:739 +0x113

[2020-03-09T07:54:30.936Z] ==================

It's introduced in #15208

  1. What did you expect to see?

  2. What did you see instead?

  3. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

Seen at https://internal.pingcap.net/idc-jenkins/blue/organizations/jenkins/tidb_ghpr_unit_test/detail/tidb_ghpr_unit_test/26695/pipeline/ in #15098 (comment)

@SunRunAway SunRunAway added the type/bug The issue is confirmed as a bug. label Mar 9, 2020
@SunRunAway
Copy link
Contributor Author

SunRunAway commented Mar 9, 2020

@lonng PTAL

@lonng
Copy link
Contributor

lonng commented Mar 9, 2020

@SunRunAway @reafans will fix it.

@SunRunAway SunRunAway reopened this Mar 10, 2020
@SunRunAway
Copy link
Contributor Author

@reafans PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test severity/minor type/bug The issue is confirmed as a bug.
Projects
None yet
4 participants