-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
"Bad file descriptor" and "Too many open files" #101459
Comments
Just to mention the workaround until we get to actually tackle the problem:
We are running out of inodes on /tmp, since systemd v246 the default limit there it 400k which isn't really enough for mixing some of our larger builds (chromium, firefox, …). The line that is causing the problem is systemd/systemd@7d85383#diff-ff9de8d0d78a6434e92fcd42eca4801d682efdc8c0539f901022b4374bd94a13R25. One of the solutions that I'd like to see is a) reporting upstream & b) creating our own (customizable) mount unit instead of just importing this. The limit of EDIT: the too many open files errors is actually a bit different from the error that I've been observing but might be the same source? @FRidh can you try with a stable version of Nix? Is nix maybe leaking FDs? |
Using a configurable mount unit is #14777. I recall there was some discussion on that topic, where some said we should use upstream unit files to keep up with changes they make. |
For me just building |
I also have this issue. Possible related; I switched to flakes today. I also had the issue while building texlive. The exact texlive package that fails appears to be random. |
For me, building texlive on Ubuntu also caused this error, and I was able to fix it by increasing the soft limit on number of open file descriptors using |
See NixOS/nix#4046. regarding leaking file descriptors. |
I get a similar error:
on macOS 11.0 when installing TeXLive with flakes. Is this related? |
I just ran into this as well... |
Ditto |
Also on flakes, also ran into this on texlive. |
Just encountered this when deploying to some random KVM guest with NixOps. You can increase the limits as proposed here: security.pam.loginLimits = [{
domain = "*";
type = "soft";
item = "nofile";
value = "4096";
}]; |
I ran into this issue today while reinstalling Nix on macOS, |
Fixed in 56d7e74#diff-13a08bcc3b07f25e2a556c8a2bc57422cebb5657df91cb222e3d0b9645e99174 We probably can't do anything about the macos issue |
Are there (at least) some known workarounds for macOS? |
Some notes on a possible workaround on macOS, based on some of the other comments/issues linked above: (based on https://discussions.apple.com/thread/253001317?answerId=255632520022#255632520022)
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
launchctl limit maxfiles
sudo launchctl kickstart -k system/org.nixos.nix-daemon |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/bad-file-descriptor-during-nix-build-at-clean-git-nix-33-11/18848/1 |
I can experience this again, on NixOs when installing texlive with the documentation #171218 |
I got this today during a
After this
despite the failure. https://discourse.nixos.org/t/bad-file-descriptor-during-nix-build-at-clean-git-nix-33-11/18848/2 says
Not sure what is going on. |
Should be fixed with #176558. |
BTW: I ran into this again on macOS (thus showing that the workaround I proposed in a comment above was insufficient) but this time found Artturin/nix@2320a2f / NixOS/nix#6645 which I think did what was really necessary. Thanks @Artturin! |
Describe the bug
Switching NixOS to cfed29b fails with
Not including
texlive.combined.scheme-full
worked around the issue.Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information:
Probably related #100281.
The text was updated successfully, but these errors were encountered: