pingcap / pingcap/tidb

DATA RACE in the TestStartWithRunGCJobFailures

Open
#33,262 0 comments 0 reactions 0 assignees View on GitHub
affects-6.1 affects-6.2 affects-6.3 affects-6.4 affects-6.5 affects-6.6 affects-7.0 affects-7.1 component/GC component/test may-affects-4.0 may-affects-5.0 may-affects-5.1 may-affects-5.2 may-affects-5.3 may-affects-5.4 may-affects-6.0 severity/major sig/transaction type/bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.