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

[BUG] Unpredictable behavior that leads to tasks being indefinitely stalled. #44901

Closed
mirsaeedi opened this issue Jul 8, 2024 · 7 comments
Closed
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@mirsaeedi
Copy link

Library name and version

Azure.Core 1.40.0

Describe the bug

We encountered unpredictable behavior and threading issues since upgrading to Azure.Identity 1.12.0, which we believe stems from a bug in Azure.Core 1.40.0. The problem leads to tasks or threads being indefinitely stalled.

In our efforts to pinpoint the cause, we analyzed a memory dump of our service, revealing that tasks are stuck in a method at BearerTokenAuthenticationPolicy L425 in Azure.Core. Further examination indicated that a commit to Azure Core in May introduced this bug. The issue occurs under specific conditions when the authentication token has expired, and the background refresh token attempt has failed or been canceled, causing CurrentTokenTcs.Task in L425 to remain unfulfilled and the waiting thread to be permanently blocked.

Teams link

Expected behavior

The task should not get stuck.

Actual behavior

The problem leads to tasks or threads being indefinitely stalled.

Reproduction Steps

We were not able to reproduce the issue. Though, from the code, it's obvious that the issue happens when the authentication token has expired, and the background refresh token attempt has failed or been canceled.

Environment

No response

@github-actions github-actions bot added Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 8, 2024
Copy link

github-actions bot commented Jul 8, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@jsquire
Copy link
Member

jsquire commented Jul 8, 2024

Fixed via #44882 and expected to be released later this week for Azure.Core's July update.

@jsquire jsquire added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Jul 8, 2024
@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Jul 8, 2024
Copy link

github-actions bot commented Jul 8, 2024

Hi @mirsaeedi. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

Copy link

Hi @mirsaeedi, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.

@KurzyukovAndrey
Copy link

KurzyukovAndrey commented Aug 5, 2024

@jsquire Do you plan to release Azure.Identity with Azure.Core >= 1.41 dependency?

@jsquire
Copy link
Member

jsquire commented Aug 5, 2024

The next GA release of Identity will have an updated reference. There is no date that I can share at this time for that. The recommended mitigation in the meantime is to take a direct reference in your application on Azure.Core v1.41+ which will hoist the version used by Identity.

@KurzyukovAndrey
Copy link

Thank you for the update!

@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
Development

No branches or pull requests

4 participants