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

ddl: ddl job will hang on loop when it encounts panic in cancelling logic #23202

Closed
AilinKid opened this issue Mar 9, 2021 · 1 comment · Fixed by #23204
Closed

ddl: ddl job will hang on loop when it encounts panic in cancelling logic #23202

AilinKid opened this issue Mar 9, 2021 · 1 comment · Fixed by #23204
Assignees
Labels
severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@AilinKid
Copy link
Contributor

AilinKid commented Mar 9, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

The case is that when add index takes a long time, the user manually canceled the DDL job, so the add index logic will be converted to drop index logic.

Once there is a panic in the path of canceling, the goroutine will be pulled up and set its state as canceling again, which is a dead loop.

We should count the error count when the goroutine being pulled up from a panic.

Reproduce step:

mock a panic in function `dropIndexColumnFlag`
alter table t drop index  
loop...

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

it can break the loop when it has been pulled up from panic for 512 times.

3. What did you see instead (Required)

dead loop

4. What is your TiDB version? (Required)

master, 5.0, 4.0 ....

@AilinKid AilinKid added the type/bug The issue is confirmed as a bug. label Mar 9, 2021
@AilinKid AilinKid self-assigned this Mar 9, 2021
@AilinKid AilinKid added the sig/sql-infra SIG: SQL Infra label Mar 9, 2021
@ti-srebot
Copy link
Contributor

ti-srebot commented Mar 13, 2021

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

[v4.0.0:v4.0.11],[v5.0.0-rc]

6. Fixed versions

master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants