From: Paolo Bonzini <pbonzini@redhat.com>
To: Fiona Ebner <f.ebner@proxmox.com>,
QEMU Developers <qemu-devel@nongnu.org>
Cc: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
John Snow <jsnow@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
"open list:Network Block Dev..." <qemu-block@nongnu.org>,
Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: deadlock when using iothread during backup_clean()
Date: Tue, 5 Sep 2023 13:42:32 +0200 [thread overview]
Message-ID: <dd12f39d-a364-b186-2ad7-04343ea85e3f@redhat.com> (raw)
In-Reply-To: <bcbd48da-e4cc-f9c9-000c-6a9f98ca156f@proxmox.com>
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
next prev parent reply other threads:[~2023-09-05 11:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 10:01 deadlock when using iothread during backup_clean() Fiona Ebner
2023-09-05 11:25 ` Fiona Ebner
2023-10-04 16:51 ` Vladimir Sementsov-Ogievskiy
2023-09-05 11:42 ` Paolo Bonzini [this message]
2023-09-28 8:06 ` Fiona Ebner
2023-10-04 17:08 ` Vladimir Sementsov-Ogievskiy
2023-10-06 12:18 ` Fiona Ebner
2023-10-17 10:18 ` Fiona Ebner
2023-10-17 12:12 ` Kevin Wolf
2023-10-17 13:37 ` Fiona Ebner
2023-10-17 14:20 ` Kevin Wolf
2023-10-18 9:42 ` Fiona Ebner
2023-10-19 12:14 ` Kevin Wolf
2023-10-19 13:53 ` Fiona Ebner
2023-10-20 13:52 ` Fiona Ebner
2023-11-03 13:20 ` Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd12f39d-a364-b186-2ad7-04343ea85e3f@redhat.com \
--to=pbonzini@redhat.com \
--cc=f.ebner@proxmox.com \
--cc=hreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=t.lamprecht@proxmox.com \
--cc=vsementsov@yandex-team.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).