On 09/06/21 13:40, Vladimir Sementsov-Ogievskiy wrote:
And in gdb all looks like aio_co_wake() in my own separate thread
leads to coroutine execution exactly in my own thread.. So, it don't
dead-lock on trying to acquire the context, instead it somehow enter
to a coroutine. And then deadlock because called coroutine tries to
lock the mutex, that already locked before (in the code that thinks
that aio_co_wake() will only schedule the coroutine).
I'll dig into it a bit more.
Aha, that's because qemu_mutex_iothread_locked() from
stubs/iothread-lock.c is used, which always returns true.
Ok, you can change it to always return false with this patch. Which is
nicer, as it means we have less special casing going on in the tools and
it matches the fact that there are no vCPU threads.
Paolo