pingcap / pingcap/tidb

goleak in the analyze test

Open
#45,950 0 comments 0 reactions 0 assignees View on GitHub
affects-7.5 affects-8.1 component/statistics component/test severity/moderate sig/planner 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)

### 2. What did you expect to see? (Required)

### 3. What did you see instead (Required)

```
--- PASS: TestGlobalMemoryControlForPrepareAnalyze (13.11s)

PASS

coverage: 15.8% of statements

goleak: Errors on successful test run: found unexpected goroutines:

[Goroutine 78023 in state sleep, with time.Sleep on top of the stack:

goroutine 78023 [sleep]:

time.Sleep(0x5f5e100)

GOROOT/src/runtime/time.go:195 +0x125

github.com/pingcap/tidb/executor.(*AnalyzeColumnsExecV2).subMergeWorker(0xc00a1ae608, 0xc026c09860, 0xc026c098c0, 0x2, 0x1)

executor/analyze_col_v2.go:603 +0x1cf

created by github.com/pingcap/tidb/executor.(*AnalyzeColumnsExecV2).buildSamplingStats in goroutine 77994

executor/analyze_col_v2.go:261 +0x64e

Goroutine 78024 in state sleep, with time.Sleep on top of the stack:

goroutine 78024 [sleep]:

time.Sleep(0x5f5e100)

GOROOT/src/runtime/time.go:195 +0x125

github.com/pingcap/tidb/executor.(*AnalyzeColumnsExecV2).subMergeWorker(0xc00a1ae608, 0xc026c09860, 0xc026c098c0, 0x2, 0x2)

executor/analyze_col_v2.go:603 +0x1cf

created by github.com/pingcap/tidb/executor.(*AnalyzeColumnsExecV2).buildSamplingStats in goroutine 77994

executor/analyze_col_v2.go:261 +0x64e

Goroutine 78025 in state sleep, with time.Sleep on top of the stack:

goroutine 78025 [sleep]:

time.Sleep(0x5f5e100)

GOROOT/src/runtime/time.go:195 +0x125

github.com/pingcap/tidb/executor.(*AnalyzeColumnsExecV2).subMergeWorker(0xc00a1ae608, 0xc026c09860, 0xc026c098c0, 0x2, 0x3)

executor/analyze_col_v2.go:603 +0x1cf

created by github.com/pingcap/tidb/executor.(*AnalyzeColumnsExecV2).buildSamplingStats in goroutine 77994

executor/analyze_col_v2.go:261 +0x64e

Goroutine 78022 in state sleep, with time.Sleep on top of the stack:

goroutine 78022 [sleep]:

time.Sleep(0x5f5e100)

GOROOT/src/runtime/time.go:195 +0x125

github.com/pingcap/tidb/executor.(*AnalyzeColumnsExecV2).subMergeWorker(0xc00a1ae608, 0xc026c09860, 0xc026c098c0, 0x2, 0x0)

executor/analyze_col_v2.go:603 +0x1cf

created by github.com/pingcap/tidb/executor.(*AnalyzeColumnsExecV2).buildSamplingStats in goroutine 77994

executor/analyze_col_v2.go:261 +0x64e

]

--

```
### 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.