On 7/20/20 4:00 AM, Vladimir Sementsov-Ogievskiy wrote:
It should be to reenter qio_channel_yield() on io/channel read/write
path, so it's safe to reduce in_flight and allow attaching new aio
context. And no problem to allow drain itself: connection attempt is
not a guest request. Moreover, if remote server is down, we can hang
in negotiation, blocking drain section and provoking a dead lock.
How to reproduce the dead lock:
I tried to reproduce this; but in the several minutes it has taken me to write
this email, it still has not hung. Still, your stack trace is fairly good
evidence of the problem, where adding a temporary sleep or running it under gdb
with a breakpoint can probably make reproduction easier.