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

The socket and pid files will retain even vm is destroyed for vhostuser passt interface [rhel-10]

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • No
    • Low
    • 1
    • rhel-virt-core-libvirt-2
    • ssg_virtualization
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • Libvirt in planning
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      The socket and pid files will retain even vm is destroyed for vhostuser passt interface

      What is the impact of this issue to you?

      The directory will grow with these legacy files

      Please provide the package NVR for which the bug is seen:

      libvirt-10.10.0-7.el9.x86_64
      qemu-kvm-9.1.0-15.el9.x86_64
      passt-0^20250217.ga1e48a0-1.el9.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1.  prepare a vm with vhostuser passt interface, start and destroy the vm, check the files retained in the directory:
        # ll /run/libvirt/qemu/passt 
        total 0
        
        # virsh dumpxml rhel --xpath //interface 
        <interface type="vhostuser">
          <mac address="52:54:00:5a:2d:da"/>
          <model type="virtio"/>
          <backend type="passt" logFile="/run/user/107/passt.log"/>
          <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
        </interface>
        
        # virsh start rhel 
        Domain 'rhel' started
        
        # ll /run/libvirt/qemu/passt 
        total 4
        -rw-------. 1 qemu qemu 6 Feb 20 02:48 2-rhel-net0-passt.pid
        srwxr-xr-x. 1 qemu qemu 0 Feb 20 02:48 2-rhel-net0.socket
        srwxr-xr-x. 1 qemu qemu 0 Feb 20 02:48 2-rhel-net0.socket.repair
        
        # virsh destroy rhel
        Domain 'rhel' destroyed
        
        # ll /run/libvirt/qemu/passt 
        total 4
        -rw-------. 1 qemu qemu 6 Feb 20 02:48 2-rhel-net0-passt.pid
        srwxr-xr-x. 1 qemu qemu 0 Feb 20 02:48 2-rhel-net0.socket
        srwxr-xr-x. 1 qemu qemu 0 Feb 20 02:48 2-rhel-net0.socket.repair
        
      1.   when vm start fail, it will also left legacy files
        # ll /run/libvirt/qemu/passt
        total 0
        # virsh allocpages 2M 0
        # virsh start rhel 
        error: Failed to start domain 'rhel'
        error: internal error: QEMU unexpectedly closed the monitor (vm='rhel'): 2025-02-20T07:49:32.778920Z qemu-kvm: unable to map backing store for guest RAM: Cannot allocate memory
        # ll /run/libvirt/qemu/passt
        total 4
        -rw-------. 1 qemu qemu 6 Feb 20 03:11 2-rhel-net0-passt.pid
        srwxr-xr-x. 1 qemu qemu 0 Feb 20 03:11 2-rhel-net0.socket
        srwxr-xr-x. 1 qemu qemu 0 Feb 20 03:11 2-rhel-net0.socket.repair
        

      Expected results

      These files should be cleared if unused by any processes

      Actual results

      The legacy files retain in the directory

              lstump@redhat.com Laine Stump
              yalzhang@redhat.com Yalan Zhang
              Laine Stump Laine Stump
              Han Han Han Han
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated: