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

The guest hit file system broken when repeadly hotplug/unplug disks with IO doing [9.2.z]

    • None
    • Important
    • rhel-sst-virtualization-storage
    • ssg_virtualization
    • None
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • x86_64
    • Linux
    • None

      
      What were you trying to do that didn't work?
      
      The guest hit file system is broken when repeatedly hotplug/unplug disks with IO doing
      
      It resulted in the IO command failing.
      
      Please provide the package NVR for which bug is seen:
      Red Hat Enterprise Linux release 9.2 (Plow)
      5.14.0-284.11.1.el9_2.x86_64
      qemu-kvm-7.2.0-14.el9_2.x86_64
      seabios-bin-1.16.1-1.el9.noarch
      edk2-ovmf-20221207gitfff6d81270b5-9.el9_2.noarch
      libvirt-9.0.0-10.el9_2.x86_64
      virtio-win-prewhql-0.1-247.iso
      
      How reproducible:
      10%
      
      Steps to reproduce
      1. 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.0", "addr": "0x2"}' \
      -m 8192 \
      -object '\{"size": 8589934592, "id": "mem-machine_mem", "qom-type": "memory-backend-ram"}'  \
      -smp 48,maxcpus=48,cores=24,threads=1,dies=1,sockets=2  \
      -cpu 'Icelake-Server',ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,sgx=on,avx512ifma=on,sha-ni=on,waitpkg=on,rdpid=on,bus-lock-detect=on,cldemote=on,movdiri=on,movdir64b=on,sgxlc=on,fsrm=on,md-clear=on,serialize=on,tsx-ldtrk=on,amx-bf16=on,avx512-fp16=on,amx-tile=on,amx-int8=on,stibp=on,arch-capabilities=on,avx-vnni=on,avx512-bf16=on,xsaves=on,xfd=on,sgx1=on,sgx2=on,sgx-exinfo=on,sgx-debug=on,sgx-mode64=on,sgx-provisionkey=on,sgx-tokenkey=on,sgx-kss=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,mpx=off,intel-pt=off,kvm_pv_unhalt=on \
      -chardev socket,id=qmp_id_qmpmonitor1,wait=off,server=on,path=/var/tmp/avocado_tw4mk3fp/monitor-qmpmonitor1-20240221-011755-ebvNqE0l  \
      -mon chardev=qmp_id_qmpmonitor1,mode=control \
      \
      -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"}' \
      -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"}' \
      -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:97:5f:45:52:24", "id": "id2vql8b", "netdev": "idU4OH0A", "bus": "pcie-root-port-3", "addr": "0x0"}' \
      -netdev  '\{"id": "idU4OH0A", "type": "tap", "vhost": true, "vhostfd": "16", "fd": "12"}'  \
      -vnc :0  \
      -rtc base=utc,clock=host,driftfix=slew  \
      -boot menu=off,order=cdn,once=c,strict=off \
      -enable-kvm \
      -device '\{"id": "pcie_extra_root_port_0", "driver": "pcie-root-port", "multifunction": true, "bus": "pcie.0", "addr": "0x3", "chassis": 5}'
      
      2. Hotplug disk
      
      {"execute": "blockdev-add", "arguments": \{"node-name": "file_stg0", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/storage0.qcow2", "cache": {"direct": true, "no-flush": false}}, "id": "BG1jFl26"}
      {"execute": "blockdev-add", "arguments": {"node-name": "drive_stg0", "driver": "qcow2", "read-only": false, "cache":
      
      {"direct": true, "no-flush": false}
      
      , "file": "file_stg0"}, "id": "Ow7nySKV"}
      
      {"execute": "device_add", "arguments": \\{"driver": "scsi-hd", "id": "stg0", "drive": "drive_stg0", "write-cache": "on", "bus": "virtio_scsi_pci0.0"}
      
      , "id": "MeGuaDHh"}
      
       
      
      3. Format disk
      parted -s "/dev/sdb" mklabel msdos
      ls /sys/dev/block -l | grep "/pci" | grep "sdb" --color=never
      parted -s "/dev/sdb" mkpart primary 0M 30720.0M
      partprobe /dev/sdb
      ls /sys/dev/block -l | grep "/pci" | grep "sdb" --color=never
      yes|mkfs.ext4 -F '/dev/sdb1'
      rm -rf /mnt/sdb1; mkdir /mnt/sdb1
      mount -t ext4 /dev/sdb1 /mnt/sdb1
      
      4. execute IO on new disk
      /home/iozone_inst/src/current/iozone -az -g 10G -y 32k -i 0 -i 1 -I -f /mnt/sdb1/iozone_test
      
      5. unplug disk
      
      {"execute": "device_del", "arguments": \{"id": "stg0"}, "id": "HuUmiZYG"}
      {"execute": "blockdev-del", "arguments": \{"node-name": "drive_stg0"}, "id": "DgYfj0OX"}
      {"execute": "blockdev-del", "arguments": \{"node-name": "file_stg0"}, "id": "opu1EPuL"} 
      
       
      
      6. repeat step 2-5 100 times
      
      Expected results
      guest may access and execute format/IO command
      
      Actual results
      format disk /IO/login guest failed
      
       
      
      

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

                Created:
                Updated:
                Resolved: