Deadlock when getting a token in asynchronous mode #11543
Labels
Azure.Core
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
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.
Milestone
Describe the bug
I've faced a deadlock when trying to get access to several blobs.
To Reproduce
Code:
Expected behavior
The script must work correctly.
Additional context
Traceback after killing of the task:
The reason is here: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/core/azure-core/azure/core/pipeline/policies/_authentication_async.py#L24
When second task is trying to get lock for the thread, this causes the program to freeze.
The possible solution is replacing
threading.Lock
withasyncio.Lock
The text was updated successfully, but these errors were encountered: