All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: "Milan Zamazal" <mzamazal@redhat.com>,
	qemu-devel@nongnu.org, "Fabiano Rosas" <farosas@suse.de>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH] hw/virtio: Add a protection against duplicate vu_scmi_stop calls
Date: Thu, 3 Aug 2023 05:50:15 -0400	[thread overview]
Message-ID: <20230803054946-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <c06a5138-170e-d696-38f1-3060ea164932@redhat.com>

On Thu, Aug 03, 2023 at 09:38:20AM +0200, Thomas Huth wrote:
> On 03/08/2023 09.10, Milan Zamazal wrote:
> > Fabiano Rosas <farosas@suse.de> writes:
> > 
> > > Milan Zamazal <mzamazal@redhat.com> 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 <mzamazal@redhat.com>
> > > 
> > > Reviewed-by: Fabiano Rosas <farosas@suse.de>
> > 
> > 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	other threads:[~2023-08-03  9:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 10:10 [PATCH] hw/virtio: Add a protection against duplicate vu_scmi_stop calls Milan Zamazal
2023-07-20 10:55 ` Thomas Huth
2023-07-20 12:30 ` Fabiano Rosas
2023-08-03  7:10   ` Milan Zamazal
2023-08-03  7:38     ` Thomas Huth
2023-08-03  9:50       ` Michael S. Tsirkin [this message]
2023-08-03 10:46         ` Thomas Huth

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=20230803054946-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=mzamazal@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.