-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Error loading command modules 'containerapp' and 'cdn' due to msrest import deadlock under Python 3.14 (pipx install) #32980
Copy link
Copy link
Closed
Labels
Accountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botContainerAppInstallationNetworkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...Network - CDNaz cdnaz cdnService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-identity-squadact-observability-squadact-platform-engineering-squadact-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-author-feedbackMore information is needed from author to address the issue.More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.There has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Metadata
Metadata
Assignees
Labels
Accountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botContainerAppInstallationNetworkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...Network - CDNaz cdnaz cdnService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-identity-squadact-observability-squadact-platform-engineering-squadact-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-author-feedbackMore information is needed from author to address the issue.More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.There has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
When running any
azcommand (e.g.az login), two errors are printed to stderr on startup:Despite these errors, the affected commands (
az containerapp,az cdn) still appear to load successfully and are usable. The errors are non-fatal but appear on every invocation.Environment
Steps to reproduce
Expected behavior
No errors printed to stderr on startup. Command modules load silently.
Actual behavior
Two errors appear every invocation (address will vary):
Root cause analysis
This appears to be a recurrence of the Python import-lock race condition fixed in PR #26287 (which addressed
requests.modelsdeadlocks in Python 3.10.10). The same multi-threaded command module loading inazure.cli.coretriggers a_ModuleLockdeadlock onmsrest.http_loggerwhen running under Python 3.14, and aKeyError: 'msrest'in thecontainerappmodule (likely due tomsrestbeing only partially initialized in one thread when another accesses it).msrestis present and importable in the venv — single-threaded imports of both modules succeed without error. The failures are specific to the concurrent loading path.References
aaz: Fix importlib deadlocks while loadingrequests.modelsin multi threads #26287: {Core} aaz: Fix importlib deadlocks while loading requests.models in multi threads