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

Unsafe data race caused by the global TSO request pool #8076

Closed
JmPotato opened this issue Apr 16, 2024 · 0 comments
Closed

Unsafe data race caused by the global TSO request pool #8076

JmPotato opened this issue Apr 16, 2024 · 0 comments
Labels
affects-8.1 severity/critical The issue's severity is critical. type/bug The issue is confirmed as a bug.

Comments

@JmPotato
Copy link
Member

Bug Report

If (*client).dispatchTSORequestWithRetry directly calls tryDone() due to the error of context canceled, the caller might get the TSO result and put the request back into the pool. At this time, the old tsoClient may have data races with the new tsoClient when cleaning up residual TSO requests.

This is also the root cause of #8055.

@JmPotato JmPotato added type/bug The issue is confirmed as a bug. severity/critical The issue's severity is critical. labels Apr 16, 2024
@github-actions github-actions bot added this to Need Triage in Questions and Bug Reports Apr 16, 2024
ti-chi-bot bot added a commit that referenced this issue Apr 17, 2024
…data race (#8077)

close #8055, ref #8076

Use the TSO request pool at the `tsoClient` level to avoid data race.

Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot bot pushed a commit that referenced this issue Apr 30, 2024
…data race (#8077) (#8141)

close #8055, ref #8076

Use the TSO request pool at the `tsoClient` level to avoid data race.

Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
Questions and Bug Reports automation moved this from Need Triage to Closed Apr 30, 2024
ti-chi-bot bot pushed a commit to pingcap/tidb that referenced this issue May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.1 severity/critical The issue's severity is critical. type/bug The issue is confirmed as a bug.
Projects
Development

No branches or pull requests

1 participant