tidb
tidb copied to clipboard
DATA RACE in the TestCancel
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
==================
WARNING: DATA RACE
Write at 0x00c001f3f340 by goroutine 138923:
github.com/pingcap/tidb/ddl_test.TestCancel.func3()
ddl/cancel_test.go:287 +0xb0c
github.com/pingcap/tidb/ddl_test.TestCancel()
ddl/cancel_test.go:301 +0xaa8
testing.tRunner()
GOROOT/src/testing/testing.go:1446 +0x216
testing.(*T).Run.func1()
GOROOT/src/testing/testing.go:1493 +0x47
Previous read at 0x00c001f3f340 by goroutine 194418:
github.com/pingcap/tidb/ddl.(*TestDDLCallback).OnJobUpdated()
ddl/callback_test.go:101 +0x164
github.com/pingcap/tidb/ddl.(*ddl).delivery2worker.func1()
ddl/job_table.go:268 +0xc08
github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
util/wait_group_wrapper.go:33 +0x73
Goroutine 138923 (running) created at:
testing.(*T).Run()
GOROOT/src/testing/testing.go:1493 +0x75d
testing.runTests.func1()
GOROOT/src/testing/testing.go:1846 +0x99
testing.tRunner()
GOROOT/src/testing/testing.go:1446 +0x216
testing.runTests()
GOROOT/src/testing/testing.go:1844 +0x7ec
testing.(*M).Run()
GOROOT/src/testing/testing.go:1726 +0xa84
go.uber.org/goleak.VerifyTestMain()
external/org_uber_go_goleak/testmain.go:53 +0x59
github.com/pingcap/tidb/ddl_test.TestMain()
ddl/main_test.go:68 +0x60a
main.main()
bazel-out/k8-fastbuild/bin/ddl/ddl_test_/testmain.go:1318 +0x5e8
Goroutine 194418 (finished) created at:
github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run()
util/wait_group_wrapper.go:31 +0xe4
github.com/pingcap/tidb/ddl.(*ddl).delivery2worker()
ddl/job_table.go:221 +0x1b7
github.com/pingcap/tidb/ddl.(*ddl).loadDDLJobAndRun()
ddl/job_table.go:215 +0x57c
github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop()
ddl/job_table.go:187 +0xaab
github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop-fm()
<autogenerated>:1 +0x39
github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
util/wait_group_wrapper.go:33 +0x73
==================
https://storage.googleapis.com/pingcapprow/logs/tidb_race/1567976284762411008/build-log.txt
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
==================
WARNING: DATA RACE
Write at 0x00c00296d930 by goroutine 144078:
github.com/pingcap/tidb/ddl_test.TestCancel.func3()
ddl/cancel_test.go:287 +0x84
github.com/pingcap/tidb/ddl_test.TestCancel()
ddl/cancel_test.go:303 +0xaed
testing.tRunner()
GOROOT/src/testing/testing.go:1446 +0x216
testing.(*T).Run.func1()
GOROOT/src/testing/testing.go:1493 +0x47
Previous read at 0x00c00296d930 by goroutine 173305:
github.com/pingcap/tidb/ddl.(*TestDDLCallback).OnJobUpdated()
ddl/callback_test.go:101 +0x164
github.com/pingcap/tidb/ddl.(*ddl).delivery2worker.func1()
ddl/job_table.go:296 +0x13a1
github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
util/wait_group_wrapper.go:33 +0x73
Goroutine 144078 (running) created at:
testing.(*T).Run()
GOROOT/src/testing/testing.go:1493 +0x75d
testing.runTests.func1()
GOROOT/src/testing/testing.go:1846 +0x99
testing.tRunner()
GOROOT/src/testing/testing.go:1446 +0x216
testing.runTests()
GOROOT/src/testing/testing.go:1844 +0x7ec
testing.(*M).Run()
GOROOT/src/testing/testing.go:1726 +0xa84
go.uber.org/goleak.VerifyTestMain()
external/org_uber_go_goleak/testmain.go:53 +0x59
github.com/pingcap/tidb/ddl_test.TestMain()
ddl/main_test.go:67 +0x504
main.main()
bazel-out/k8-fastbuild/bin/ddl/ddl_test_/testmain.go:1350 +0x5e8
Goroutine 173305 (finished) created at:
github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run()
util/wait_group_wrapper.go:31 +0xe4
github.com/pingcap/tidb/ddl.(*ddl).delivery2worker()
ddl/job_table.go:224 +0x1b7
github.com/pingcap/tidb/ddl.(*ddl).loadDDLJobAndRun()
ddl/job_table.go:217 +0x57c
github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop()
ddl/job_table.go:189 +0xaab
github.com/pingcap/tidb/ddl.(*ddl).startDispatchLoop-fm()
<autogenerated>:1 +0x39
github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
util/wait_group_wrapper.go:33 +0x73
==================
it still exists.