On Tue, Jan 10, 2017 at 07:22:24PM -0600, Doug Goldstein wrote:
> On 1/10/17 10:01 AM, Stefan Hajnoczi wrote:
> > On Mon, Jan 09, 2017 at 01:08:53PM +0000, Dr. David Alan Gilbert wrote:
> >> copying in Stefan since it's his commit.
> > 
> > I can't reproduce the assertion failure.
> > 
> > Are you able to provide a backtrace (e.g. launch QEMU under gdb and then
> > use the 'bt' command after the assertion failure is raised)?
> > 
> > Thanks,
> > Stefan
> > 
> 
> #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
> #1  0x00007ffff44db3ea in __GI_abort () at abort.c:89
> #2  0x00007ffff44d1bb7 in __assert_fail_base (fmt=<optimized out>,
>     assertion=assertion@entry=0x555555ae8e8a "vq->notification_disabled
> > 0",
>     file=file@entry=0x555555ae89c0
> "/home/doug/work/qemu/hw/virtio/virtio.c",
>     line=line@entry=215,
>     function=function@entry=0x555555ae9630 <__PRETTY_FUNCTION__.43707>
> "virtio_queue_set_notification") at assert.c:92
> #3  0x00007ffff44d1c62 in __GI___assert_fail (
>     assertion=assertion@entry=0x555555ae8e8a "vq->notification_disabled
> > 0",
>     file=file@entry=0x555555ae89c0
> "/home/doug/work/qemu/hw/virtio/virtio.c",
>     line=line@entry=215,
>     function=function@entry=0x555555ae9630 <__PRETTY_FUNCTION__.43707>
> "virtio_queue_set_notification") at assert.c:101
> #4  0x00005555557f25d6 in virtio_queue_set_notification (vq=0x55555666aa90,
>     enable=enable@entry=1) at /home/doug/work/qemu/hw/virtio/virtio.c:215
> #5  0x00005555557dc311 in virtio_net_has_buffers (q=<optimized out>,
>     q=<optimized out>, bufsize=102)
>     at /home/doug/work/qemu/hw/net/virtio-net.c:1008
> #6  virtio_net_receive (nc=<optimized out>, buf=0x555557386b88 "", size=102)
>     at /home/doug/work/qemu/hw/net/virtio-net.c:1148

Thanks, it's a legitimate bug.  This code still assumes
virtio_queue_set_notification() calls are idempotent.  It needs to be
updated to support nested callers (e.g. virtqueue polling and
virtio-net).

I'll send a patch to address this and CC you.

Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to