Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7359

qemu crash on virtio_blk_set_status: Assertion `!s->dataplane_started' failed when hotplug/unplug virtio disks repeatedly

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • None
    • Important
    • Reopened, CustomerScenariosInitiative
    • rhel-virt-storage
    • ssg_virtualization
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • Automated
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:
      Enable iothread on disk.
      Hotplug-unplug virtio blk disks repeatedly, sometimes it crashes on

      qemu-kvm: ../hw/block/virtio-blk.c:1043: virtio_blk_set_status: Assertion `!s->dataplane_started' failed

      Version-Release number of selected component (if applicable):
      Red Hat Enterprise Linux release 8.9 Beta (Ootpa)
      4.18.0-494.el8.x86_64
      qemu-kvm-6.2.0-35.module+el8.9.0+19024+8193e2ac.x86_64
      seabios-bin-1.16.0-3.module+el8.8.0+16781+9f4724c2.noarch

      How reproducible:
      <5%

      Steps to Reproduce:
      1.Boot vm
      /usr/libexec/qemu-kvm \
      -S \
      -name 'avocado-vt-vm1' \
      -sandbox on \
      -machine q35,memory-backend=mem-machine_mem \
      -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
      -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0 \
      -nodefaults \
      -device VGA,bus=pcie-pci-bridge-0,addr=0x1 \
      -m 8192 \
      -object memory-backend-ram,size=8192M,id=mem-machine_mem \
      -smp 16,maxcpus=16,cores=8,threads=1,dies=1,sockets=2 \
      -cpu 'EPYC-Rome',+kvm_pv_unhalt \
      \
      -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
      -device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \
      -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
      -object iothread,id=iothread0 \
      -object iothread,id=iothread1 \
      -blockdev '{"node-name": "file_image1", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/rhel890-64-virtio.qcow2", "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "drive_image1", "driver": "qcow2", "read-only": false, "cache":

      {"direct": true, "no-flush": false}

      , "file": "file_image1"}' \
      -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
      -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,write-cache=on,bus=pcie-root-port-2,addr=0x0,iothread=iothread0 \
      -blockdev '{"node-name": "file_stg0", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/stg0.qcow2", "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "drive_stg0", "driver": "qcow2", "read-only": false, "cache":

      {"direct": true, "no-flush": false}

      , "file": "file_stg0"}' \
      -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
      -device virtio-blk-pci,id=stg0,drive=drive_stg0,bootindex=1,write-cache=on,bus=pcie-root-port-3,addr=0x0,iothread=iothread1 \
      -blockdev '{"node-name": "file_stg1", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/stg1.qcow2", "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "drive_stg1", "driver": "qcow2", "read-only": false, "cache":

      {"direct": true, "no-flush": false}

      , "file": "file_stg1"}' \
      -device pcie-root-port,id=pcie-root-port-4,port=0x4,addr=0x1.0x4,bus=pcie.0,chassis=5 \
      -device virtio-blk-pci,id=stg1,drive=drive_stg1,bootindex=2,write-cache=on,bus=pcie-root-port-4,addr=0x0,iothread=iothread0 \
      -blockdev '{"node-name": "file_stg2", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/stg2.qcow2", "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "drive_stg2", "driver": "qcow2", "read-only": false, "cache":

      {"direct": true, "no-flush": false}

      , "file": "file_stg2"}' \
      -device pcie-root-port,id=pcie-root-port-5,port=0x5,addr=0x1.0x5,bus=pcie.0,chassis=6 \
      -device virtio-blk-pci,id=stg2,drive=drive_stg2,bootindex=3,write-cache=on,bus=pcie-root-port-5,addr=0x0,iothread=iothread1 \
      -device pcie-root-port,id=pcie-root-port-6,port=0x6,addr=0x1.0x6,bus=pcie.0,chassis=7 \
      -device virtio-net-pci,mac=9a:2d:25:2e:bd:05,id=iduknQjC,netdev=idkVAS0H,bus=pcie-root-port-6,addr=0x0 \
      -netdev tap,id=idkVAS0H,vhost=on \
      -vnc :0 \
      -rtc base=utc,clock=host,driftfix=slew \
      -boot menu=off,order=cdn,once=c,strict=off \
      -enable-kvm \
      -device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x2,chassis=8 \
      -device pcie-root-port,id=pcie_extra_root_port_1,addr=0x2.0x1,bus=pcie.0,chassis=9 \
      -device pcie-root-port,id=pcie_extra_root_port_2,addr=0x2.0x2,bus=pcie.0,chassis=10

      2.unplug disks
      {"execute": "device_del", "arguments":

      {"id": "stg1"}

      , "id": "JQwvBYjx"}
      {"execute": "device_del", "arguments":

      {"id": "stg2"}

      , "id": "W9phaXjN"}

      3.plug disks
      {"execute": "device_add", "arguments":

      {"driver": "virtio-blk-pci", "id": "stg1", "drive": "drive_stg1", "bootindex": "2", "write-cache": "on", "bus": "pcie-root-port-4", "addr": "0x0"}

      , "id": "9rzTDYUj"}
      {"execute": "device_add", "arguments":

      {"driver": "virtio-blk-pci", "id": "stg2", "drive": "drive_stg2", "bootindex": "3", "write-cache": "on", "bus": "pcie-root-port-5", "addr": "0x0"}

      , "id": "tomEiZ7o"}

      4. loop step2-3 3000 times without delay

      Actual results:
      It crashes sometimes

      Expected results:
      no crash

      Additional info:
      It looks like not a regression issue, the same issue also can be found on
      qemu-kvm-6.2.0-20.module+el8.8.0+16743+e56fc0d8.x86_64

              shajnocz@redhat.com Stefan Hajnoczi
              qingwangrh qing wang
              stefanha@redhat.com stefanha@redhat.com (Inactive)
              qing wang qing wang
              Votes:
              0 Vote for this issue
              Watchers:
              17 Start watching this issue

                Created:
                Updated:
                Resolved: