kalluripradeep commented on issue #64620:
URL: https://github.com/apache/airflow/issues/64620#issuecomment-4202402923

   I’ve been digging into this and it looks like the asyncio.Lock in 
TriggerCommsDecoder.asend() is definitely the root cause. This method gets 
called across different threads and loops (via sync_to_async), but because 
asyncio.Lock is bound to a single event loop, it wasn't actually protecting the 
socket access across threads, leading to those out-of-order response crashes.
   
   I've pushed a PR that swaps this out for a threading.Lock acquired 
asynchronously. This ensures that only one thread can use the socket at a time, 
regardless of which event loop it's running in. I also added a drain() call to 
make sure messages are fully sent before we wait for the supervisor's response.


-- 
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