github-actions[bot] opened a new pull request, #73720:
URL: https://github.com/apache/airflow/pull/73720

   A synchronous SUPERVISOR_COMMS.send() made from the thread that drives an
   event loop, while that loop is paused between two run_until_complete()
   calls and an asend() coroutine is parked mid-I/O, blocked forever: the
   holder of the comms thread lock can only release it once the loop runs
   again, and the loop cannot run while its thread is blocked in send().
   
   The existing guard only covered a *running* loop: it relied on
   asyncio.get_running_loop(), which raises while the loop is paused, so
   send() fell through to a blocking acquire and the task process froze
   with every thread idle, no exception and no log line, until the
   execution timeout. This was hit in production by an iterated task whose
   executor pulled the next sub-task's input through a sync XCom read
   between two run_until_complete() calls.
   
   Treat an in-flight asend() on the current thread's loop as an imminent
   deadlock regardless of whether the loop is running or paused, so the
   call fails eagerly with a clear DeadlockImminentError instead of hanging.
   (cherry picked from commit 0cf78267ad9ff1d4ad73d8eae84668cfb7f381e2)
   
   Co-authored-by: David Blain <[email protected]>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to