Fix deadlock in AccMgrAuthTokenProvider when account is removed during token refresh#2846
Merged
wmathurin merged 1 commit intoforcedotcom:devfrom Feb 27, 2026
Merged
Fix deadlock in AccMgrAuthTokenProvider when account is removed during token refresh#2846wmathurin merged 1 commit intoforcedotcom:devfrom
wmathurin merged 1 commit intoforcedotcom:devfrom
Conversation
…g token refresh When logout occurs while threads are refreshing tokens, the method will return for matchingAccount == null and therefore the lock.notifyAll() that is later in the method will never be called causing other threads to be stuck on lock.wait(). Now the try-finally wraps all the logic after gettingAuthToken = true to ensure that lock.notifyAll() is always called. Fixes W-21304558
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2846 +/- ##
============================================
+ Coverage 64.55% 64.57% +0.02%
- Complexity 2925 2926 +1
============================================
Files 222 222
Lines 17323 17338 +15
Branches 2471 2474 +3
============================================
+ Hits 11182 11196 +14
Misses 4934 4934
- Partials 1207 1208 +1
🚀 New features to boost your workflow:
|
brandonpage
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When logout occurs while threads are refreshing tokens, the method will return for matchingAccount == null and therefore the lock.notifyAll() that is later in the method will never be called causing other threads to be stuck on lock.wait(). Now the try-finally wraps all the logic after gettingAuthToken = true to ensure that lock.notifyAll() is always called.
Fixes W-21304558