On Wed, May 17, 2023 at 05:28:32PM +0200, Kevin Wolf wrote: > In QEMU 8.0, we've been seeing deadlocks in bdrv_graph_wrlock(). They > come from callers that hold an AioContext lock, which is not allowed > during polling. In theory, we could temporarily release the lock, but > callers are inconsistent about whether they hold a lock, and if they do, > some are also confused about which one they hold. While all of this is > fixable, it's not trivial, and the best course of action for 8.0.1 is > probably just disabling the graph locking code temporarily. > > We don't currently rely on graph locking yet. It is supposed to replace > the AioContext lock eventually to enable multiqueue support, but as long > as we still have the AioContext lock, it is sufficient without the graph > lock. Once the AioContext lock goes away, the deadlock doesn't exist any > more either and this commit can be reverted. (Of course, it can also be > reverted while the AioContext lock still exists if the callers have been > fixed.)
Makes sense - certainly easier than finding all the lurking bugs, while we still have the AioContext lock protection. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > block/graph-lock.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org