-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
rhel-10.0
-
None
-
No
-
None
-
rhel-sst-virtualization-storage
-
ssg_virtualization
-
5
-
False
-
-
None
-
None
-
None
-
None
-
None
Please provide the package NVR for which bug is seen:
libvirt-10.8.0-2.el10.x86_64
qemu-kvm-9.1.0-3.el10.x86_64
virtiofsd-1.11.1-1.el10.x86_64
How reproducible:
100%
Steps to reproduce:
Scenario 1:
1. Prepare a guest with internally launched virtiofsd device, set its openfiles to 11
# virsh dumpxml clone --xpath //filesystem <filesystem type='mount' accessmode='passthrough'> <driver type='virtiofs' queue='512'/> <binary path='/usr/libexec/virtiofsd' xattr='on'> <openfiles max='11'/> </binary> <source dir='/path'/> <target dir='mount_tag'/> <alias name='ua-1035e984-8238-46e1-bf56-b546246e1a39'/> <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> </filesystem>
2. Start the guest
# virsh start clone (Will hang forever)
3. Check the virtiofsd log
# cat /var/log/libvirt/qemu/clone-ua-1035e984-8238-46e1-bf56-b546246e1a39-virtiofsd.log [2024-10-17T03:36:07Z INFO virtiofsd] Waiting for vhost-user socket connection... [2024-10-17T03:36:07Z INFO virtiofsd] Client connected, servicing requests (No other log)
Scenario 2:
1. Prepare a guest with internally launched virtiofsd device, set its openfiles to 12
# virsh dumpxml clone --xpath //filesystem <filesystem type='mount' accessmode='passthrough'> <driver type='virtiofs' queue='512'/> <binary path='/usr/libexec/virtiofsd' xattr='on'> <openfiles max='12'/> </binary> <source dir='/path'/> <target dir='mount_tag'/> <alias name='ua-1035e984-8238-46e1-bf56-b546246e1a39'/> <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> </filesystem>
2. Start the guest
# virsh start clone error: Failed to start domain 'clone' error: internal error: QEMU unexpectedly closed the monitor (vm='clone'): 2024-10-17T09:00:54.881080Z qemu-kvm: -device {"driver":"vhost-user-fs-pci","id":"ua-1035e984-8238-46e1-bf56-b546246e1a39","chardev":"chr-vu-ua-1035e984-8238-46e1-bf56-b546246e1a39","queue-size":512,"tag":"mount_tag","bus":"pci.8","addr":"0x0"}: Failed to write msg. Wrote -1 instead of 20. 2024-10-17T09:00:54.881114Z qemu-kvm: -device {"driver":"vhost-user-fs-pci","id":"ua-1035e984-8238-46e1-bf56-b546246e1a39","chardev":"chr-vu-ua-1035e984-8238-46e1-bf56-b546246e1a39","queue-size":512,"tag":"mount_tag","bus":"pci.8","addr":"0x0"}: vhost_set_vring_err failed: Invalid argument (22) 2024-10-17T09:00:54.881143Z qemu-kvm: -device {"driver":"vhost-user-fs-pci","id":"ua-1035e984-8238-46e1-bf56-b546246e1a39","chardev":"chr-vu-ua-1035e984-8238-46e1-bf56-b546246e1a39","queue-size":512,"tag":"mount_tag","bus":"pci.8","addr":"0x0"}: Failed to initialize virtqueue 1: Invalid argument
3. Check virtiofsd log
# vim /var/log/libvirt/qemu/clone-ua-1035e984-8238-46e1-bf56-b546246e1a39-virtiofsd.log [2024-10-18T06:48:26Z INFO virtiofsd] Waiting for vhost-user socket connection... [2024-10-18T06:48:26Z INFO virtiofsd] Client connected, servicing requests [2024-10-18T06:48:26Z ERROR virtiofsd] Waiting for daemon failed: HandleRequest(InvalidMessage)
(No clear error reported)
Scenario 3:
1. Prepare a guest with internally launched virtiofsd device, set its openfiles to 14
# virsh dumpxml clone --xpath //filesystem <filesystem type='mount' accessmode='passthrough'> <driver type='virtiofs' queue='512'/> <binary path='/usr/libexec/virtiofsd' xattr='on'> <openfiles max='14'/> </binary> <source dir='/path'/> <target dir='mount_tag'/> <alias name='ua-1035e984-8238-46e1-bf56-b546246e1a39'/> <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> </filesystem>
2. Start the guest
# virsh start clone Domain 'clone' started
3. Check guest status
# virsh domstate clone --reason running (booted)
4. Check virtiofsd process
# ps aux |grep virtiofsd (no output)
5. Check qemu log
# vim /var/log/libvirt/qemu/clone.log 2024-10-18T06:56:02.706236Z qemu-kvm: Unexpected end-of-file before all data were read 2024-10-18T06:56:15.923074Z qemu-kvm: Failed to set msg fds. 2024-10-18T06:56:15.923119Z qemu-kvm: vhost_set_vring_call failed 22 2024-10-18T06:56:15.923177Z qemu-kvm: Failed to set msg fds. 2024-10-18T06:56:15.923191Z qemu-kvm: vhost_set_vring_call failed 22 2024-10-18T06:56:15.923208Z qemu-kvm: Failed to set msg fds. 2024-10-18T06:56:15.923223Z qemu-kvm: vhost_set_features failed: Invalid argument (22) 2024-10-18T06:56:15.923235Z qemu-kvm: Error starting vhost: 22 2024-10-18T06:56:15.923249Z qemu-kvm: Failed to set msg fds. 2024-10-18T06:56:15.923260Z qemu-kvm: vhost_set_vring_call failed 22 2024-10-18T06:56:15.923272Z qemu-kvm: Failed to set msg fds. 2024-10-18T06:56:15.923283Z qemu-kvm: vhost_set_vring_call failed 22
(If we do migration for the guest, then guest will be crashed)
Actual result:
When setting maximum number of file descriptors to small values, there will be various types of behaviors
Expected result:
Should give a lower limit of maximum number of file descriptors, or at least to have some notifications in the doc.
Additional info:
For values smaller than 11,
# virsh start clone error: Failed to start domain 'clone' error: internal error: virtiofsd died unexpectedly
Check the virtiofsd log, will report the following error:
# cat /var/log/libvirt/qemu/clone-ua-1035e984-8238-46e1-bf56-b546246e1a39-virtiofsd.log [2024-10-18T06:56:02Z ERROR virtiofsd] Waiting for daemon failed: HandleRequest(InvalidMessage) [2024-10-18T07:11:55Z INFO virtiofsd] Waiting for vhost-user socket connection... [2024-10-18T07:11:55Z ERROR virtiofsd] Failed to start daemon: CreateBackendListener(SocketError(Os { code: 24, kind: Uncategorized, message: "Too many open files" }))