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

Open
lance6716 opened this issue Sep 12, 2024 · 1 comment
Open

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

lance6716 opened this issue Sep 12, 2024 · 1 comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 severity/major sig/planner SIG: Planner 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants