-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
files not closed when installing dependencies causes Error: Too many open files
for formulas with lots of dependencies
#9120
Comments
Closing until this is provided. |
@MikeMcQuaid can you please re-open? I've edited OP and added brew config and brew doctor outputs |
Can you also provide:
Just to have a broad idea. |
@iMichka ulimit -Hn ulimit -Sn cat /proc/1234/limits |
Perhaps @iMichka wanted the output of |
makes sense
|
I have the same You have a soft limit set at Of course we could have a look in homebrew if we can close more files, I do not know our code enough to tell what is going on. But I would also expect your system to be able to keep more than 1024 files open. |
1024 might be low but note, this is default for any VM in AWS (and other VM's IIRC), so is likely to impact quite a few people (plus, it's always nice to lower resource usage either way). when brew install foo must install pkg1, pkg2, ... dependencies, each dependency is installed, opening many bottle tar.gz files the process, but these are not released; instead those files should be closed right after each dependency is built. |
Will reopen this if we see it affect other people.
Will review a PR to address this. There's a trivial workaround for your current problem. |
Yes, same thoughts here: I think in 3-4 years there was only 1 or 2 users complaining about this. And the workaround is to increase the soft limit, which should be easy. No maintainer will probably work on this, but we would review a PR, as Mike said. |
originally reported in https://github.com/Homebrew/linuxbrew-core/issues/21139 but reporting here as suggested here https://github.com/Homebrew/linuxbrew-core/issues/21139#issuecomment-726296817
Bug report
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
brew install opencv
What happened (include command output)
Command output
What you expected to happen
works
Step-by-step reproduction instructions (by running
brew
commands)from a fresh linuxbrew install (under /home/linuxbrew/.linuxbrew/), run
brew install opencv
it has many dependencies and eventually fails with
Error: Too many open files
it looks like a regression.
maybe some file descriptors are not being closed?
this likely could happen with other formulas, shouldn't be specific to opencv.
I reproduced this on several systems (including fresh VM's in EC2 with 8CPU/32GB RAM)
Output of
brew config
andbrew doctor
commandsthis is from a fresh VM and fresh brew install
brew doctor
Your system is ready to brew.
workaround
keep running
brew install opencv
until it works as it makes progress each time by installing dependecies (but it adds a lot of overhead)(note that it eventually fails for unrelated reasons, with
qt
: https://github.com/Homebrew/linuxbrew-core/issues/21130; EDIT: that one just got fixed)EDIT
retried again on a fresh t3a.2xlarge AWS EC2 instance (8vCPU, 32GB memory):
note: it also affects semantics
here are logs from
brew install opencv
:=> it fails for unrelated reason (Too many open files) and then builds from source (which can be much slower) instead of building from bottle
This just seems like a homebrew/linuxbrew bug: files for a formula be closed once the corresponding formula was built.
The text was updated successfully, but these errors were encountered: