![]() There’s been so many file issues with Catalina, I can’t begin to fathom what’s going on. I also found another issue with NSFileHandle on Catalina, calling for the second, third, forth time, etc (on a new NSFileHandle each time) was leaking threads on Catalina. Yet the thousands of files with no path or hex identifier… Can only have come from using TextOutputStream.append, but even then I highly doubt it was creating that many log entries. Updating my code to use the Newer Catalina API saw these getting closed when they should have. I tracked these down to the NSFileHandle, which I get from a NSPipe to use with NSTask. I noticed a couple of them had no path, just hex values. I was using Activity Monitor as it also shows what files are open. ![]() Note that macOS is really limited for the open file count since the kernel does allow just about 12k open files for all processes! See “sysctl -a |files” for the hard limits of the OS. ![]() In case you need more the count can be increased via “ulimit”. You can look via “ulimit -a” how many files can be opened from a process. This should help to get a clue what’s wrong. You may want to use “sudo lsof” to get a list of all open files on your Mac.
0 Comments
Leave a Reply. |