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

[QSD] VM boot failed on "Unexpected end-of-file" with vhost-user-blk-pci device [RHEL-9]

    • Major
    • sst_virtualization_storage
    • ssg_virtualization
    • False
    • Hide

      None

      Show
      None
    • If docs needed, set a value

      Description of problem:
      
      Boot vm with vhost-user-blk-pci device.
      It failed on 
      qemu-kvm: Unexpected end-of-file before all data were read
      qemu-kvm: Failed to set msg fds.
      qemu-kvm: Failed to set msg fds.
      qemu-kvm: vhost VQ 0 ring restore failed: -22: Invalid argument (22)
      
      And the qemu-storage-daemon display message:
      vu_panic: remapping queue 0 for new memory region
      
      Version-Release number of selected component (if applicable):
      Red Hat Enterprise Linux release 9.3 Beta (Plow)
      5.14.0-316.el9.x86_64
      qemu-kvm-8.0.0-5.el9.x86_64
      
      How reproducible:
      100%
      
      Steps to Reproduce:
      1. Prepare the image
      
      [ -f /home/kvm_autotest_root/images/stg1.qcow2 ] || qemu-img create -f qcow2 /home/kvm_autotest_root/images/stg1.qcow2 1G
      mkdir -p /home/qsd_tmp
      
      2. Boot QSD
      
      
      mkdir -p /home/qsd_tmp
      
      /usr/bin/qemu-storage-daemon \
        --chardev socket,server=on,wait=off,path=/home/qsd_tmp/qsd1_monitor.sock,id=qsd_monitor_qsd1 \
        --monitor chardev=qsd_monitor_qsd1,mode=control  \
        --blockdev '{"driver": "file", "node-name": "prot_stg1", "filename": "/home/kvm_autotest_root/images/stg1.qcow2", "auto-read-only": true, "discard": "unmap"}' \
        --blockdev '{"driver": "qcow2", "node-name": "fmt_stg1", "file": "prot_stg1"}' \
        --export '{"type": "vhost-user-blk", "id": "id_stg1", "node-name": "fmt_stg1", "writable": true, "num-queues": 1, "addr": {"type": "unix", "path": "/home/qsd_tmp/qsd1_vhost_user_stg1.sock"}}' \
        --pidfile /home/qsd_tmp/qsd1.pid
      
      
      
      3. Boot VM
      
      /usr/libexec/qemu-kvm \
           -name 'avocado-vt-vm1'  \
           -sandbox on  \
           -machine q35,memory-backend=mem-machine_mem \
           -device '{"id": "pcie-root-port-0", "driver": "pcie-root-port", "multifunction": true, "bus": "pcie.0", "addr": "0x1", "chassis": 1}' \
           -device '{"id": "pcie-pci-bridge-0", "driver": "pcie-pci-bridge", "addr": "0x0", "bus": "pcie-root-port-0"}'  \
           -nodefaults \
           -device '{"driver": "VGA", "bus": "pcie-pci-bridge-0", "addr": "0x1"}' \
           -m 12288 \
           -object '{"size": 12884901888, "share": true, "id": "mem-machine_mem", "qom-type": "memory-backend-memfd"}'  \
           -smp 10,maxcpus=10,cores=5,threads=1,dies=1,sockets=2  \
           -cpu 'Cascadelake-Server',ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,umip=on,pku=on,md-clear=on,stibp=on,arch-capabilities=on,xsaves=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,rdctl-no=on,ibrs-all=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,tsx-ctrl=on,hle=off,rtm=off,kvm_pv_unhalt=on \
           -device '{"id": "pcie-root-port-1", "port": 1, "driver": "pcie-root-port", "addr": "0x1.0x1", "bus": "pcie.0", "chassis": 2}' \
           -device '{"driver": "qemu-xhci", "id": "usb1", "bus": "pcie-root-port-1", "addr": "0x0"}' \
           -device '{"driver": "usb-tablet", "id": "usb-tablet1", "bus": "usb1.0", "port": "1"}' \
           -object '{"qom-type": "iothread", "id": "iothread0"}' \
           -object '{"qom-type": "iothread", "id": "iothread1"}' \
           -device '{"id": "pcie-root-port-2", "port": 2, "driver": "pcie-root-port", "addr": "0x1.0x2", "bus": "pcie.0", "chassis": 3}' \
           -device '{"id": "virtio_scsi_pci0", "driver": "virtio-scsi-pci", "bus": "pcie-root-port-2", "addr": "0x0", "iothread": "iothread0"}' \
           -blockdev '{"node-name": "file_image1", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/rhel890-64-virtio-scsi.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 '{"driver": "scsi-hd", "id": "image1", "drive": "drive_image1", "write-cache": "on"}' \
           -device '{"id": "pcie-root-port-3", "port": 3, "driver": "pcie-root-port", "addr": "0x1.0x3", "bus": "pcie.0", "chassis": 4}' \
           -device '{"driver": "virtio-net-pci", "mac": "9a:0f:bc:ba:bb:3e", "id": "id6buZsc", "netdev": "iddM4d8u", "bus": "pcie-root-port-3", "addr": "0x0"}'  \
           -netdev tap,id=iddM4d8u,vhost=on  \
           -vnc :5 \
           -monitor stdio \
           -qmp tcp:0:5955,server=on,wait=off \
           -rtc base=utc,clock=host,driftfix=slew  \
           -boot menu=off,order=cdn,once=c,strict=off \
           -enable-kvm \
           -device pcie-root-port,id=pcie_vubp_root_port_6,bus=pcie.0,addr=6  \
           -chardev socket,path=/home/qsd_tmp/qsd1_vhost_user_stg1.sock,id=char_qsd_qsd1,server=off \
           -device vhost-user-blk-pci,id=vubp_stg1,chardev=char_qsd_qsd1,num-queues=1,bus=pcie_vubp_root_port_6 \
      
      
      
      Actual results:
      VM boot failed
      
      Expected results:
      VM boot succeed
      
      Additional info:
      This issue also exist old version like 
      qemu-kvm-7.2.0-14.el9_2.x86_64
      
      It may succeed replace VGA device to:
      -device {"driver": "VGA", "bus": "pcie.0", "addr": "0x2"}
      
      
      
       
      
      

            virt-maint virt-maint
            qingwangrh qing wang
            Kevin Wolf Kevin Wolf
            qing wang qing wang
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: