Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2226916

Summary: command "virsh net-destroy default" hang
Product: Red Hat Enterprise Linux 9 Reporter: LiLiang <liali>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
libvirt sub component: Networking QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: lvivier, pkrempa, smitterl, virt-maint
Version: 9.3Flags: pm-rhel: mirror+
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-27 08:28:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description LiLiang 2023-07-27 02:03:07 UTC
Description of problem:
the default libvirt network can't be removed by running "virsh net-destroy default", the command always hang

Version-Release number of selected component (if applicable):
[root@dell-per740-05 ]# rpm -q libvirt
libvirt-9.3.0-2.el9.x86_64

[root@dell-per740-05 ]# rpm -q virt-install
virt-install-4.1.0-4.el9.noarch

[root@dell-per740-05 ]# rpm -q qemu-kvm
qemu-kvm-8.0.0-8.el9.x86_64

[root@dell-per740-05 ]# uname -r
5.14.0-344.el9.x86_64

[root@dell-per740-05 ]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.3 Beta (Plow)


How reproducible:
always

Steps to Reproduce:
```
vm_name=vm1
#
echo "#### define default vnet"
virsh net-destroy default
sleep 1
virsh net-undefine default
ip link del virbr0
sleep 1
virsh net-define /usr/share/libvirt/networks/default.xml
virsh net-start default
virsh net-autostart default

echo "#### create vm"
virt-install \
    --name $vm_name \
    --vcpus=2 \
    --ram=2048 \
    --disk path=/var/lib/libvirt/images/$vm_name.qcow2,device=disk,bus=virtio,format=qcow2 \
    --network bridge=virbr0,model=virtio,mac=22:22:22:22:29:29 \
    --import --boot hd \
    --accelerate \
    --graphics vnc,listen=0.0.0.0 \
    --force \
    --os-variant=rhel-unknown \
    --noautoconsol

sleep 120

echo "#### destroy vm"
virsh destroy $vm_name
virsh undefine $vm_name --managed-save
virsh undefine $vm_name

echo "#### virsh net-destroy default"
virsh net-destroy default
```

Actual results:
command hang when running "virsh net-destroy default"

Expected results:


Additional info:
[root@dell-per740-11 bz1225396-macvtap-link-isn-t-restored-after-team-LACP-fail-and-bring-back]# cat /var/log/libvirt/qemu/vm1.log 
2023-07-27 01:56:56.360+0000: starting up libvirt version: 9.3.0, package: 2.el9 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2023-05-16-10:12:41, ), qemu version: 8.0.0qemu-kvm-8.0.0-8.el9, kernel: 5.14.0-344.el9.x86_64, hostname: dell-per740-11.knqe.lab.eng.bos.redhat.com
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin \
HOME=/var/lib/libvirt/qemu/domain-3-vm1 \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-3-vm1/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-3-vm1/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-3-vm1/.config \
/usr/libexec/qemu-kvm \
-name guest=vm1,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-3-vm1/master-key.aes"}' \
-machine pc-i440fx-rhel7.6.0,usb=off,dump-guest-core=off,memory-backend=pc.ram,hpet=off,acpi=on \
-accel kvm \
-cpu host,migratable=on \
-m 2048 \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":2147483648}' \
-overcommit mem-lock=off \
-smp 2,sockets=2,cores=1,threads=1 \
-uuid 28303b13-914f-4f6c-88de-895e1b959c6b \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=30,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-shutdown \
-global PIIX4_PM.disable_s3=1 \
-global PIIX4_PM.disable_s4=1 \
-boot strict=on \
-device '{"driver":"ich9-usb-ehci1","id":"usb","bus":"pci.0","addr":"0x4.0x7"}' \
-device '{"driver":"ich9-usb-uhci1","masterbus":"usb.0","firstport":0,"bus":"pci.0","multifunction":true,"addr":"0x4"}' \
-device '{"driver":"ich9-usb-uhci2","masterbus":"usb.0","firstport":2,"bus":"pci.0","addr":"0x4.0x1"}' \
-device '{"driver":"ich9-usb-uhci3","masterbus":"usb.0","firstport":4,"bus":"pci.0","addr":"0x4.0x2"}' \
-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x5"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/vm1.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":null}' \
-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x6","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-netdev '{"type":"tap","fd":"31","vhost":true,"vhostfd":"33","id":"hostnet0"}' \
-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"22:22:22:22:29:29","bus":"pci.0","addr":"0x3"}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
-chardev socket,id=charchannel0,fd=29,server=on,wait=off \
-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-vnc 0.0.0.0:1,audiodev=audio1 \
-device '{"driver":"VGA","id":"video0","vgamem_mb":16,"bus":"pci.0","addr":"0x2"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x7"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
2023-07-27 01:56:56.360+0000: Domain id=3 is tainted: deprecated-config (machine type 'pc-i440fx-rhel7.6.0')
char device redirected to /dev/pts/2 (label charserial0)
2023-07-27T01:56:56.410081Z qemu-kvm: warning: Machine type 'pc-i440fx-rhel7.6.0' is deprecated: machine types for previous major releases are deprecated
2023-07-27T01:58:56.681647Z qemu-kvm: terminating on signal 15 from pid 2184 (/usr/sbin/virtqemud)
2023-07-27 01:58:56.882+0000: shutting down, reason=destroyed

Comment 1 LiLiang 2023-07-27 02:05:14 UTC
didn't find suscipious log in demsg:

[   18.437572] dcdbas dcdbas: Dell Systems Management Base Driver (version 5.6.0-3.4)
[   18.489570] ACPI Error: No handler for Region [SYSI] (00000000532ec32a) [IPMI] (20221020/evregion-130)
[   18.489575] ACPI Error: Region IPMI (ID=7) has no handler (20221020/exfldio-261)
[   18.489577] ACPI Error: Aborting method \_SB.PMI0._GHL due to previous error (AE_NOT_EXIST) (20221020/psparse-529)
[   18.489582] ACPI Error: Aborting method \_SB.PMI0._PMC due to previous error (AE_NOT_EXIST) (20221020/psparse-529)
[   18.489586] ACPI: \_SB_.PMI0: _PMC evaluation failed: AE_NOT_EXIST
[   18.533364] input: PC Speaker as /devices/platform/pcspkr/input/input1
[   18.533601] i801_smbus 0000:00:1f.4: SPD Write Disable is set
[   18.533645] i801_smbus 0000:00:1f.4: SMBus using PCI interrupt
[   18.544776] i2c i2c-4: 12/24 memory slots populated (from DMI)
[   18.544778] i2c i2c-4: Systems with more than 4 memory slots not supported yet, not instantiating SPD
[   18.544785] lpc_ich 0000:00:1f.0: I/O space for ACPI uninitialized
[   18.544786] lpc_ich 0000:00:1f.0: No MFD cells added
[   18.579535] iTCO_vendor_support: vendor-support=0
[   18.588221] IPMI message handler: version 39.2
[   18.597705] mei_me 0000:00:16.0: Device doesn't have valid ME Interface
[   18.605649] iTCO_wdt iTCO_wdt: Found a Intel PCH TCO device (Version=4, TCOBASE=0x0400)
[   18.605761] iTCO_wdt iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
[   18.626879] RAPL PMU: API unit is 2^-32 Joules, 2 fixed counters, 655360 ms ovfl timer
[   18.626881] RAPL PMU: hw unit of domain package 2^-14 Joules
[   18.626882] RAPL PMU: hw unit of domain dram 2^-16 Joules
[   18.648345] ipmi device interface
[   18.675102] ipmi_si: IPMI System Interface driver
[   18.675121] ipmi_si dmi-ipmi-si.0: ipmi_platform: probing via SMBIOS
[   18.675123] ipmi_platform: ipmi_si: SMBIOS: io 0xca8 regsize 1 spacing 4 irq 10
[   18.675125] ipmi_si: Adding SMBIOS-specified kcs state machine
[   18.675179] ipmi_si IPI0001:00: ipmi_platform: probing via ACPI
[   18.675202] ipmi_si IPI0001:00: ipmi_platform: [io  0x0ca8] regsize 1 spacing 4 irq 10
[   18.717660] mgag200 0000:03:00.0: vgaarb: deactivate vga console
[   18.723181] Console: switching to colour dummy device 80x25
[   18.731980] [drm] Initialized mgag200 1.0.0 20110418 for 0000:03:00.0 on minor 0
[   18.742738] fbcon: mgag200drmfb (fb0) is primary device
[   18.745440] ipmi_si dmi-ipmi-si.0: Removing SMBIOS-specified kcs state machine in favor of ACPI
[   18.745443] ipmi_si: Adding ACPI-specified kcs state machine
[   18.745591] ipmi_si: Trying ACPI-specified kcs state machine at i/o address 0xca8, slave address 0x20, irq 10
[   18.832787] XFS (sda1): Mounting V5 Filesystem
[   18.955127] i40e: Intel(R) Ethernet Connection XL710 Network Driver
[   18.955130] i40e: Copyright (c) 2013 - 2019 Intel Corporation.
[   19.067428] XFS (sda1): Ending clean mount
[   19.097471] Console: switching to colour frame buffer device 128x48
[   19.114231] mgag200 0000:03:00.0: [drm] fb0: mgag200drmfb frame buffer device
[   19.180787] ipmi_si IPI0001:00: The BMC does not support setting the recv irq bit, compensating, but the BMC needs to be fixed.
[   19.184191] ipmi_si IPI0001:00: Using irq 10
[   19.205510] ipmi_si IPI0001:00: IPMI message handler: Found new BMC (man_id: 0x0002a2, prod_id: 0x0100, dev_id: 0x20)
[   19.236434] ipmi_si IPI0001:00: IPMI kcs interface initialized
[   19.245288] ipmi_ssif: IPMI SSIF Interface driver
[   19.261556] EDAC MC0: Giving out device to module skx_edac controller Skylake Socket#0 IMC#0: DEV 0000:3a:0a.0 (INTERRUPT)
[   19.261606] EDAC MC1: Giving out device to module skx_edac controller Skylake Socket#0 IMC#1: DEV 0000:3a:0c.0 (INTERRUPT)
[   19.261656] EDAC MC2: Giving out device to module skx_edac controller Skylake Socket#1 IMC#0: DEV 0000:ae:0a.0 (INTERRUPT)
[   19.261714] EDAC MC3: Giving out device to module skx_edac controller Skylake Socket#1 IMC#1: DEV 0000:ae:0c.0 (INTERRUPT)
[   19.336875] XFS (dm-2): Mounting V5 Filesystem
[   19.366876] intel_rapl_common: Found RAPL domain package
[   19.366884] intel_rapl_common: Found RAPL domain dram
[   19.366886] intel_rapl_common: DRAM domain energy unit 15300pj
[   19.367652] intel_rapl_common: Found RAPL domain package
[   19.367660] intel_rapl_common: Found RAPL domain dram
[   19.367662] intel_rapl_common: DRAM domain energy unit 15300pj
[   19.479950] XFS (dm-2): Ending clean mount
[   19.725660] RPC: Registered named UNIX socket transport module.
[   19.725662] RPC: Registered udp transport module.
[   19.725662] RPC: Registered tcp transport module.
[   19.725663] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   22.660758] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[   22.976531] Warning: Deprecated Driver is detected: nft_compat will not be maintained in a future major release and may be disabled
[   26.236077] igb 0000:19:00.0 eno1: igb: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
[   26.236202] IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready
[   26.432460] FS-Cache: Loaded
[   26.592455] Key type dns_resolver registered
[   26.792923] NFS: Registering the id_resolver key type
[   26.792931] Key type id_resolver registered
[   26.792932] Key type id_legacy registered
[   37.029250] tun: Universal TUN/TAP device driver, 1.6
[   37.029841] virbr0: port 1(vnet0) entered blocking state
[   37.029843] virbr0: port 1(vnet0) entered disabled state
[   37.029888] device vnet0 entered promiscuous mode
[   37.030024] virbr0: port 1(vnet0) entered blocking state
[   37.030025] virbr0: port 1(vnet0) entered listening state
[   37.404673] virbr0: port 1(vnet0) entered disabled state
[   37.405014] device vnet0 left promiscuous mode
[   37.405020] virbr0: port 1(vnet0) entered disabled state
[   37.490374] virbr0: port 1(vnet2) entered blocking state
[   37.490376] virbr0: port 1(vnet2) entered disabled state
[   37.490425] device vnet2 entered promiscuous mode
[   37.490555] virbr0: port 1(vnet2) entered blocking state
[   37.490557] virbr0: port 1(vnet2) entered listening state
[   39.530231] virbr0: port 1(vnet2) entered learning state
[   41.578241] virbr0: port 1(vnet2) entered forwarding state
[   41.578247] virbr0: topology change detected, propagating
[   65.198833] virbr0: port 1(vnet2) entered disabled state
[   65.389614] device vnet2 left promiscuous mode
[   65.389647] virbr0: port 1(vnet2) entered disabled state
[  558.135407] block dm-0: the capability attribute has been deprecated.
[  573.695894] nfp: NFP PCIe Driver, Copyright (C) 2014-2020 Netronome Systems
[  573.695896] nfp: NFP PCIe Driver, Copyright (C) 2021-2022 Corigine Inc.
[  582.687528] sctp: Hash tables configured (bind 4096/4096)
[  583.310614] systemd-rc-local-generator[11240]: /etc/rc.d/rc.local is not marked executable, skipping.
[ 2572.538617] virbr0: port 1(vnet3) entered blocking state
[ 2572.538620] virbr0: port 1(vnet3) entered disabled state
[ 2572.538666] device vnet3 entered promiscuous mode
[ 2572.538822] virbr0: port 1(vnet3) entered blocking state
[ 2572.538824] virbr0: port 1(vnet3) entered listening state
[ 2574.593461] virbr0: port 1(vnet3) entered learning state
[ 2576.641477] virbr0: port 1(vnet3) entered forwarding state
[ 2576.641481] virbr0: topology change detected, propagating
[ 2692.893269] virbr0: port 1(vnet3) entered disabled state
[ 2692.898993] device vnet3 left promiscuous mode
[ 2692.899006] virbr0: port 1(vnet3) entered disabled state

Comment 2 Peter Krempa 2023-07-27 07:49:23 UTC
This is very likely due to a systemd regression which was recently discovered:

https://github.com/systemd/systemd/issues/27953

What is your systemd version?

Comment 3 LiLiang 2023-07-27 08:03:55 UTC
(In reply to Peter Krempa from comment #2)
> This is very likely due to a systemd regression which was recently
> discovered:
> 
> https://github.com/systemd/systemd/issues/27953
> 
> What is your systemd version?

DISTRO=RHEL-9.3.0-20230725.27 

# rpm -q systemd
systemd-252-16.el9.x86_64

Comment 4 Peter Krempa 2023-07-27 08:06:22 UTC
You can also try restarting 'virtnetworkd.service' to see whether you can destroy the network within 120 seconds of doing so.

Comment 5 LiLiang 2023-07-27 08:08:44 UTC
(In reply to Peter Krempa from comment #4)
> You can also try restarting 'virtnetworkd.service' to see whether you can
> destroy the network within 120 seconds of doing so.

I have no system on hand now, but after rebooting system, the network can be removed.

Comment 6 Peter Krempa 2023-07-27 08:28:26 UTC

*** This bug has been marked as a duplicate of bug 2225667 ***