DATA RACE in the TestStartWithRunGCJobFailures
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```
==================
[2022/03/20 12:31:46.642 +00:00] [ERROR] [gc_worker.go:227] ["[gc worker] runGCJob"] [error="mock error"] [errorVerbose="mock error\ngithub.com/pingcap/tidb/store/gcworker.TestStartWithRunGCJobFailures\n\t/go/tidb/store/gcworker/gc_worker_test.go:1140\ntesting.tRunner\n\t/usr/local/go/src/testing/testing.go:1259\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1581"] [stack="github.com/pingcap/tidb/store/gcworker.(*GCWorker).start\n\t/go/tidb/store/gcworker/gc_worker.go:227"]
[2022/03/20 12:31:46.643 +00:00] [ERROR] [gc_worker.go:227] ["[gc worker] runGCJob"] [error="mock error"] [errorVerbose="mock error\ngithub.com/pingcap/tidb/store/gcworker.TestStartWithRunGCJobFailures\n\t/go/tidb/store/gcworker/gc_worker_test.go:1140\ntesting.tRunner\n\t/usr/local/go/src/testing/testing.go:1259\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1581"] [stack="github.com/pingcap/tidb/store/gcworker.(*GCWorker).start\n\t/go/tidb/store/gcworker/gc_worker.go:227"]
WARNING: DATA RACE
Write at 0x00c0015cef80 by goroutine 213:
github.com/pingcap/tidb/store/gcworker.(*GCWorker).start()
/go/tidb/store/gcworker/gc_worker.go:224 +0x475
github.com/pingcap/tidb/store/gcworker.(*GCWorker).Start·dwrap·1()
/go/tidb/store/gcworker/gc_worker.go:116 +0x64
Previous write at 0x00c0015cef80 by goroutine 59:
github.com/pingcap/tidb/store/gcworker.(*GCWorker).start()
/go/tidb/store/gcworker/gc_worker.go:224 +0x475
github.com/pingcap/tidb/store/gcworker.(*GCWorker).Start·dwrap·1()
/go/tidb/store/gcworker/gc_worker.go:116 +0x64
Goroutine 213 (running) created at:
github.com/pingcap/tidb/store/gcworker.(*GCWorker).Start()
/go/tidb/store/gcworker/gc_worker.go:116 +0x1b8
github.com/pingcap/tidb/store/gcworker.createGCWorkerSuite()
/go/tidb/store/gcworker/gc_worker_test.go:127 +0x648
github.com/pingcap/tidb/store/gcworker.TestStartWithRunGCJobFailures()
/go/tidb/store/gcworker/gc_worker_test.go:1130 +0x4a
testing.tRunner()
/usr/local/go/src/testing/testing.go:1259 +0x22f
testing.(*T).Run·dwrap·21()
/usr/local/go/src/testing/testing.go:1306 +0x47
Goroutine 59 (running) created at:
github.com/pingcap/tidb/store/gcworker.(*GCWorker).Start()
/go/tidb/store/gcworker/gc_worker.go:116 +0x1b8
github.com/pingcap/tidb/store/gcworker.TestStartWithRunGCJobFailures()
/go/tidb/store/gcworker/gc_worker_test.go:1133 +0xa6
testing.tRunner()
/usr/local/go/src/testing/testing.go:1259 +0x22f
testing.(*T).Run·dwrap·21()
/usr/local/go/src/testing/testing.go:1306 +0x47
==================
==================
WARNING: DATA RACE
Write at 0x00c0015cef88 by goroutine 213:
github.com/pingcap/tidb/store/gcworker.(*GCWorker).start()
/go/tidb/store/gcworker/gc_worker.go:225 +0x4b1
github.com/pingcap/tidb/store/gcworker.(*GCWorker).Start·dwrap·1()
/go/tidb/store/gcworker/gc_worker.go:116 +0x64
Previous write at 0x00c0015cef88 by goroutine 59:
github.com/pingcap/tidb/store/gcworker.(*GCWorker).start()
/go/tidb/store/gcworker/gc_worker.go:225 +0x4b1
github.com/pingcap/tidb/store/gcworker.(*GCWorker).Start·dwrap·1()
/go/tidb/store/gcworker/gc_worker.go:116 +0x64
Goroutine 213 (running) created at:
github.com/pingcap/tidb/store/gcworker.(*GCWorker).Start()
/go/tidb/store/gcworker/gc_worker.go:116 +0x1b8
github.com/pingcap/tidb/store/gcworker.createGCWorkerSuite()
/go/tidb/store/gcworker/gc_worker_test.go:127 +0x648
github.com/pingcap/tidb/store/gcworker.TestStartWithRunGCJobFailures()
/go/tidb/store/gcworker/gc_worker_test.go:1130 +0x4a
testing.tRunner()
/usr/local/go/src/testing/testing.go:1259 +0x22f
testing.(*T).Run·dwrap·21()
/usr/local/go/src/testing/testing.go:1306 +0x47
Goroutine 59 (running) created at:
github.com/pingcap/tidb/store/gcworker.(*GCWorker).Start()
/go/tidb/store/gcworker/gc_worker.go:116 +0x1b8
github.com/pingcap/tidb/store/gcworker.TestStartWithRunGCJobFailures()
/go/tidb/store/gcworker/gc_worker_test.go:1133 +0xa6
testing.tRunner()
/usr/local/go/src/testing/testing.go:1259 +0x22f
testing.(*T).Run·dwrap·21()
/usr/local/go/src/testing/testing.go:1306 +0x47
==================
```
### 2. What did you expect to see? (Required)
### 3. What did you see instead (Required)
### 4. What is your TiDB version? (Required)
Contributor guide
Assessment
This issue has not been assessed yet.