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

Guest refuses to go down after unplug disk

    • Major
    • Regression
    • sst_virtualization_storage
    • ssg_virtualization
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • Red Hat Enterprise Linux
    • x86_64
    • Linux

      What were you trying to do that didn't work?
      The Linux guest can not shutdown after unplugging the disk

      Please provide the package NVR for which bug is seen:
      Red Hat Enterprise Linux release 9.4 Beta (Plow)
      5.14.0-410.el9.x86_64
      qemu-kvm-8.2.0-3.el9.x86_64
      seabios-bin-1.16.3-2.el9.noarch
      edk2-ovmf-20231122-2.el9.noarch
      libvirt-10.0.0-1.el9.x86_64

      How reproducible:
      5%
      
      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 12288 \
           -object '{"size": 12884901888, "id": "mem-machine_mem", "qom-type": "memory-backend-ram"}'  \
           -smp 48,maxcpus=48,cores=24,threads=1,dies=1,sockets=2  \
           -cpu 'SapphireRapids',ds=on,ss=on,dtes64=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,sgx=on,waitpkg=on,cldemote=on,movdiri=on,movdir64b=on,sgxlc=on,md-clear=on,stibp=on,flush-l1d=on,sgx1=on,sgx2=on,sgx-edeccssa=on,sgx-exinfo=on,sgx-debug=on,sgx-mode64=on,sgx-provisionkey=on,sgx-tokenkey=on,sgx-kss=on,sgx-aex-notify=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,tsx-ctrl=on,sbdr-ssdp-no=on,fbsdp-no=on,psdp-no=on,gds-no=on,vmx-ins-outs=on,vmx-true-ctls=on,vmx-store-lma=on,vmx-activity-hlt=on,vmx-activity-wait-sipi=on,vmx-vmwrite-vmexit-fields=on,vmx-apicv-xapic=on,vmx-ept=on,vmx-desc-exit=on,vmx-rdtscp-exit=on,vmx-apicv-x2apic=on,vmx-vpid=on,vmx-wbinvd-exit=on,vmx-unrestricted-guest=on,vmx-apicv-register=on,vmx-apicv-vid=on,vmx-rdrand-exit=on,vmx-invpcid-exit=on,vmx-vmfunc=on,vmx-shadow-vmcs=on,vmx-encls-exit=on,vmx-rdseed-exit=on,vmx-pml=on,vmx-xsaves=on,vmx-tsc-scaling=on,vmx-enable-user-wait-pause=on,vmx-invvpid=on,vmx-invvpid-single-addr=on,vmx-invvpid-all-context=on,vmx-ept-execonly=on,vmx-page-walk-4=on,vmx-page-walk-5=on,vmx-ept-2mb=on,vmx-ept-1gb=on,vmx-invept=on,vmx-eptad=on,vmx-invept-single-context=on,vmx-invept-all-context=on,vmx-intr-exit=on,vmx-nmi-exit=on,vmx-vnmi=on,vmx-preemption-timer=on,vmx-posted-intr=on,vmx-vintr-pending=on,vmx-tsc-offset=on,vmx-hlt-exit=on,vmx-invlpg-exit=on,vmx-mwait-exit=on,vmx-rdpmc-exit=on,vmx-rdtsc-exit=on,vmx-cr3-load-noexit=on,vmx-cr3-store-noexit=on,vmx-cr8-load-exit=on,vmx-cr8-store-exit=on,vmx-flexpriority=on,vmx-vnmi-pending=on,vmx-movdr-exit=on,vmx-io-exit=on,vmx-io-bitmap=on,vmx-mtf=on,vmx-msr-bitmap=on,vmx-monitor-exit=on,vmx-pause-exit=on,vmx-secondary-ctls=on,vmx-exit-nosave-debugctl=on,vmx-exit-load-perf-global-ctrl=on,vmx-exit-ack-intr=on,vmx-exit-save-pat=on,vmx-exit-load-pat=on,vmx-exit-save-efer=on,vmx-exit-load-efer=on,vmx-exit-save-preemption-timer=on,vmx-entry-noload-debugctl=on,vmx-entry-ia32e-mode=on,vmx-entry-load-perf-global-ctrl=on,vmx-entry-load-pat=on,vmx-entry-load-efer=on,vmx-eptp-switching=on,hle=off,rtm=off,pku=off,taa-no=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"}' \
           -blockdev '{"node-name": "file_image1", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/rhel860-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", "bootindex": 0, "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:d9:af:f2:90:6f", "id": "ids4bugT", "netdev": "idrm57nq", "bus": "pcie-root-port-3", "addr": "0x0"}' \
           -netdev  '{"id": "idrm57nq", "type": "tap", "vhost": true}'  \
           -vnc :1  \
           -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": "device_add", "arguments": {"id": "virtio_scsi_pci1", "driver": "virtio-scsi-pci", "bus": "pcie_extra_root_port_0", "addr": "0x0"}, "id": "UR803YNl"}
      {"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": "sc7dbzKj"}
      {"execute": "blockdev-add", "arguments": {"node-name": "drive_stg0", "driver": "qcow2", "read-only": false, "cache": {"direct": true, "no-flush": false}, "file": "file_stg0"}, "id": "TjdW4ZyA"}
       
      {"execute": "device_add", "arguments": {"driver": "scsi-hd", "id": "stg0", "bus": "virtio_scsi_pci1.0", "drive": "drive_stg0", "write-cache": "on"}, "id": "y4EIiyI5"}
      
      3. do IO on new disk
      dd if=/dev/sdb of=/dev/null bs=1k count=1000 iflag=direct && dd if=/dev/zero of=/dev/sdb bs=1k count=1000 oflag=direct
      
      4. unplug disk
      
      {"execute": "device_del", "arguments": {"id": "stg0"}, "id": "v11C1CRi"}
       {"execute": "blockdev-del", "arguments": {"node-name": "drive_stg0"}, "id": "i2JJFmya"}
      {"execute": "blockdev-del", "arguments": {"node-name": "file_stg0"}, "id": "myEf2lxJ"}
       {"execute": "device_del", "arguments": {"id": "virtio_scsi_pci1"}, "id": "OPmCbhNb"}
      
      5.shutdown guest
      
      
      
      Expected results
      shutdown succeed
      
      Actual results
       hang on shutdown
      
      
      It can not hit this issue on
      Red Hat Enterprise Linux release 9.4 Beta (Plow)
      5.14.0-373.el9.x86_64
      qemu-kvm-8.0.0-16.el9_3.x86_64
      seabios-bin-1.16.1-1.el9.noarch
      edk2-ovmf-20230524-4.el9_3.noarch
      libvirt-9.5.0-7.el9_3.x86_64 

            hreitz@redhat.com Hanna Czenczek
            qingwangrh qing wang
            virt-maint virt-maint
            qing wang qing wang
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: