Skip to content

Fix a race condition which leads product to hang#1426

Merged
lifengl merged 1 commit into
mainfrom
dev/lifengl/fixAsyncLazyRaceCondition
Mar 6, 2025
Merged

Fix a race condition which leads product to hang#1426
lifengl merged 1 commit into
mainfrom
dev/lifengl/fixAsyncLazyRaceCondition

Conversation

@lifengl

@lifengl lifengl commented Mar 6, 2025

Copy link
Copy Markdown
Member

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

AArnott commented Mar 6, 2025

Copy link
Copy Markdown
Member

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
@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