Goroutine leak in slowQueryRetriever.parseSlowLog
#32656
Labels
affects-5.0
This bug affects 5.0.x versions.
affects-5.1
This bug affects 5.1.x versions.
affects-5.2
This bug affects 5.2.x versions.
affects-5.3
This bug affects 5.3.x versions.
severity/critical
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
goroutine 221431 [chan send, 9 minutes]:
github.com/pingcap/tidb/executor.(*slowQueryRetriever).parseSlowLog(0xc09392b480, 0x4038470, 0xc09b4dc360, 0x407eb58, 0xc092c7ae00, 0xc13d6ddf50, 0x40)
/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/slow_query.go:451 +0x23e
github.com/pingcap/tidb/executor.(*slowQueryRetriever).parseDataForSlowLog(0xc09392b480, 0x4038470, 0xc09b4dc360, 0x407eb58, 0xc092c7ae00)
/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/slow_query.go:191 +0x1d1
created by github.com/pingcap/tidb/executor.(*slowQueryRetriever).initializeAsyncParsing
/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/slow_query.go:1045 +0x98
2. What did you expect to see? (Required)
No leak
3. What did you see instead (Required)
When
dataForSlowLog
is cancelled,parseSlowLog
stucks ate.taskList <- t
for 9 minutes.#27471 just fixed https://github.com/pingcap/tidb/blob/v5.2.3/executor/slow_query.go#L435 , but there's another leak in https://github.com/pingcap/tidb/blob/v5.2.3/executor/slow_query.go#L451 .
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: