Skip to content

ttl: delWorker maybe blocked forever in concurrency #58484

@lcwangchao

Description

@lcwangchao

See gouroutine

goroutine 810 [select, 328 minutes]:
golang.org/x/time/rate.(*Limiter).wait(0xc000bbc730, {0x70fa448, 0xc002d77da0}, 0x1, {0x4a2cdb1?, 0x679ca4a?, 0xab0d780?}, 0x69d6ec0)
	/root/go/pkg/mod/golang.org/x/[email protected]/rate/rate.go:286 +0x3f3
golang.org/x/time/rate.(*Limiter).WaitN(0xc000bbc730, {0x70fa448, 0xc002d77da0}, 0x1)
	/root/go/pkg/mod/golang.org/x/[email protected]/rate/rate.go:249 +0x50
golang.org/x/time/rate.(*Limiter).Wait(...)
	/root/go/pkg/mod/golang.org/x/[email protected]/rate/rate.go:234
github.com/pingcap/tidb/pkg/ttl/ttlworker.(*defaultDelRateLimiter).WaitDelToken(0xc002d60680?, {0x70fa448?, 0xc002d77da0?})
	/workspace/source/tidb/pkg/ttl/ttlworker/del.go:72 +0x73
github.com/pingcap/tidb/pkg/ttl/ttlworker.(*ttlDeleteTask).doDelete(0xc015b24d20, {0x70fa448, 0xc002d77da0}, {0x719ac00, 0xc002d767e0})
	/workspace/source/tidb/pkg/ttl/ttlworker/del.go:139 +0x389
github.com/pingcap/tidb/pkg/ttl/ttlworker.(*ttlDeleteWorker).loop(0xc002a7ec00)
	/workspace/source/tidb/pkg/ttl/ttlworker/del.go:396 +0x46f
github.com/pingcap/tidb/pkg/ttl/ttlworker.(*baseWorker).loop(0x0?)
	/workspace/source/tidb/pkg/ttl/ttlworker/worker.go:136 +0x53
github.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).Run.func1()
	/workspace/source/tidb/pkg/util/wait_group_wrapper.go:157 +0x4c
created by github.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).Run in goroutine 828
	/workspace/source/tidb/pkg/util/wait_group_wrapper.go:155 +0x73

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.severity/majorsig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions