You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DeadlockImminentError is raised when a connection is resolved inside an async task #71891
A DeadlockImminentError is raised in Airflow 3.3.1 when a connection is resolved inside an async task via await BaseHook.aget_hook(...) or await BaseHook.aget_connection(...).
The call chain when fetching a connection inside an async task is:
await Connection.async_get() ← async, running on the event-loop thread
→ Connection.get_uri() ← sync, still on event-loop thread
→ self.extra_dejson ← sync property, still on event-loop thread
→ mask_secret()
→ comms.send() ← ERROR: DeadlockImminentError
The error message says "use the async equivalents" — but the caller already is.
The bug is inside Connection itself: get_uri() and extra_dejson have no async counterparts, so secret masking always goes through the blocking comms.send(). amask_secret() (which uses asend()) already existed in airflow.sdk.log but nothing in Connection called it.
What you think should happen instead?
The Hook or Connection should be resolved an no DeadlockImminentError should be raised.
Activity
dabla commentedon Aug 20, 2026
I've created a PR which fixes this issue.