System Info:
Post
Replies
Boosts
Views
Activity
@BenjaminApple thank you for your prompt response. I have upgraded to MacOS Sonoma as suggested this morning and conducted further testing to investigate the issue.
File Creation: I generated a substantial number of files (70,000) on the Mac host using the command for i in {1..70000}; do touch "file_${i}.txt"; done.
Listing Files in VZ VM: I navigated to the directory (cd ~/test-file-exhaustion) and listed all the files within the VZ VM.
Initial File Handle Count: Upon checking with lsof, the initial count of file handles associated with com.apple.Virtualization.VirtualMachine was high:
❯ lsof | grep "$(pgrep com.apple.Virtualization.VirtualMachine)" | wc -l
58625
Subsequent Check after 30 Minutes: After a wait of 30 minutes, I rechecked the file handles. Only 482 file handles were closed by com.apple.Virtualization.VirtualMachine:
❯ lsof | grep "$(pgrep com.apple.Virtualization.VirtualMachine)" | wc -l
58143
This test indicates that the issue of excessive open file handles persists even on the latest MacOS version and can be consistently reproduced.
I look forward to any guidance or suggestions you might have regarding this matter.
Related issue on Docker For Mac https://github.com/docker/for-mac/issues/6783
Thank you for your insights. I conducted a test on macOS Sonoma and can confirm that the issue persists. Despite the maximum file descriptors being capped at 65,535, my experiment involved opening 70,000 file descriptors. While the count of open file descriptors never exceeded the maximum limit, the system still produced too many open files in system errors.
This issue became evident when other processes on my macOS, such as iTerm, were affected, displaying the same error message. This leads me to believe that your suggestion about potential issues with the recycling of file descriptors might be accurate. It seems that the system isn’t effectively managing or recycling these descriptors, hence leading to the observed problem.
@BenjaminApple looking forward to any guidance you have on this matter. Thank you.
Thanks Benjamin I have submitted feedback, FB13640480.