Skip to content

github.com/pingcap/tidb/ttl/ttlworker.(*ttlScanWorker).loop will leak  #41490

@hawkingrei

Description

@hawkingrei

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: TestAbnormalSessionPool (2.29s)

PASS

coverage: 12.9% of statements

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

[Goroutine 20607 in state select, with github.com/pingcap/tidb/ttl/ttlworker.(*ttlScanWorker).loop on top of the stack:

goroutine 20607 [select]:

github.com/pingcap/tidb/ttl/ttlworker.(*ttlScanWorker).loop(0xc0084acd80)

	ttl/ttlworker/scan.go:296 +0x19a

github.com/pingcap/tidb/ttl/ttlworker.(*baseWorker).loop(0xc008e60fd0?)

	ttl/ttlworker/worker.go:134 +0x85

github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()

	util/wait_group_wrapper.go:154 +0x6b

created by github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run

	util/wait_group_wrapper.go:152 +0x8d


 Goroutine 17696 in state select, with github.com/pingcap/tidb/ttl/ttlworker.(*JobManager).jobLoop on top of the stack:

goroutine 17696 [select]:

github.com/pingcap/tidb/ttl/ttlworker.(*JobManager).jobLoop(0xc007a0a000)

	ttl/ttlworker/job_manager.go:167 +0x565

github.com/pingcap/tidb/ttl/ttlworker.(*baseWorker).loop(0x2a5d18b?)

	ttl/ttlworker/worker.go:134 +0x85

github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()

	util/wait_group_wrapper.go:154 +0x6b

created by github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run

	util/wait_group_wrapper.go:152 +0x8d


 Goroutine 20613 in state select, with github.com/pingcap/tidb/ttl/ttlworker.(*ttlDeleteWorker).loop on top of the stack:

goroutine 20613 [select]:

github.com/pingcap/tidb/ttl/ttlworker.(*ttlDeleteWorker).loop(0xc008493180)

	ttl/ttlworker/del.go:281 +0x2eb

github.com/pingcap/tidb/ttl/ttlworker.(*baseWorker).loop(0xc004d1afb0?)

	ttl/ttlworker/worker.go:134 +0x85

github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()

	util/wait_group_wrapper.go:154 +0x6b

created by github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run

	util/wait_group_wrapper.go:152 +0x8d


 Goroutine 20612 in state select, with github.com/pingcap/tidb/ttl/ttlworker.(*ttlDeleteWorker).loop on top of the stack:

goroutine 20612 [select]:

github.com/pingcap/tidb/ttl/ttlworker.(*ttlDeleteWorker).loop(0xc008493100)

	ttl/ttlworker/del.go:281 +0x2eb

github.com/pingcap/tidb/ttl/ttlworker.(*baseWorker).loop(0x2a5d18b?)

	ttl/ttlworker/worker.go:134 +0x85

github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()

	util/wait_group_wrapper.go:154 +0x6b

created by github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run

	util/wait_group_wrapper.go:152 +0x8d


 Goroutine 20605 in state chan receive, with github.com/pingcap/tidb/ttl/client.(*mockClient).WatchCommand.func1 on top of the stack:

goroutine 20605 [chan receive]:

github.com/pingcap/tidb/ttl/client.(*mockClient).WatchCommand.func1()

	ttl/client/command.go:419 +0x69

created by github.com/pingcap/tidb/ttl/client.(*mockClient).WatchCommand

	ttl/client/command.go:418 +0x31c


 Goroutine 20609 in state select, with github.com/pingcap/tidb/ttl/ttlworker.(*ttlScanWorker).loop on top of the stack:

goroutine 20609 [select]:

github.com/pingcap/tidb/ttl/ttlworker.(*ttlScanWorker).loop(0xc0084acea0)

	ttl/ttlworker/scan.go:296 +0x19a

github.com/pingcap/tidb/ttl/ttlworker.(*baseWorker).loop(0xc004bb3fd0?)

	ttl/ttlworker/worker.go:134 +0x85

github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()

	util/wait_group_wrapper.go:154 +0x6b

created by github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run

	util/wait_group_wrapper.go:152 +0x8d


 Goroutine 20608 in state select, with github.com/pingcap/tidb/ttl/ttlworker.(*ttlScanWorker).loop on top of the stack:

goroutine 20608 [select]:

github.com/pingcap/tidb/ttl/ttlworker.(*ttlScanWorker).loop(0xc0084ace10)

	ttl/ttlworker/scan.go:296 +0x19a

github.com/pingcap/tidb/ttl/ttlworker.(*baseWorker).loop(0xc00016afd0?)

	ttl/ttlworker/worker.go:134 +0x85

github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()

	util/wait_group_wrapper.go:154 +0x6b

created by github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run

	util/wait_group_wrapper.go:152 +0x8d


 Goroutine 20610 in state select, with github.com/pingcap/tidb/ttl/ttlworker.(*ttlDeleteWorker).loop on top of the stack:

goroutine 20610 [select]:

github.com/pingcap/tidb/ttl/ttlworker.(*ttlDeleteWorker).loop(0xc008493000)

	ttl/ttlworker/del.go:281 +0x2eb

github.com/pingcap/tidb/ttl/ttlworker.(*baseWorker).loop(0x2a5d18b?)

	ttl/ttlworker/worker.go:134 +0x85

github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()

	util/wait_group_wrapper.go:154 +0x6b

created by github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run

	util/wait_group_wrapper.go:152 +0x8d


 Goroutine 20611 in state select, with github.com/pingcap/tidb/ttl/ttlworker.(*ttlDeleteWorker).loop on top of the stack:

goroutine 20611 [select]:

github.com/pingcap/tidb/ttl/ttlworker.(*ttlDeleteWorker).loop(0xc008493080)

	ttl/ttlworker/del.go:281 +0x2eb

github.com/pingcap/tidb/ttl/ttlworker.(*baseWorker).loop(0xc00016b7d0?)

	ttl/ttlworker/worker.go:134 +0x85

github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()

	util/wait_group_wrapper.go:154 +0x6b

created by github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run

	util/wait_group_wrapper.go:152 +0x8d


 Goroutine 20606 in state select, with github.com/pingcap/tidb/ttl/ttlworker.(*ttlScanWorker).loop on top of the stack:

goroutine 20606 [select]:

github.com/pingcap/tidb/ttl/ttlworker.(*ttlScanWorker).loop(0xc0084ac2d0)

	ttl/ttlworker/scan.go:296 +0x19a

github.com/pingcap/tidb/ttl/ttlworker.(*baseWorker).loop(0xc008a1e7d0?)

	ttl/ttlworker/worker.go:134 +0x85

github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()

	util/wait_group_wrapper.go:154 +0x6b

created by github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run

	util/wait_group_wrapper.go:152 +0x8d

]

--

4. What is your TiDB version? (Required)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions