Assertion failure: virtio_net_get_subqueue(nc)->async_tx.elem failed.
Hello, I bisected this to 7dc6be52 ("virtio-net: support queue reset"). CC: @mstredhat @jasowang
Reproducer
cat << EOF | ./qemu-system-i386 -display none -machine accel=qtest, -m \
512M -M q35 -nodefaults -device virtio-net,netdev=net0 -netdev \
user,id=net0 -qtest stdio
outl 0xcf8 0x80000893
outw 0xcfc 0x100
outl 0xcf8 0x80000889
outl 0xcfc 0x3a000000
outl 0xcf8 0x8000080e
outl 0xcfc 0x23400000
outl 0xcf8 0x80000804
outw 0xcfc 0x05
outl 0x234e 0x2000001
outl 0x2348 0x2ff
write 0x300004 0x1 0x02
write 0x300006 0x1 0x12
write 0x2ff128 0x1 0x0a
outl 0x2352 0x01000004
outl 0xcf8 0x80000890
outb 0xcfc 0x2
outl 0xcf8 0x80000896
write 0x300002 0x1 0x10
write 0x300008 0x1 0x02
write 0x2ff02a 0x1 0x08
write 0xfd81 0x1 0x00
write 0xfd8d 0x1 0x00
write 0xfd91 0x1 0x00
write 0xfdad 0x1 0x00
write 0xfdb1 0x1 0x00
write 0xfdc1 0x1 0x00
write 0xfdc9 0x1 0x00
write 0xfdcf 0x1 0x00
write 0xfdd1 0x1 0x00
write 0xfde9 0x1 0x00
write 0xfdef 0x1 0x00
write 0xfdf1 0x1 0x00
write 0xfe01 0x1 0x00
write 0xfe09 0x1 0x00
write 0xfe10 0x1 0x00
write 0xfe11 0x1 0x00
write 0xfe41 0x1 0x00
write 0xfe49 0x1 0x00
write 0xfe51 0x1 0x00
write 0xfe59 0x1 0x00
write 0xfe69 0x1 0x00
write 0xfe71 0x1 0x00
write 0xfe7d 0x1 0x00
write 0xfe81 0x1 0x00
write 0xfe89 0x1 0x00
write 0xfe91 0x1 0x00
write 0xfea9 0x1 0x00
write 0xfeb1 0x1 0x00
write 0xfebf 0x1 0x00
write 0xfec1 0x1 0x00
write 0xfecd 0x1 0x00
write 0xfed1 0x1 0x00
write 0xfee1 0x1 0x00
write 0xfeed 0x1 0x00
write 0xfef1 0x1 0x00
write 0xff01 0x1 0x00
write 0xff09 0x1 0x00
write 0xff0d 0x1 0x00
write 0xff11 0x1 0x00
write 0xff15 0x1 0x00
write 0xff41 0x1 0x00
write 0xff49 0x1 0x00
write 0xff4f 0x1 0x00
write 0xff51 0x1 0x00
write 0xff69 0x1 0x00
write 0xff6f 0x1 0x00
write 0xff71 0x1 0x00
write 0xff81 0x1 0x00
write 0xff89 0x1 0x00
write 0xff91 0x1 0x00
write 0xffa9 0x1 0x00
write 0xffb1 0x1 0x00
write 0xffbd 0x1 0x00
write 0xffc1 0x1 0x00
write 0xffc9 0x1 0x00
write 0xffd1 0x1 0x00
write 0xffd9 0x1 0x00
write 0xffe9 0x1 0x00
write 0xfff1 0x1 0x00
write 0x10000 0x1 0x00
write 0x10001 0x1 0x00
write 0x1000d 0x1 0x00
write 0x10011 0x1 0x00
write 0x30000a 0x1 0x12
write 0x2ff127 0x1 0x00
write 0x2ff12f 0x1 0x00
write 0xc400000000820003 0x1 0x00
write 0xc400000000820005 0x1 0x00
write 0xc400000000820007 0x1 0x00
write 0xc400000000820009 0x1 0x00
outl 0xcfc 0x020000
EOF
Stack-Trace
#8 0x7fd74d763df1 in __assert_fail assert/./assert/assert.c:101:3
#9 0x558c8c85caa9 in flush_or_purge_queued_packets /home/alxndr/Development/qemu-demo/qemu/build/../hw/net/virtio-net.c:134:5
#10 0x558c8c85caa9 in virtio_net_queue_reset /home/alxndr/Development/qemu-demo/qemu/build/../hw/net/virtio-net.c:573:5
#11 0x558c8c8925a4 in virtio_queue_reset /home/alxndr/Development/qemu-demo/qemu/build/../hw/virtio/virtio.c:2083:9
#12 0x558c8c68f73d in virtio_pci_common_write /home/alxndr/Development/qemu-demo/qemu/build/../hw/virtio/virtio-pci.c:1611:13
#13 0x558c8c8df758 in memory_region_write_accessor /home/alxndr/Development/qemu-demo/qemu/build/../softmmu/memory.c:493:5
#14 0x558c8c8df5a4 in access_with_adjusted_size /home/alxndr/Development/qemu-demo/qemu/build/../softmmu/memory.c:555:18
#15 0x558c8c8df5a4 in memory_region_dispatch_write /home/alxndr/Development/qemu-demo/qemu/build/../softmmu/memory.c:1515:16
#16 0x558c8c5be4ed in pci_host_config_write_common /home/alxndr/Development/qemu-demo/qemu/build/../hw/pci/pci_host.c:85:5
#17 0x558c8c5bea5c in pci_data_write /home/alxndr/Development/qemu-demo/qemu/build/../hw/pci/pci_host.c:127:5
#18 0x558c8c8df758 in memory_region_write_accessor /home/alxndr/Development/qemu-demo/qemu/build/../softmmu/memory.c:493:5
#19 0x558c8c8df5a4 in access_with_adjusted_size /home/alxndr/Development/qemu-demo/qemu/build/../softmmu/memory.c:555:18
#20 0x558c8c8df5a4 in memory_region_dispatch_write /home/alxndr/Development/qemu-demo/qemu/build/../softmmu/memory.c:1515:16
#21 0x558c8c8eeef4 in flatview_write_continue /home/alxndr/Development/qemu-demo/qemu/build/../softmmu/physmem.c:2825:23
#22 0x558c8c8ebb1d in flatview_write /home/alxndr/Development/qemu-demo/qemu/build/../softmmu/physmem.c:2867:12
#23 0x558c8c8eb928 in address_space_write /home/alxndr/Development/qemu-demo/qemu/build/../softmmu/physmem.c:2963:18
OSS-Fuzz Report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55169
libqtest Reproducer: repro.c
Thank you