Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpcted blocked scheduler in DXF if doCleanupTask takes long time #59944

Open
wjhuang2016 opened this issue Mar 6, 2025 · 0 comments · May be fixed by #59945
Open

Unexpcted blocked scheduler in DXF if doCleanupTask takes long time #59944

wjhuang2016 opened this issue Mar 6, 2025 · 0 comments · May be fixed by #59945
Labels
component/ddl This issue is related to DDL of TiDB. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@wjhuang2016
Copy link
Member

wjhuang2016 commented Mar 6, 2025

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

	sm.schedulerWG.RunWithLog(func() {
		defer func() {
			scheduler.Close()
			sm.delScheduler(task.ID)
			if allocateSlots {
				sm.slotMgr.unReserve(basicTask, reservedExecID)
			}
			handle.NotifyTaskChange()
			sm.logger.Info("task scheduler exit", zap.Int64("task-id", task.ID))
		}()
		metrics.UpdateMetricsForRunTask(task)
		scheduler.ScheduleTask()
		sm.finishCh <- struct{}{}
	})

finishCh may be blocked. If more than 2x concurrency tasks are put into finishCh and it still can handle any result. New task would be blocked because no slot is available.

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

N/A

3. What did you see instead (Required)

N/A

4. What is your TiDB version? (Required)

master

@wjhuang2016 wjhuang2016 added type/bug The issue is confirmed as a bug. severity/moderate component/ddl This issue is related to DDL of TiDB. labels Mar 6, 2025
@wjhuang2016 wjhuang2016 linked a pull request Mar 6, 2025 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ddl This issue is related to DDL of TiDB. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant