flaky test TestParallelCPUProfiler
- 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)
### 2. What did you expect to see? (Required)
### 3. What did you see instead (Required)
```
=== RUN TestParallelCPUProfiler
[2023/02/11 12:53:23.641 +08:00] [INFO] [cpuprofile.go:113] ["parallel cpu profiler started"]
[2023/02/11 12:53:23.642 +08:00] [ERROR] [cpuprofile.go:214] ["parallel cpu profiler panic"] [recover="send on closed channel"] [stack="github.com/pingcap/tidb/util/cpuprofile.(*parallelCPUProfiler).sendToConsumers.func1\n\tutil/cpuprofile/cpuprofile.go:214\nruntime.gopanic\n\tGOROOT/src/runtime/panic.go:884\nruntime.chansend\n\tGOROOT/src/runtime/chan.go:206\nruntime.selectnbsend\n\tGOROOT/src/runtime/chan.go:694\ngithub.com/pingcap/tidb/util/cpuprofile.(*parallelCPUProfiler).sendToConsumers\n\tutil/cpuprofile/cpuprofile.go:220\ngithub.com/pingcap/tidb/util/cpuprofile.(*parallelCPUProfiler).doProfiling\n\tutil/cpuprofile/cpuprofile.go:197\ngithub.com/pingcap/tidb/util/cpuprofile.(*parallelCPUProfiler).profilingLoop\n\tutil/cpuprofile/cpuprofile.go:174\ngithub.com/pingcap/tidb/util.WithRecovery\n\tutil/misc.go:96"]
cpuprofile_test.go:117:
Error Trace: /home/jenkins/.tidb/tmp/63a9840cd0739f2c243bb46478607469/execroot/__main__/bazel-out/k8-fastbuild/bin/util/cpuprofile/cpuprofile_test_/cpuprofile_test.runfiles/__main__/util/cpuprofile/cpuprofile_test.go:117
Error: Received unexpected error:
cpu profiling already in use
Test: TestParallelCPUProfiler
[2023/02/11 12:53:24.058 +08:00] [INFO] [cpuprofile.go:130] ["parallel cpu profiler stopped"]
--- FAIL: TestParallelCPUProfiler (0.42s)
=== RUN TestGetCPUProfile
[2023/02/11 12:53:24.058 +08:00] [INFO] [cpuprofile.go:113] ["parallel cpu profiler started"]
cpuprofile_test.go:170:
Error Trace: /home/jenkins/.tidb/tmp/63a9840cd0739f2c243bb46478607469/execroot/__main__/bazel-out/k8-fastbuild/bin/util/cpuprofile/cpuprofile_test_/cpuprofile_test.runfiles/__main__/util/cpuprofile/cpuprofile_test.go:170
Error: An error is expected but got nil.
Test: TestGetCPUProfile
[2023/02/11 12:53:24.462 +08:00] [INFO] [cpuprofile.go:130] ["parallel cpu profiler stopped"]
--- FAIL: TestGetCPUProfile (0.40s)
FAIL
```
### 4. What is your TiDB version? (Required)
Contributor guide
Assessment
This issue has not been assessed yet.