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

Fix a race condition which leads product to hang #1426

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

lifengl
Copy link
Member

@lifengl lifengl commented Mar 6, 2025

the order to read this.joinableTask is not ensured in the current lock-free part of the logic. Under a race condition, this leads AsyncLazy to wait the inner task instead of the joinable task when two threads hitting this code about the same time.

the order to read this.joinableTask is not ensured in the current lock-free part of the logic.
Under a race condition, this leads AsyncLazy to wait the inner task instead of the joinable task when two threads hitting this code about the same time.
@lifengl lifengl requested a review from AArnott March 6, 2025 18:02
@AArnott
Copy link
Member

AArnott commented Mar 6, 2025

Should we target an older servicing branch for this fix, if VS is already impacted by this bug?

@lifengl lifengl merged commit 004d68b into main Mar 6, 2025
6 checks passed
@lifengl lifengl deleted the dev/lifengl/fixAsyncLazyRaceCondition branch March 6, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants