qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deadlock when using iothread during backup_clean()


From: Paolo Bonzini
Subject: Re: deadlock when using iothread during backup_clean()
Date: Tue, 5 Sep 2023 13:42:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 9/5/23 12:01, Fiona Ebner wrote:
Can we assume block_job_remove_all_bdrv() to always hold the job's
AioContext?

I think so, see job_unref_locked(), job_prepare_locked() and job_finalize_single_locked(). These call the callbacks that ultimately get to block_job_remove_all_bdrv().
        
And if yes, can we just tell bdrv_graph_wrlock() that it
needs to release that before polling to fix the deadlock?

No, but I think it should be released and re-acquired in block_job_remove_all_bdrv() itself.

mirror_exit_common() however holds _two_ AioContext locks at the time it calls block_job_remove_all_bdrv(), qemu_get_aio_context() has to be released and reacquired in mirror_exit_common() itself.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]