On Thu, Aug 03, 2023 at 09:38:20AM +0200, Thomas Huth wrote:
> On 03/08/2023 09.10, Milan Zamazal wrote:
> > Fabiano Rosas <[email protected]> writes:
> > 
> > > Milan Zamazal <[email protected]> writes:
> > > 
> > > > The QEMU CI fails in virtio-scmi test occasionally.  As reported by
> > > > Thomas Huth, this happens most likely when the system is loaded and it
> > > > fails with the following error:
> > > > 
> > > >    qemu-system-aarch64: ../../devel/qemu/hw/pci/msix.c:659:
> > > >    msix_unset_vector_notifiers: Assertion
> > > > `dev->msix_vector_use_notifier && dev->msix_vector_release_notifier'
> > > > failed.
> > > >    ../../devel/qemu/tests/qtest/libqtest.c:200: kill_qemu() detected
> > > > QEMU death from signal 6 (Aborted) (core dumped)
> > > > 
> > > > As discovered by Fabiano Rosas, the cause is a duplicate invocation of
> > > > msix_unset_vector_notifiers via duplicate vu_scmi_stop calls:
> > > > 
> > > >    msix_unset_vector_notifiers
> > > >    virtio_pci_set_guest_notifiers
> > > >    vu_scmi_stop
> > > >    vu_scmi_disconnect
> > > >    ...
> > > >    qemu_chr_write_buffer
> > > > 
> > > >    msix_unset_vector_notifiers
> > > >    virtio_pci_set_guest_notifiers
> > > >    vu_scmi_stop
> > > >    vu_scmi_set_status
> > > >    ...
> > > >    qemu_cleanup
> > > > 
> > > > While vu_scmi_stop calls are protected by vhost_dev_is_started()
> > > > check, it's apparently not enough.  vhost-user-blk and vhost-user-gpio
> > > > use an extra protection, see f5b22d06fb (vhost: recheck dev state in
> > > > the vhost_migration_log routine) for the motivation.  Let's use the
> > > > same in vhost-user-scmi, which fixes the failure above.
> > > > 
> > > > Fixes: a5dab090e142 ("hw/virtio: Add boilerplate for vhost-user-scmi 
> > > > device")
> > > > Signed-off-by: Milan Zamazal <[email protected]>
> > > 
> > > Reviewed-by: Fabiano Rosas <[email protected]>
> > 
> > Please note that this bug fix should IMO definitely go to 8.1, to not
> > have a bug in vhost-user-scmi and to not have broken tests.  Any chance
> > to get it merged?
> 
> If nobody else is planning a pull request with this patch included, I can
> take it for my next PR (since it is fixing the CI, I just saw another
> failure here:
> https://gitlab.com/qemu-project/qemu/-/jobs/4790457938#L4784 )
> 
>  Thomas
> 

I picked it up but if you like I can drop it.

-- 
MST


Reply via email to