Hitting Too Many open files when trying to build yocto
I have setup a Ubuntu VM where I am mounting a host directory where I am building yocto. I am using follwing commands. ```sh # Vritiofsd /usr/lib/virtiofsd \ --socket-path=/tmp/vm-share.sock \ --shared-dir="$HOME/yocto" # qemu qemu-system-x86_64 \ -enable-kvm \ -m 16G \ -smp 10 \ -hda ubuntu-disk.qcow2 \ -nographic \ -netdev user,id=net0,hostfwd=tcp::2222-:22 \ -device e1000,netdev=net0 \ -object memory-backend-memfd,id=mem,size=16G,share=on \ -numa node,memdev=mem \ -chardev socket,id=char0,path=/tmp/vm-share.sock \ -device vhost-user-fs-pci,chardev=char0,tag=myfs ``` When I start running yocto build in couple of minute I hit `Too many open files` in the VM. I looked around and increased ulimit for `-n: file descriptors` to 500000 but it just delays the problem a bit until it hit the limit. Problem is viriofsd keeps all the fd's open even after those files are closed by the vm. ```sh lsof -p 2280 | wc -l 497366 ``` I tried `--cache=never` but it creates another type of issue, I get this when I run bitbake after mounting the directory ```sh anurag@vm:~/yocto/poky$ source oe-init-build-env -bash: /home/anurag/yocto/poky/scripts/oe-setup-builddir: /bin/sh: bad interpreter: Bad address ``` #### What should I do :)
issue