Bug 2223186

Summary: virsh hangs after one of VM's is shut down
Product: [Fedora] Fedora Reporter: Łukasz Posadowski <mail>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: berrange, clalancette, crobinso, hhan, jforbes, laine, libvirt-maint, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-22 14:22:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Łukasz Posadowski 2023-07-16 10:44:57 UTC
Hi.

Virsh hangs on several commands after one of the VM's was shut down. I do not know how to track this issue, or when exacly it started. I do not power off VM's that often.

thanks

Reproducible: Always

Steps to Reproduce:
1. virsh list --all (works fine)
2. virsh shutdown [domain name] --mode acpi
   or
   "shutdown -h now" as root in VM
3. virsh list --all (does nothing and hangs)
Actual Results:  
Virsh does not provide any information, nor do any action (like dumpxml) after shutting down virtual machine.

Bash completion also do not list domain after:
virsh dumpxml --domain [tab] 


Expected Results:  
Virsh to work. (-:

1. Disabling selinux does not help.

2. I can't reproduce this issue in RHEL8.

3. I can't reproduce this issue in CentOS Stream 9.

4. Strace of working "virsh list --all" is on https://wiki.baszarek.pl/virsh_work.txt .

5. Strace of hanged "virsh list --all" is on https://wiki.baszarek.pl/virsh_hang.txt .

Comment 1 Han Han 2023-07-17 01:14:32 UTC
(In reply to Łukasz Posadowski from comment #0)
> Hi.
> 
> Virsh hangs on several commands after one of the VM's was shut down. I do
> not know how to track this issue, or when exacly it started. I do not power
> off VM's that often.
> 
> thanks
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. virsh list --all (works fine)
> 2. virsh shutdown [domain name] --mode acpi
>    or
>    "shutdown -h now" as root in VM
> 3. virsh list --all (does nothing and hangs)
> Actual Results:  
> Virsh does not provide any information, nor do any action (like dumpxml)
> after shutting down virtual machine.
> 
> Bash completion also do not list domain after:
> virsh dumpxml --domain [tab] 
> 
> 
> Expected Results:  
> Virsh to work. (-:
> 
> 1. Disabling selinux does not help.
> 
> 2. I can't reproduce this issue in RHEL8.
> 
> 3. I can't reproduce this issue in CentOS Stream 9.
> 
> 4. Strace of working "virsh list --all" is on
> https://wiki.baszarek.pl/virsh_work.txt .
> 
> 5. Strace of hanged "virsh list --all" is on
> https://wiki.baszarek.pl/virsh_hang.txt .

What is the version of libvirt and qemu?

Comment 2 Łukasz Posadowski 2023-07-17 15:28:14 UTC
@Han Han :

# rpm -qa | grep libvirt-client
libvirt-client-9.0.0-3.fc38.x86_64

# rpm -qa | grep qemu
ipxe-roms-qemu-20220210-3.git64113751.fc38.noarch
qemu-common-7.2.1-2.fc38.x86_64
qemu-ui-opengl-7.2.1-2.fc38.x86_64
qemu-ui-spice-core-7.2.1-2.fc38.x86_64
qemu-char-spice-7.2.1-2.fc38.x86_64
qemu-ui-gtk-7.2.1-2.fc38.x86_64
qemu-ui-spice-app-7.2.1-2.fc38.x86_64
qemu-audio-spice-7.2.1-2.fc38.x86_64
qemu-device-display-qxl-7.2.1-2.fc38.x86_64
qemu-ui-egl-headless-7.2.1-2.fc38.x86_64
qemu-ui-sdl-7.2.1-2.fc38.x86_64
qemu-audio-alsa-7.2.1-2.fc38.x86_64
qemu-audio-dbus-7.2.1-2.fc38.x86_64
qemu-audio-jack-7.2.1-2.fc38.x86_64
qemu-audio-oss-7.2.1-2.fc38.x86_64
qemu-audio-pa-7.2.1-2.fc38.x86_64
qemu-audio-sdl-7.2.1-2.fc38.x86_64
qemu-block-blkio-7.2.1-2.fc38.x86_64
qemu-block-curl-7.2.1-2.fc38.x86_64
qemu-block-dmg-7.2.1-2.fc38.x86_64
qemu-block-gluster-7.2.1-2.fc38.x86_64
qemu-block-iscsi-7.2.1-2.fc38.x86_64
qemu-block-nfs-7.2.1-2.fc38.x86_64
qemu-block-rbd-7.2.1-2.fc38.x86_64
qemu-block-ssh-7.2.1-2.fc38.x86_64
qemu-char-baum-7.2.1-2.fc38.x86_64
qemu-device-display-vhost-user-gpu-7.2.1-2.fc38.x86_64
qemu-device-display-virtio-gpu-7.2.1-2.fc38.x86_64
qemu-device-display-virtio-gpu-ccw-7.2.1-2.fc38.x86_64
qemu-device-display-virtio-gpu-gl-7.2.1-2.fc38.x86_64
qemu-device-display-virtio-gpu-pci-7.2.1-2.fc38.x86_64
qemu-device-display-virtio-gpu-pci-gl-7.2.1-2.fc38.x86_64
qemu-device-display-virtio-vga-7.2.1-2.fc38.x86_64
qemu-device-display-virtio-vga-gl-7.2.1-2.fc38.x86_64
qemu-device-usb-host-7.2.1-2.fc38.x86_64
qemu-device-usb-redirect-7.2.1-2.fc38.x86_64
qemu-device-usb-smartcard-7.2.1-2.fc38.x86_64
qemu-ui-curses-7.2.1-2.fc38.x86_64
qemu-pr-helper-7.2.1-2.fc38.x86_64
qemu-virtiofsd-7.2.1-2.fc38.x86_64
qemu-system-x86-core-7.2.1-2.fc38.x86_64
qemu-system-x86-7.2.1-2.fc38.x86_64
qemu-user-static-xtensa-7.2.1-2.fc38.x86_64
qemu-user-static-x86-7.2.1-2.fc38.x86_64
qemu-user-static-sparc-7.2.1-2.fc38.x86_64
qemu-user-static-sh4-7.2.1-2.fc38.x86_64
qemu-user-static-s390x-7.2.1-2.fc38.x86_64
qemu-user-static-riscv-7.2.1-2.fc38.x86_64
qemu-user-static-ppc-7.2.1-2.fc38.x86_64
qemu-user-static-or1k-7.2.1-2.fc38.x86_64
qemu-user-static-nios2-7.2.1-2.fc38.x86_64
qemu-user-static-mips-7.2.1-2.fc38.x86_64
qemu-user-static-microblaze-7.2.1-2.fc38.x86_64
qemu-user-static-m68k-7.2.1-2.fc38.x86_64
qemu-user-static-loongarch64-7.2.1-2.fc38.x86_64
qemu-user-static-hppa-7.2.1-2.fc38.x86_64
qemu-user-static-hexagon-7.2.1-2.fc38.x86_64
qemu-user-static-cris-7.2.1-2.fc38.x86_64
qemu-user-static-arm-7.2.1-2.fc38.x86_64
qemu-user-static-alpha-7.2.1-2.fc38.x86_64
qemu-user-static-aarch64-7.2.1-2.fc38.x86_64
qemu-user-static-7.2.1-2.fc38.x86_64
qemu-kvm-7.2.1-2.fc38.x86_64
qemu-kvm-core-7.2.1-2.fc38.x86_64
qemu-img-7.2.1-2.fc38.x86_64
libvirt-daemon-driver-qemu-9.0.0-3.fc38.x86_64

Comment 3 Łukasz Posadowski 2023-07-22 14:22:13 UTC
I can not reproduce this bug in after a fresh reinstall of Fedora 38. Previous installation was upgraded several times from Fedora 36. 

Sorry for the trouble and thank You. I guess it is fixed.