tidb icon indicating copy to clipboard operation
tidb copied to clipboard

if handleTasksLoop keeps panic, it keeps entering and no logs

Open D3Hunter opened this issue 1 year ago • 2 comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

as we we handleTasksLoop itself as recover function, and tidbutil.Recover calls recover before logs https://github.com/pingcap/tidb/blob/671e9803402a490f364e7a8f76610c9fc68459db/pkg/disttask/framework/taskexecutor/manager.go#L183

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

master

D3Hunter avatar Feb 22 '24 08:02 D3Hunter

handleTasksLoop shouldn't call itself recusively, this didn't handle the panic anyway, maybe log and stop executor manager, we should also unregister the node meta to allow subtask be balanced away in this case

D3Hunter avatar Feb 22 '24 08:02 D3Hunter

https://github.com/pingcap/tidb/pull/51241/files#diff-69ddf4e4b7217304828d6d8e38f30b4df55e90c2c3135d2d9c8be3a872bc07caL113-L115 here we moved where recoverFn is called, we can see logs now

D3Hunter avatar Feb 23 '24 10:02 D3Hunter