runtime: tests periodically fail with "too many open files" on macOS machines
We periodically have tests fail on our macOS machines with System.IO.IOException : Too many open files
eg https://github.com/dotnet/corefx/issues/20226 https://github.com/dotnet/corefx/issues/21813 https://github.com/dotnet/corefx/issues/12503 https://github.com/dotnet/corefx/issues/18462
According to @MattGal " For our OSX machines (which were basically set up once then cloned, as they are not VMs) ulimit -a shows 256 open files and 8 MB stack size, which is lower than the init-tools setting " (this may be just because init tools wasn’t run in that tab)
We set ulimit -n (ie file descriptors) to 2048 in init-tools.sh on macOS only https://github.com/dotnet/corefx/blob/master/init-tools.sh#L27 . This is supposed to set both hard and soft limit - although I’m not sure this script is run as sudo. On my Ubuntu machine, ulimit -n shows 1024.
This may not have actually applied until April (fixed in https://github.com/dotnet/corefx/pull/19363)
We should either modify init-tools.sh to increase this limit and/or run lsof to try to figure out what the files are that are getting held open.
@pjanotti perhaps you could try lsof a few times during a test run on macOS, see what number we typically get up to, and whether a leak stands out?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (15 by maintainers)
@danmosemsft @MattGal if we are not seeing this error anymore I think it is time to close this issue.