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

ownerManager has race even when its methods are serialized called #56053

Closed
lance6716 opened this issue Sep 12, 2024 · 2 comments · Fixed by #56362
Closed

ownerManager has race even when its methods are serialized called #56053

lance6716 opened this issue Sep 12, 2024 · 2 comments · Fixed by #56362
Assignees
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/ddl This issue is related to DDL of TiDB. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@lance6716
Copy link
Contributor

lance6716 commented Sep 12, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

call CampaignOwner then CampaignCancel

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

3. What did you see instead (Required)

go m.campaignLoop(session)

campaignContext, m.campaignCancel = context.WithCancel(m.ctx)

tidb/pkg/owner/manager.go

Lines 238 to 240 in d6db1e8

// CampaignCancel implements Manager.CampaignCancel interface.
func (m *ownerManager) CampaignCancel() {
m.campaignCancel()

there's data race or panic on campaignCancel

4. What is your TiDB version? (Required)

@lance6716 lance6716 added the type/bug The issue is confirmed as a bug. label Sep 12, 2024
@lance6716 lance6716 changed the title ownerManager has race even its methods are serialized called ownerManager has race even when its methods are serialized called Sep 12, 2024
@lance6716 lance6716 added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Sep 13, 2024
@lance6716
Copy link
Contributor Author

ptal @fishiu

@winoros winoros added sig/sql-infra SIG: SQL Infra component/ddl This issue is related to DDL of TiDB. and removed sig/planner SIG: Planner labels Sep 19, 2024
@fishiu
Copy link
Contributor

fishiu commented Sep 26, 2024

/assign

@lance6716 lance6716 added affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/ddl This issue is related to DDL of TiDB. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. severity/major 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.

4 participants